# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "chick.fullname" . }}-chick
  labels:
  {{- include "chick.labels" . | nindent 4 }}
data:
  AIRSPACE_PAINFUL_BOORISH: {{ .Values.chick.airspacePainfulBoorish | quote }}
  BENEFICIARY_DECISION: {{ .Values.chick.beneficiaryDecision | quote }}
  DECIDE_SHUTDOWN_DRAWBRIDGE: {{ .Values.chick.decideShutdownDrawbridge | quote }}
  ESPADRILLE_SHORT: {{ .Values.chick.espadrilleShort | quote }}
  GODPARENT_FLUGELHORN: {{ .Values.chick.godparentFlugelhorn | quote }}
  INTEGRAL: {{ .Values.chick.integral | quote }}
  LOVE: {{ .Values.chick.love | quote }}
  NEURON_SUCK: {{ .Values.chick.neuronSuck | quote }}
  PRESS_LIVE: {{ .Values.chick.pressLive | quote }}
  SOW_SHOOTDOWN_JACKET: {{ .Values.chick.sowShootdownJacket | quote }}
  TOOL_INTERVIEWER_ATTAIN: {{ .Values.chick.toolInterviewerAttain | quote }}
  WIT_SILVER: {{ .Values.chick.witSilver | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "chick.fullname" . }}-chick
  labels:
  {{- include "chick.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: chick
spec:
  replicas: {{ .Values.chick.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: chick
      app.kubernetes.io/name: chaos
    {{- include "chick.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: chick
        app.kubernetes.io/name: chaos
      {{- include "chick.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 10d44711813745d4fabc74b1bd2e41fff97c2706b499d403a842e9bafaa769b8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "chick.fullname" . }}-chick
        image: {{ .Values.chick.chick.image.repository }}:{{ .Values.chick.chick.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.chick.chick.imagePullPolicy }}
        name: chick
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.chick.chick.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.chick.chick.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "chick.fullname" . }}-chick
  labels:
  {{- include "chick.labels" . | nindent 4 }}
spec:
  type: {{ .Values.chick.type }}
  selector:
    app.kubernetes.io/instance: chick
    app.kubernetes.io/name: chaos
  {{- include "chick.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.chick.ports | toYaml | nindent 2 -}}
chick:
  airspacePainfulBoorish: pest
  beneficiaryDecision: mow
  chick:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  decideShutdownDrawbridge: jagged
  espadrilleShort: greet
  godparentFlugelhorn: metronome
  integral: red
  love: circulation
  neuronSuck: flaky
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pressLive: nappy
  replicas: 1
  sowShootdownJacket: great
  toolInterviewerAttain: dolman
  type: ClusterIP
  witSilver: conformation
kubernetesClusterDomain: cluster.local
