# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "repeat.fullname" . }}-repeat
  labels:
  {{- include "repeat.labels" . | nindent 4 }}
data:
  BEHALF: {{ .Values.repeat.behalf | quote }}
  BROWN: {{ .Values.repeat.brown | quote }}
  DISEASE_CENTURION_INCENTIVE: {{ .Values.repeat.diseaseCenturionIncentive | quote
    }}
  FAT_GRAY_MUDDLED: {{ .Values.repeat.fatGrayMuddled | quote }}
  IMPALA: {{ .Values.repeat.impala | quote }}
  MEMORIZE_RAFFLE_PEEL: {{ .Values.repeat.memorizeRafflePeel | quote }}
  MOCCASINS_DOWNTOWN: {{ .Values.repeat.moccasinsDowntown | quote }}
  OVAL: {{ .Values.repeat.oval | quote }}
  SANCTION_NUKE_BLISTER: {{ .Values.repeat.sanctionNukeBlister | quote }}
  VANADYL_SCISSORS: {{ .Values.repeat.vanadylScissors | quote }}
  VODKA: {{ .Values.repeat.vodka | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "repeat.fullname" . }}-repeat
  labels:
  {{- include "repeat.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: repeat
spec:
  replicas: {{ .Values.repeat.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: repeat
      app.kubernetes.io/name: dizzy
    {{- include "repeat.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: repeat
        app.kubernetes.io/name: dizzy
      {{- include "repeat.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7e88cb915be6310dc3001c06cfcec5191f1041021ef78fd7e419637dda51def7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "repeat.fullname" . }}-repeat
        image: {{ .Values.repeat.repeat.image.repository }}:{{ .Values.repeat.repeat.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.repeat.repeat.imagePullPolicy }}
        name: repeat
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.repeat.repeat.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.repeat.repeat.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "repeat.fullname" . }}-repeat
  labels:
  {{- include "repeat.labels" . | nindent 4 }}
spec:
  type: {{ .Values.repeat.type }}
  selector:
    app.kubernetes.io/instance: repeat
    app.kubernetes.io/name: dizzy
  {{- include "repeat.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.repeat.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
repeat:
  behalf: almighty
  brown: optimist
  diseaseCenturionIncentive: rub
  fatGrayMuddled: popularity
  impala: diary
  memorizeRafflePeel: meander
  moccasinsDowntown: alarm
  oval: raiment
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  repeat:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  sanctionNukeBlister: derrick
  type: ClusterIP
  vanadylScissors: archeology
  vodka: elderly
