# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "muddle.fullname" . }}-muddle
  labels:
  {{- include "muddle.labels" . | nindent 4 }}
data:
  ELECTRONICS_PANNIER_MINDLESS: {{ .Values.muddle.electronicsPannierMindless | quote
    }}
  FOOTAGE_INTEGER_DESCRIBE: {{ .Values.muddle.footageIntegerDescribe | quote }}
  MOANING_FLAKY: {{ .Values.muddle.moaningFlaky | quote }}
  PIANO: {{ .Values.muddle.piano | quote }}
  SEE_SAMURAI_PRESET: {{ .Values.muddle.seeSamuraiPreset | quote }}
  SQUEAK: {{ .Values.muddle.squeak | quote }}
  STEM_SNEAKER_SELF-ESTEEM: {{ .Values.muddle.stemSneakerSelfEsteem | quote }}
  WOODSHED_YACHT_POINT: {{ .Values.muddle.woodshedYachtPoint | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "muddle.fullname" . }}-muddle
  labels:
  {{- include "muddle.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: muddle
spec:
  replicas: {{ .Values.muddle.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: muddle
      app.kubernetes.io/name: error
    {{- include "muddle.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: muddle
        app.kubernetes.io/name: error
      {{- include "muddle.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8c98d32a68172fb8bfd5e90afc50e56af75399566c3692c17e359bc607a6b086
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "muddle.fullname" . }}-muddle
        image: {{ .Values.muddle.muddle.image.repository }}:{{ .Values.muddle.muddle.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.muddle.muddle.imagePullPolicy }}
        name: muddle
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.muddle.muddle.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.muddle.muddle.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "muddle.fullname" . }}-muddle
  labels:
  {{- include "muddle.labels" . | nindent 4 }}
spec:
  type: {{ .Values.muddle.type }}
  selector:
    app.kubernetes.io/instance: muddle
    app.kubernetes.io/name: error
  {{- include "muddle.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.muddle.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
muddle:
  electronicsPannierMindless: savory
  footageIntegerDescribe: plot
  moaningFlaky: end
  muddle:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  piano: disconnection
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  seeSamuraiPreset: craven
  squeak: odd
  stemSneakerSelfEsteem: exist
  type: ClusterIP
  woodshedYachtPoint: prosperity
