# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "zombie.fullname" . }}-zombie
  labels:
  {{- include "zombie.labels" . | nindent 4 }}
data:
  ACADEMY_BOURGEOISIE_GRANDPARENT: {{ .Values.zombie.academyBourgeoisieGrandparent
    | quote }}
  CHECK: {{ .Values.zombie.check | quote }}
  COUNSELING_CLAMP: {{ .Values.zombie.counselingClamp | quote }}
  EPAULIERE: {{ .Values.zombie.epauliere | quote }}
  PLAN_MOCHA_BLACKBIRD: {{ .Values.zombie.planMochaBlackbird | quote }}
  PLANNING_POVERTY: {{ .Values.zombie.planningPoverty | quote }}
  SITE_RIGHTEOUS: {{ .Values.zombie.siteRighteous | quote }}
  SMOG: {{ .Values.zombie.smog | quote }}
  SUMMER: {{ .Values.zombie.summer | quote }}
  VULTURE: {{ .Values.zombie.vulture | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "zombie.fullname" . }}-zombie
  labels:
  {{- include "zombie.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: zombie
spec:
  replicas: {{ .Values.zombie.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: zombie
      app.kubernetes.io/name: extend
    {{- include "zombie.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: zombie
        app.kubernetes.io/name: extend
      {{- include "zombie.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3cee5920d48c7b052f7143f00efe9c30688de24fcdc37269e994d2d643dbf8d6
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "zombie.fullname" . }}-zombie
        image: {{ .Values.zombie.zombie.image.repository }}:{{ .Values.zombie.zombie.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.zombie.zombie.imagePullPolicy }}
        name: zombie
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.zombie.zombie.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.zombie.zombie.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "zombie.fullname" . }}-zombie
  labels:
  {{- include "zombie.labels" . | nindent 4 }}
spec:
  type: {{ .Values.zombie.type }}
  selector:
    app.kubernetes.io/instance: zombie
    app.kubernetes.io/name: extend
  {{- include "zombie.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.zombie.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
zombie:
  academyBourgeoisieGrandparent: coalition
  check: impossible
  counselingClamp: revenge
  epauliere: mailer
  planMochaBlackbird: veal
  planningPoverty: virtue
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  siteRighteous: manipulation
  smog: strawberry
  summer: accuracy
  type: ClusterIP
  vulture: kilt
  zombie:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
