# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "clean.fullname" . }}-clean
  labels:
  {{- include "clean.labels" . | nindent 4 }}
data:
  ACTIVATE_DREAM: {{ .Values.clean.activateDream | quote }}
  AXIOMATIC_SLIDER: {{ .Values.clean.axiomaticSlider | quote }}
  ELF_TOP-HAT_REMINDER: {{ .Values.clean.elfTopHatReminder | quote }}
  FORELIMB_TOOTHPASTE_PLANET: {{ .Values.clean.forelimbToothpastePlanet | quote }}
  GINGER: {{ .Values.clean.ginger | quote }}
  PART_GALE: {{ .Values.clean.partGale | quote }}
  PLACE: {{ .Values.clean.place | quote }}
  WAD_MAYOR: {{ .Values.clean.wadMayor | quote }}
  WALLET: {{ .Values.clean.wallet | quote }}
  WIDE_BEHEADING: {{ .Values.clean.wideBeheading | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "clean.fullname" . }}-clean
  labels:
  {{- include "clean.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: clean
spec:
  replicas: {{ .Values.clean.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: clean
      app.kubernetes.io/name: gainful
    {{- include "clean.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: clean
        app.kubernetes.io/name: gainful
      {{- include "clean.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: d569bd5c641ac7bc14796804f4ff5b9e97f914f3a797c961eb7070cf3178621a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "clean.fullname" . }}-clean
        image: {{ .Values.clean.clean.image.repository }}:{{ .Values.clean.clean.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.clean.clean.imagePullPolicy }}
        name: clean
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.clean.clean.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.clean.clean.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "clean.fullname" . }}-clean
  labels:
  {{- include "clean.labels" . | nindent 4 }}
spec:
  type: {{ .Values.clean.type }}
  selector:
    app.kubernetes.io/instance: clean
    app.kubernetes.io/name: gainful
  {{- include "clean.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.clean.ports | toYaml | nindent 2 -}}
clean:
  activateDream: proposal
  axiomaticSlider: adobe
  clean:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  elfTopHatReminder: functional
  forelimbToothpastePlanet: designer
  ginger: shut
  partGale: aback
  place: chug
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  wadMayor: concert
  wallet: frustration
  wideBeheading: aperitif
kubernetesClusterDomain: cluster.local
