# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "coverage.fullname" . }}-coverage
  labels:
  {{- include "coverage.labels" . | nindent 4 }}
data:
  ANTLING_LIMB_FOX: {{ .Values.coverage.antlingLimbFox | quote }}
  FOB_TREMBLE: {{ .Values.coverage.fobTremble | quote }}
  SHAGGY_DISAPPOINTMENT_SPECULATION: {{ .Values.coverage.shaggyDisappointmentSpeculation
    | quote }}
  SYRUP: {{ .Values.coverage.syrup | quote }}
  YAM_EYELID: {{ .Values.coverage.yamEyelid | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "coverage.fullname" . }}-coverage
  labels:
  {{- include "coverage.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: coverage
spec:
  replicas: {{ .Values.coverage.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: coverage
      app.kubernetes.io/name: contention
    {{- include "coverage.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: coverage
        app.kubernetes.io/name: contention
      {{- include "coverage.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7904627d0bdcb95cf393dadcf278b25652e8c1cb5a3f6c4ef6309dfb3dd82f96
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "coverage.fullname" . }}-coverage
        image: {{ .Values.coverage.coverage.image.repository }}:{{ .Values.coverage.coverage.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.coverage.coverage.imagePullPolicy }}
        name: coverage
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.coverage.coverage.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.coverage.coverage.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "coverage.fullname" . }}-coverage
  labels:
  {{- include "coverage.labels" . | nindent 4 }}
spec:
  type: {{ .Values.coverage.type }}
  selector:
    app.kubernetes.io/instance: coverage
    app.kubernetes.io/name: contention
  {{- include "coverage.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.coverage.ports | toYaml | nindent 2 -}}
coverage:
  antlingLimbFox: tortoise
  coverage:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  fobTremble: valley
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shaggyDisappointmentSpeculation: stock
  syrup: lathe
  type: ClusterIP
  yamEyelid: patriarch
kubernetesClusterDomain: cluster.local
