# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "mix.fullname" . }}-mix
  labels:
  {{- include "mix.labels" . | nindent 4 }}
data:
  ALTO: {{ .Values.mix.alto | quote }}
  ANTENNAE_SARONG_ORNAMENT: {{ .Values.mix.antennaeSarongOrnament | quote }}
  CALICO: {{ .Values.mix.calico | quote }}
  CAPTION_SOGGY_SNEEZE: {{ .Values.mix.captionSoggySneeze | quote }}
  DISSEMINATION_BLOODFLOW: {{ .Values.mix.disseminationBloodflow | quote }}
  LIPSTICK_POCKETBOOK: {{ .Values.mix.lipstickPocketbook | quote }}
  MORBIDITY_DIGGER: {{ .Values.mix.morbidityDigger | quote }}
  RAMPANT_CIVILIZATION_ARM: {{ .Values.mix.rampantCivilizationArm | quote }}
  SOFTDRINK_CORRAL: {{ .Values.mix.softdrinkCorral | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mix.fullname" . }}-mix
  labels:
  {{- include "mix.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: mix
spec:
  replicas: {{ .Values.mix.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: mix
      app.kubernetes.io/name: icebreaker
    {{- include "mix.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: mix
        app.kubernetes.io/name: icebreaker
      {{- include "mix.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 86ce56184606906fbfaa5efaaec9d03498a80094361b754b21e5e7ee885f9757
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "mix.fullname" . }}-mix
        image: {{ .Values.mix.mix.image.repository }}:{{ .Values.mix.mix.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.mix.mix.imagePullPolicy }}
        name: mix
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.mix.mix.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.mix.mix.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "mix.fullname" . }}-mix
  labels:
  {{- include "mix.labels" . | nindent 4 }}
spec:
  type: {{ .Values.mix.type }}
  selector:
    app.kubernetes.io/instance: mix
    app.kubernetes.io/name: icebreaker
  {{- include "mix.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.mix.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
mix:
  alto: bush
  antennaeSarongOrnament: fridge
  calico: open
  captionSoggySneeze: excuse
  disseminationBloodflow: undertake
  lipstickPocketbook: pray
  mix:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  morbidityDigger: dapper
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rampantCivilizationArm: eardrum
  replicas: 1
  softdrinkCorral: evolution
  type: ClusterIP
