# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "pot.fullname" . }}-pot
  labels:
  {{- include "pot.labels" . | nindent 4 }}
data:
  EVOCATION: {{ .Values.pot.evocation | quote }}
  FREON_FISH_GROW: {{ .Values.pot.freonFishGrow | quote }}
  MIRROR_INTESTINE: {{ .Values.pot.mirrorIntestine | quote }}
  SAUCER_BURRO: {{ .Values.pot.saucerBurro | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "pot.fullname" . }}-pot
  labels:
  {{- include "pot.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: pot
spec:
  replicas: {{ .Values.pot.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: pot
      app.kubernetes.io/name: stump
    {{- include "pot.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: pot
        app.kubernetes.io/name: stump
      {{- include "pot.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 16873f2acf09ff8e90a930cec2129879e0390886f2719f01bc158378f10ddbf3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "pot.fullname" . }}-pot
        image: {{ .Values.pot.pot.image.repository }}:{{ .Values.pot.pot.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.pot.pot.imagePullPolicy }}
        name: pot
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.pot.pot.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.pot.pot.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pot.fullname" . }}-pot
  labels:
  {{- include "pot.labels" . | nindent 4 }}
spec:
  type: {{ .Values.pot.type }}
  selector:
    app.kubernetes.io/instance: pot
    app.kubernetes.io/name: stump
  {{- include "pot.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.pot.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
pot:
  evocation: noodles
  freonFishGrow: nightgown
  mirrorIntestine: dish
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pot:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  saucerBurro: interfere
  type: ClusterIP
