# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "digestion.fullname" . }}-digestion
  labels:
  {{- include "digestion.labels" . | nindent 4 }}
data:
  AFTERSHOCK_BOTANY: {{ .Values.digestion.aftershockBotany | quote }}
  DUNE BUGGY_AMOUNT_BLANK: {{ .Values.digestion.duneBuggyAmountBlank | quote }}
  ESPADRILLE_CHAMPAGNE_MAINTAIN: {{ .Values.digestion.espadrilleChampagneMaintain
    | quote }}
  HOWITZER_ANTICODON_MITER: {{ .Values.digestion.howitzerAnticodonMiter | quote }}
  LEGACY_DEN_LIQUID: {{ .Values.digestion.legacyDenLiquid | quote }}
  LEMONADE_GAMING: {{ .Values.digestion.lemonadeGaming | quote }}
  OLDIE_COOKBOOK: {{ .Values.digestion.oldieCookbook | quote }}
  RESTRUCTURING: {{ .Values.digestion.restructuring | quote }}
  SINGULAR_QUERY: {{ .Values.digestion.singularQuery | quote }}
  THRIFT_ALFALFA_AGENT: {{ .Values.digestion.thriftAlfalfaAgent | quote }}
  TUGBOAT: {{ .Values.digestion.tugboat | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "digestion.fullname" . }}-digestion
  labels:
  {{- include "digestion.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: digestion
spec:
  replicas: {{ .Values.digestion.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: digestion
      app.kubernetes.io/name: executive
    {{- include "digestion.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: digestion
        app.kubernetes.io/name: executive
      {{- include "digestion.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: dad2c70ce5e29d6c9e59f483424665c7c0f41dc3bb576d136fd2475f6bc80919
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "digestion.fullname" . }}-digestion
        image: {{ .Values.digestion.digestion.image.repository }}:{{ .Values.digestion.digestion.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.digestion.digestion.imagePullPolicy }}
        name: digestion
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.digestion.digestion.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.digestion.digestion.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "digestion.fullname" . }}-digestion
  labels:
  {{- include "digestion.labels" . | nindent 4 }}
spec:
  type: {{ .Values.digestion.type }}
  selector:
    app.kubernetes.io/instance: digestion
    app.kubernetes.io/name: executive
  {{- include "digestion.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.digestion.ports | toYaml | nindent 2 -}}
digestion:
  aftershockBotany: highland
  digestion:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  duneBuggyAmountBlank: intentionality
  espadrilleChampagneMaintain: hen
  howitzerAnticodonMiter: railway
  legacyDenLiquid: gliding
  lemonadeGaming: jungle
  oldieCookbook: ballot
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  restructuring: easel
  singularQuery: mink
  thriftAlfalfaAgent: wealthy
  tugboat: laughter
  type: ClusterIP
kubernetesClusterDomain: cluster.local
