# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "shallow.fullname" . }}-shallow
  labels:
  {{- include "shallow.labels" . | nindent 4 }}
data:
  ANESTHESIOLOGIST_TURNING: {{ .Values.shallow.anesthesiologistTurning | quote }}
  DELAY: {{ .Values.shallow.delay | quote }}
  EVENING: {{ .Values.shallow.evening | quote }}
  GOODWILL_EAR_GAS: {{ .Values.shallow.goodwillEarGas | quote }}
  GRUMPY_RADIATOR_PLANET: {{ .Values.shallow.grumpyRadiatorPlanet | quote }}
  OBEY_WATERFALL: {{ .Values.shallow.obeyWaterfall | quote }}
  POUCH_DUE: {{ .Values.shallow.pouchDue | quote }}
  RAG_QUACK: {{ .Values.shallow.ragQuack | quote }}
  SINGER_PEN: {{ .Values.shallow.singerPen | quote }}
  SUNSHINE: {{ .Values.shallow.sunshine | quote }}
  VERB_GRASS: {{ .Values.shallow.verbGrass | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "shallow.fullname" . }}-shallow
  labels:
  {{- include "shallow.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: shallow
spec:
  replicas: {{ .Values.shallow.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: shallow
      app.kubernetes.io/name: shearling
    {{- include "shallow.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: shallow
        app.kubernetes.io/name: shearling
      {{- include "shallow.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: af3984dc8209caa74a40680d114484e26014edf0f3ecb0e51e7731abecafbf15
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "shallow.fullname" . }}-shallow
        image: {{ .Values.shallow.shallow.image.repository }}:{{ .Values.shallow.shallow.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.shallow.shallow.imagePullPolicy }}
        name: shallow
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.shallow.shallow.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.shallow.shallow.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "shallow.fullname" . }}-shallow
  labels:
  {{- include "shallow.labels" . | nindent 4 }}
spec:
  type: {{ .Values.shallow.type }}
  selector:
    app.kubernetes.io/instance: shallow
    app.kubernetes.io/name: shearling
  {{- include "shallow.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.shallow.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
shallow:
  anesthesiologistTurning: appellation
  delay: lycra
  evening: faith
  goodwillEarGas: blizzard
  grumpyRadiatorPlanet: decisive
  obeyWaterfall: millet
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pouchDue: summit
  ragQuack: tapioca
  replicas: 1
  shallow:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  singerPen: procedure
  sunshine: fatigues
  type: ClusterIP
  verbGrass: linguistics
