# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "misspell.fullname" . }}-misspell
  labels:
  {{- include "misspell.labels" . | nindent 4 }}
data:
  CHUNKY_WASTEBASKET: {{ .Values.misspell.chunkyWastebasket | quote }}
  CILANTRO_PLANNING_SECTIONAL: {{ .Values.misspell.cilantroPlanningSectional | quote
    }}
  HEAL: {{ .Values.misspell.heal | quote }}
  INSOLENCE: {{ .Values.misspell.insolence | quote }}
  MECHANIC_FLOWERY: {{ .Values.misspell.mechanicFlowery | quote }}
  MOTORCYCLE_AUTOIMMUNITY_BLOSSOM: {{ .Values.misspell.motorcycleAutoimmunityBlossom
    | quote }}
  PARTICULAR: {{ .Values.misspell.particular | quote }}
  REDUCE_STENCH: {{ .Values.misspell.reduceStench | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "misspell.fullname" . }}-misspell
  labels:
  {{- include "misspell.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: misspell
spec:
  replicas: {{ .Values.misspell.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: misspell
      app.kubernetes.io/name: noise
    {{- include "misspell.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: misspell
        app.kubernetes.io/name: noise
      {{- include "misspell.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0b3c472c56ec4698ea661d1dd3901bd758efe775adfcc141279b1ef27d5a3b80
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "misspell.fullname" . }}-misspell
        image: {{ .Values.misspell.misspell.image.repository }}:{{ .Values.misspell.misspell.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.misspell.misspell.imagePullPolicy }}
        name: misspell
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.misspell.misspell.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.misspell.misspell.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "misspell.fullname" . }}-misspell
  labels:
  {{- include "misspell.labels" . | nindent 4 }}
spec:
  type: {{ .Values.misspell.type }}
  selector:
    app.kubernetes.io/instance: misspell
    app.kubernetes.io/name: noise
  {{- include "misspell.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.misspell.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
misspell:
  chunkyWastebasket: chopstick
  cilantroPlanningSectional: accusation
  heal: harmonica
  insolence: tone
  mechanicFlowery: underground
  misspell:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  motorcycleAutoimmunityBlossom: consistency
  particular: singular
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  reduceStench: glen
  replicas: 1
  type: ClusterIP
