# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "plot.fullname" . }}-plot
  labels:
  {{- include "plot.labels" . | nindent 4 }}
data:
  DECISION-MAKING_PARENTING: {{ .Values.plot.decisionMakingParenting | quote }}
  EVALUATOR_ZIGGURAT: {{ .Values.plot.evaluatorZiggurat | quote }}
  GREEN_MARIACHI_APPLICATION: {{ .Values.plot.greenMariachiApplication | quote }}
  LIVE_ULTRA: {{ .Values.plot.liveUltra | quote }}
  VETERINARIAN_VANISH_WANDER: {{ .Values.plot.veterinarianVanishWander | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "plot.fullname" . }}-plot
  labels:
  {{- include "plot.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: plot
spec:
  replicas: {{ .Values.plot.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: plot
      app.kubernetes.io/name: allow
    {{- include "plot.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: plot
        app.kubernetes.io/name: allow
      {{- include "plot.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 76d16ded440d7243503172cbc1ee7ea12a8b5a0bbba177267b87392fb05eba33
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "plot.fullname" . }}-plot
        image: {{ .Values.plot.plot.image.repository }}:{{ .Values.plot.plot.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.plot.plot.imagePullPolicy }}
        name: plot
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.plot.plot.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.plot.plot.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "plot.fullname" . }}-plot
  labels:
  {{- include "plot.labels" . | nindent 4 }}
spec:
  type: {{ .Values.plot.type }}
  selector:
    app.kubernetes.io/instance: plot
    app.kubernetes.io/name: allow
  {{- include "plot.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.plot.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
plot:
  decisionMakingParenting: guitarist
  evaluatorZiggurat: innocence
  greenMariachiApplication: wake
  liveUltra: treasure
  plot:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
  veterinarianVanishWander: forelimb
