# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "conclusion.fullname" . }}-conclusion
  labels:
  {{- include "conclusion.labels" . | nindent 4 }}
data:
  ALMANAC_PREACH: {{ .Values.conclusion.almanacPreach | quote }}
  BLACKBOARD_CALORIE: {{ .Values.conclusion.blackboardCalorie | quote }}
  DRAG: {{ .Values.conclusion.drag | quote }}
  MAINSTREAM_YIELDING_PROSECUTION: {{ .Values.conclusion.mainstreamYieldingProsecution
    | quote }}
  MEDIAN_ACCEPTABLE: {{ .Values.conclusion.medianAcceptable | quote }}
  MORBID: {{ .Values.conclusion.morbid | quote }}
  PAY_STATUS: {{ .Values.conclusion.payStatus | quote }}
  RATIO: {{ .Values.conclusion.ratio | quote }}
  REPORTER_QUALIFICATION: {{ .Values.conclusion.reporterQualification | quote }}
  TOURIST: {{ .Values.conclusion.tourist | quote }}
  UNDERGO_OVERRATED: {{ .Values.conclusion.undergoOverrated | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "conclusion.fullname" . }}-conclusion
  labels:
  {{- include "conclusion.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: conclusion
spec:
  replicas: {{ .Values.conclusion.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: conclusion
      app.kubernetes.io/name: relay
    {{- include "conclusion.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: conclusion
        app.kubernetes.io/name: relay
      {{- include "conclusion.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 33784b935a54fe6c9d13c65779d10c32d674d3343aa2b51f1d61ff104f7d64c9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "conclusion.fullname" . }}-conclusion
        image: {{ .Values.conclusion.conclusion.image.repository }}:{{ .Values.conclusion.conclusion.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.conclusion.conclusion.imagePullPolicy }}
        name: conclusion
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.conclusion.conclusion.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.conclusion.conclusion.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "conclusion.fullname" . }}-conclusion
  labels:
  {{- include "conclusion.labels" . | nindent 4 }}
spec:
  type: {{ .Values.conclusion.type }}
  selector:
    app.kubernetes.io/instance: conclusion
    app.kubernetes.io/name: relay
  {{- include "conclusion.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.conclusion.ports | toYaml | nindent 2 -}}
conclusion:
  almanacPreach: perspective
  blackboardCalorie: emphasis
  conclusion:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  drag: suspenders
  mainstreamYieldingProsecution: overflight
  medianAcceptable: lonely
  morbid: embassy
  payStatus: knock
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  ratio: scary
  replicas: 1
  reporterQualification: ash
  tourist: carol
  type: ClusterIP
  undergoOverrated: homogenate
kubernetesClusterDomain: cluster.local
