# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dawn.fullname" . }}-dawn
  labels:
  {{- include "dawn.labels" . | nindent 4 }}
data:
  CHEMICAL_TROUBLED: {{ .Values.dawn.chemicalTroubled | quote }}
  CULVERT_VISA: {{ .Values.dawn.culvertVisa | quote }}
  DEPTH_PRETZEL_TERRORISM: {{ .Values.dawn.depthPretzelTerrorism | quote }}
  ECLIPTIC_OFF-RAMP: {{ .Values.dawn.eclipticOffRamp | quote }}
  FACILITATE: {{ .Values.dawn.facilitate | quote }}
  FACT_MACHINERY_STRAND: {{ .Values.dawn.factMachineryStrand | quote }}
  FOAL: {{ .Values.dawn.foal | quote }}
  HAIRCUT_LAUGH: {{ .Values.dawn.haircutLaugh | quote }}
  LARVA: {{ .Values.dawn.larva | quote }}
  ROAD: {{ .Values.dawn.road | quote }}
  STABLE_POIGNANCE: {{ .Values.dawn.stablePoignance | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dawn.fullname" . }}-dawn
  labels:
  {{- include "dawn.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dawn
spec:
  replicas: {{ .Values.dawn.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dawn
      app.kubernetes.io/name: can
    {{- include "dawn.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dawn
        app.kubernetes.io/name: can
      {{- include "dawn.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 87b6f9efcbb7d0601b88f47d41251765bf402c8fb9b1d0320fe7ef77046d0b21
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dawn.fullname" . }}-dawn
        image: {{ .Values.dawn.dawn.image.repository }}:{{ .Values.dawn.dawn.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dawn.dawn.imagePullPolicy }}
        name: dawn
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dawn.dawn.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dawn.dawn.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dawn.fullname" . }}-dawn
  labels:
  {{- include "dawn.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dawn.type }}
  selector:
    app.kubernetes.io/instance: dawn
    app.kubernetes.io/name: can
  {{- include "dawn.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dawn.ports | toYaml | nindent 2 -}}
dawn:
  chemicalTroubled: collagen
  culvertVisa: combination
  dawn:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  depthPretzelTerrorism: peninsula
  eclipticOffRamp: sprout
  facilitate: tam-o'-shanter
  factMachineryStrand: pinch
  foal: clause
  haircutLaugh: shovel
  larva: photo
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  road: anybody
  stablePoignance: snowsuit
  type: ClusterIP
kubernetesClusterDomain: cluster.local
