# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "receive.fullname" . }}-receive
  labels:
  {{- include "receive.labels" . | nindent 4 }}
data:
  AGGRESSIVE_SABRE_ROLL: {{ .Values.receive.aggressiveSabreRoll | quote }}
  CONTAIN_LEADERSHIP: {{ .Values.receive.containLeadership | quote }}
  KEEP_QUARTER_FETUS: {{ .Values.receive.keepQuarterFetus | quote }}
  POMPOM_LORD: {{ .Values.receive.pompomLord | quote }}
  SAVING_REGARD_INTERCONNECTION: {{ .Values.receive.savingRegardInterconnection |
    quote }}
  SHALLOWS_SPECIALIST: {{ .Values.receive.shallowsSpecialist | quote }}
  SPAN: {{ .Values.receive.span | quote }}
  TRAINING_EMPLOYMENT: {{ .Values.receive.trainingEmployment | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "receive.fullname" . }}-receive
  labels:
  {{- include "receive.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: receive
spec:
  replicas: {{ .Values.receive.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: receive
      app.kubernetes.io/name: determined
    {{- include "receive.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: receive
        app.kubernetes.io/name: determined
      {{- include "receive.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 16b48aadeaf4f4946c2ae5b88730cee49a51fe856e52938491f0a2f2e2eca4ed
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "receive.fullname" . }}-receive
        image: {{ .Values.receive.receive.image.repository }}:{{ .Values.receive.receive.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.receive.receive.imagePullPolicy }}
        name: receive
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.receive.receive.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.receive.receive.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "receive.fullname" . }}-receive
  labels:
  {{- include "receive.labels" . | nindent 4 }}
spec:
  type: {{ .Values.receive.type }}
  selector:
    app.kubernetes.io/instance: receive
    app.kubernetes.io/name: determined
  {{- include "receive.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.receive.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
receive:
  aggressiveSabreRoll: enrollment
  containLeadership: decline
  keepQuarterFetus: viola
  pompomLord: toilet
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  receive:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  savingRegardInterconnection: self
  shallowsSpecialist: trader
  span: panicky
  trainingEmployment: shoe-horn
  type: ClusterIP
