# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "slot.fullname" . }}-slot
  labels:
  {{- include "slot.labels" . | nindent 4 }}
data:
  ANTECEDENT: {{ .Values.slot.antecedent | quote }}
  BORING_TADPOLE_LOFT: {{ .Values.slot.boringTadpoleLoft | quote }}
  CONSONANT: {{ .Values.slot.consonant | quote }}
  CRANBERRY_FIND: {{ .Values.slot.cranberryFind | quote }}
  DOSE_NATURE: {{ .Values.slot.doseNature | quote }}
  DRESSER_CONTROVERSY: {{ .Values.slot.dresserControversy | quote }}
  GIGGLE: {{ .Values.slot.giggle | quote }}
  LARVA_DREAMER_SAUCER: {{ .Values.slot.larvaDreamerSaucer | quote }}
  PAD_STEALTH: {{ .Values.slot.padStealth | quote }}
  SAMPAN_HEADACHE: {{ .Values.slot.sampanHeadache | quote }}
  SKIP: {{ .Values.slot.skip | quote }}
  STEPSON: {{ .Values.slot.stepson | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "slot.fullname" . }}-slot
  labels:
  {{- include "slot.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: slot
spec:
  replicas: {{ .Values.slot.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: slot
      app.kubernetes.io/name: reamer
    {{- include "slot.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: slot
        app.kubernetes.io/name: reamer
      {{- include "slot.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: dd76110d7c51e2535483e0550c64aab2ad67e01857aa8c788d5adea754ec45b9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "slot.fullname" . }}-slot
        image: {{ .Values.slot.slot.image.repository }}:{{ .Values.slot.slot.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.slot.slot.imagePullPolicy }}
        name: slot
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.slot.slot.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.slot.slot.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "slot.fullname" . }}-slot
  labels:
  {{- include "slot.labels" . | nindent 4 }}
spec:
  type: {{ .Values.slot.type }}
  selector:
    app.kubernetes.io/instance: slot
    app.kubernetes.io/name: reamer
  {{- include "slot.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.slot.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
slot:
  antecedent: prior
  boringTadpoleLoft: bourgeoisie
  consonant: faculty
  cranberryFind: mouton
  doseNature: verve
  dresserControversy: stepson
  giggle: historical
  larvaDreamerSaucer: split
  padStealth: mere
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sampanHeadache: interject
  skip: forecast
  slot:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  stepson: oak
  type: ClusterIP
