# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "goodness.fullname" . }}-goodness
  labels:
  {{- include "goodness.labels" . | nindent 4 }}
data:
  COOING_PINEAPPLE_CAT: {{ .Values.goodness.cooingPineappleCat | quote }}
  DIGGING_ACCOUNTING: {{ .Values.goodness.diggingAccounting | quote }}
  LARVA: {{ .Values.goodness.larva | quote }}
  LEARNING_SENDER_TABULATE: {{ .Values.goodness.learningSenderTabulate | quote }}
  MAIL_SWING_RAM: {{ .Values.goodness.mailSwingRam | quote }}
  MANACLE_PROSECUTOR: {{ .Values.goodness.manacleProsecutor | quote }}
  ORIGINATE: {{ .Values.goodness.originate | quote }}
  RESPONSIBILITY: {{ .Values.goodness.responsibility | quote }}
  SCREAMER_INNOCENCE: {{ .Values.goodness.screamerInnocence | quote }}
  SQUEEGEE: {{ .Values.goodness.squeegee | quote }}
  STROKE_SUBSEQUENT_TECTONICS: {{ .Values.goodness.strokeSubsequentTectonics | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "goodness.fullname" . }}-goodness
  labels:
  {{- include "goodness.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: goodness
spec:
  replicas: {{ .Values.goodness.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: goodness
      app.kubernetes.io/name: petition
    {{- include "goodness.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: goodness
        app.kubernetes.io/name: petition
      {{- include "goodness.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: abf45465c31b680909383fed083de5365b57c785af4061d54fe8d2276876609c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "goodness.fullname" . }}-goodness
        image: {{ .Values.goodness.goodness.image.repository }}:{{ .Values.goodness.goodness.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.goodness.goodness.imagePullPolicy }}
        name: goodness
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.goodness.goodness.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.goodness.goodness.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "goodness.fullname" . }}-goodness
  labels:
  {{- include "goodness.labels" . | nindent 4 }}
spec:
  type: {{ .Values.goodness.type }}
  selector:
    app.kubernetes.io/instance: goodness
    app.kubernetes.io/name: petition
  {{- include "goodness.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.goodness.ports | toYaml | nindent 2 -}}
goodness:
  cooingPineappleCat: strange
  diggingAccounting: smiling
  goodness:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  larva: throw
  learningSenderTabulate: bookmark
  mailSwingRam: spawn
  manacleProsecutor: nominate
  originate: tight
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  responsibility: wagon
  screamerInnocence: futon
  squeegee: culvert
  strokeSubsequentTectonics: industrialisation
  type: ClusterIP
kubernetesClusterDomain: cluster.local
