# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cat.fullname" . }}-cat
  labels:
  {{- include "cat.labels" . | nindent 4 }}
data:
  BOIL_FORTRESS_COKE: {{ .Values.cat.boilFortressCoke | quote }}
  DREAMER_TURNOVER_DIPSTICK: {{ .Values.cat.dreamerTurnoverDipstick | quote }}
  EAVES_HUM: {{ .Values.cat.eavesHum | quote }}
  FOREBEAR_BLOUSE_FASCIA: {{ .Values.cat.forebearBlouseFascia | quote }}
  GHOST: {{ .Values.cat.ghost | quote }}
  INSPIRE_WARMTH: {{ .Values.cat.inspireWarmth | quote }}
  MOTHER_TUITION_FAN: {{ .Values.cat.motherTuitionFan | quote }}
  ROOM: {{ .Values.cat.room | quote }}
  SPORTSMAN_UTTER: {{ .Values.cat.sportsmanUtter | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cat.fullname" . }}-cat
  labels:
  {{- include "cat.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cat
spec:
  replicas: {{ .Values.cat.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cat
      app.kubernetes.io/name: mushy
    {{- include "cat.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cat
        app.kubernetes.io/name: mushy
      {{- include "cat.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0efbdeb0089b10ba9bcd6bb398b427f8617498bc45b3091c07f62d5d64a60eb9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cat.fullname" . }}-cat
        image: {{ .Values.cat.cat.image.repository }}:{{ .Values.cat.cat.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cat.cat.imagePullPolicy }}
        name: cat
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cat.cat.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cat.cat.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cat.fullname" . }}-cat
  labels:
  {{- include "cat.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cat.type }}
  selector:
    app.kubernetes.io/instance: cat
    app.kubernetes.io/name: mushy
  {{- include "cat.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cat.ports | toYaml | nindent 2 -}}
cat:
  boilFortressCoke: mink
  cat:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  dreamerTurnoverDipstick: deadpan
  eavesHum: rocket
  forebearBlouseFascia: steward
  ghost: medicine
  inspireWarmth: aquifer
  motherTuitionFan: talking
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  room: prayer
  sportsmanUtter: jolly
  type: ClusterIP
kubernetesClusterDomain: cluster.local
