# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "foodstuffs.fullname" . }}-foodstuffs
  labels:
  {{- include "foodstuffs.labels" . | nindent 4 }}
data:
  ARRIVAL_DOWN: {{ .Values.foodstuffs.arrivalDown | quote }}
  CLOGS: {{ .Values.foodstuffs.clogs | quote }}
  DUCKLING_LOTTERY_VERIFICATION: {{ .Values.foodstuffs.ducklingLotteryVerification
    | quote }}
  DYSFUNCTION_CRISIS: {{ .Values.foodstuffs.dysfunctionCrisis | quote }}
  FAX_CHOKE_ENTHUSIASM: {{ .Values.foodstuffs.faxChokeEnthusiasm | quote }}
  HATE: {{ .Values.foodstuffs.hate | quote }}
  LADDER_NOTATION: {{ .Values.foodstuffs.ladderNotation | quote }}
  PORCUPINE: {{ .Values.foodstuffs.porcupine | quote }}
  RUNNER_GRASP_HANDMAIDEN: {{ .Values.foodstuffs.runnerGraspHandmaiden | quote }}
  STORY_NETBALL_OBEISANT: {{ .Values.foodstuffs.storyNetballObeisant | quote }}
  TELL: {{ .Values.foodstuffs.tell | quote }}
  VENOM: {{ .Values.foodstuffs.venom | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "foodstuffs.fullname" . }}-foodstuffs
  labels:
  {{- include "foodstuffs.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: foodstuffs
spec:
  replicas: {{ .Values.foodstuffs.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: foodstuffs
      app.kubernetes.io/name: adamant
    {{- include "foodstuffs.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: foodstuffs
        app.kubernetes.io/name: adamant
      {{- include "foodstuffs.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e18a133e62e784b48035fc6b8e9e2803ee58b2206f1db2fd362c8f03946876e8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "foodstuffs.fullname" . }}-foodstuffs
        image: {{ .Values.foodstuffs.foodstuffs.image.repository }}:{{ .Values.foodstuffs.foodstuffs.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.foodstuffs.foodstuffs.imagePullPolicy }}
        name: foodstuffs
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.foodstuffs.foodstuffs.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.foodstuffs.foodstuffs.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "foodstuffs.fullname" . }}-foodstuffs
  labels:
  {{- include "foodstuffs.labels" . | nindent 4 }}
spec:
  type: {{ .Values.foodstuffs.type }}
  selector:
    app.kubernetes.io/instance: foodstuffs
    app.kubernetes.io/name: adamant
  {{- include "foodstuffs.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.foodstuffs.ports | toYaml | nindent 2 -}}
foodstuffs:
  arrivalDown: emergency
  clogs: wall
  ducklingLotteryVerification: minion
  dysfunctionCrisis: aftershave
  faxChokeEnthusiasm: stability
  foodstuffs:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  hate: cooing
  ladderNotation: role
  porcupine: teletype
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  runnerGraspHandmaiden: legal
  storyNetballObeisant: muddled
  tell: origin
  type: ClusterIP
  venom: stylus
kubernetesClusterDomain: cluster.local
