# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "red.fullname" . }}-red
  labels:
  {{- include "red.labels" . | nindent 4 }}
data:
  ACCENT_GARAGE_GUITARIST: {{ .Values.red.accentGarageGuitarist | quote }}
  BIND_ENTHUSIASTIC: {{ .Values.red.bindEnthusiastic | quote }}
  CASHEW: {{ .Values.red.cashew | quote }}
  CURIOSITY_WAR_CHALICE: {{ .Values.red.curiosityWarChalice | quote }}
  DINER_CELLAR_CURIOSITY: {{ .Values.red.dinerCellarCuriosity | quote }}
  EXPEDITE: {{ .Values.red.expedite | quote }}
  EXPENSIVE_BOORISH_TATTLER: {{ .Values.red.expensiveBoorishTattler | quote }}
  HOOK: {{ .Values.red.hook | quote }}
  METER: {{ .Values.red.meter | quote }}
  PARTICIPATE_CURSOR_ORDINATION: {{ .Values.red.participateCursorOrdination | quote
    }}
  RESOLVE_DOE_DISAGREEMENT: {{ .Values.red.resolveDoeDisagreement | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "red.fullname" . }}-red
  labels:
  {{- include "red.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: red
spec:
  replicas: {{ .Values.red.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: red
      app.kubernetes.io/name: cooing
    {{- include "red.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: red
        app.kubernetes.io/name: cooing
      {{- include "red.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 311f0da89407cf2ad073f35f66aef61a2b2b303d1c73746995826916a0cf1a99
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "red.fullname" . }}-red
        image: {{ .Values.red.red.image.repository }}:{{ .Values.red.red.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.red.red.imagePullPolicy }}
        name: red
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.red.red.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.red.red.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "red.fullname" . }}-red
  labels:
  {{- include "red.labels" . | nindent 4 }}
spec:
  type: {{ .Values.red.type }}
  selector:
    app.kubernetes.io/instance: red
    app.kubernetes.io/name: cooing
  {{- include "red.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.red.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
red:
  accentGarageGuitarist: bottling
  bindEnthusiastic: finding
  cashew: periodic
  curiosityWarChalice: catalog
  dinerCellarCuriosity: turnip
  expedite: softdrink
  expensiveBoorishTattler: fortune
  hook: melon
  meter: scanner
  participateCursorOrdination: briefly
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  red:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  resolveDoeDisagreement: extinction
  type: ClusterIP
