# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dump.fullname" . }}-dump
  labels:
  {{- include "dump.labels" . | nindent 4 }}
data:
  COORDINATOR_SPELLING: {{ .Values.dump.coordinatorSpelling | quote }}
  DEAFENING: {{ .Values.dump.deafening | quote }}
  LOGO_WHEY_ATTENUATION: {{ .Values.dump.logoWheyAttenuation | quote }}
  NOON: {{ .Values.dump.noon | quote }}
  WHORL: {{ .Values.dump.whorl | quote }}
  WITHDRAW: {{ .Values.dump.withdraw | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dump.fullname" . }}-dump
  labels:
  {{- include "dump.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dump
spec:
  replicas: {{ .Values.dump.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dump
      app.kubernetes.io/name: dedication
    {{- include "dump.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dump
        app.kubernetes.io/name: dedication
      {{- include "dump.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 894fced0dfc64c95a349049630e8e5f8a12ba9473d900cac83e0fa31c1c73801
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dump.fullname" . }}-dump
        image: {{ .Values.dump.dump.image.repository }}:{{ .Values.dump.dump.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dump.dump.imagePullPolicy }}
        name: dump
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dump.dump.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dump.dump.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dump.fullname" . }}-dump
  labels:
  {{- include "dump.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dump.type }}
  selector:
    app.kubernetes.io/instance: dump
    app.kubernetes.io/name: dedication
  {{- include "dump.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dump.ports | toYaml | nindent 2 -}}
dump:
  coordinatorSpelling: accelerator
  deafening: chub
  dump:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  logoWheyAttenuation: clothe
  noon: isogloss
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  whorl: bump
  withdraw: pleat
kubernetesClusterDomain: cluster.local
