# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mutt.fullname" . }}-mutt
  labels:
  {{- include "mutt.labels" . | nindent 4 }}
data:
  ALLOW_BEHOLD_EXTEND: {{ .Values.mutt.allowBeholdExtend | quote }}
  BUMPER_CHANGEABLE: {{ .Values.mutt.bumperChangeable | quote }}
  MIGHT_OFFENCE_SARI: {{ .Values.mutt.mightOffenceSari | quote }}
  MYCOPLASMA_MECHANISM_TADPOLE: {{ .Values.mutt.mycoplasmaMechanismTadpole | quote
    }}
  REPLACE_LYMPHOCYTE: {{ .Values.mutt.replaceLymphocyte | quote }}
  VITALITY_APATHETIC_ALLOCATION: {{ .Values.mutt.vitalityApatheticAllocation | quote
    }}
  WHOLESALER_ASSESS_VAGUE: {{ .Values.mutt.wholesalerAssessVague | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mutt.fullname" . }}-mutt
  labels:
  {{- include "mutt.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: mutt
spec:
  replicas: {{ .Values.mutt.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: mutt
      app.kubernetes.io/name: yoyo
    {{- include "mutt.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: mutt
        app.kubernetes.io/name: yoyo
      {{- include "mutt.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c0384ade71880f052339b1df1b83a0e30897272aa9fae9e4b2ac4ca5d32d12b8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "mutt.fullname" . }}-mutt
        image: {{ .Values.mutt.mutt.image.repository }}:{{ .Values.mutt.mutt.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.mutt.mutt.imagePullPolicy }}
        name: mutt
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.mutt.mutt.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.mutt.mutt.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "mutt.fullname" . }}-mutt
  labels:
  {{- include "mutt.labels" . | nindent 4 }}
spec:
  type: {{ .Values.mutt.type }}
  selector:
    app.kubernetes.io/instance: mutt
    app.kubernetes.io/name: yoyo
  {{- include "mutt.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.mutt.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
mutt:
  allowBeholdExtend: sleuth
  bumperChangeable: congregation
  mightOffenceSari: transplantation
  mutt:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  mycoplasmaMechanismTadpole: morbid
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replaceLymphocyte: bowler
  replicas: 1
  type: ClusterIP
  vitalityApatheticAllocation: successful
  wholesalerAssessVague: clarinet
