# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "existence.fullname" . }}-existence
  labels:
  {{- include "existence.labels" . | nindent 4 }}
data:
  BITTER_OSPREY_WHIMSICAL: {{ .Values.existence.bitterOspreyWhimsical | quote }}
  INJUSTICE_HONEYDEW: {{ .Values.existence.injusticeHoneydew | quote }}
  LEFT: {{ .Values.existence.left | quote }}
  MARKETER: {{ .Values.existence.marketer | quote }}
  RECONDITE: {{ .Values.existence.recondite | quote }}
  SUCKER: {{ .Values.existence.sucker | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "existence.fullname" . }}-existence
  labels:
  {{- include "existence.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: existence
spec:
  replicas: {{ .Values.existence.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: existence
      app.kubernetes.io/name: beaver
    {{- include "existence.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: existence
        app.kubernetes.io/name: beaver
      {{- include "existence.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5f4d13c898fb55b776d179bc3856b57282ef3fb4e8b345f03c08b4aaad815233
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "existence.fullname" . }}-existence
        image: {{ .Values.existence.existence.image.repository }}:{{ .Values.existence.existence.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.existence.existence.imagePullPolicy }}
        name: existence
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.existence.existence.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.existence.existence.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "existence.fullname" . }}-existence
  labels:
  {{- include "existence.labels" . | nindent 4 }}
spec:
  type: {{ .Values.existence.type }}
  selector:
    app.kubernetes.io/instance: existence
    app.kubernetes.io/name: beaver
  {{- include "existence.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.existence.ports | toYaml | nindent 2 -}}
existence:
  bitterOspreyWhimsical: colonial
  existence:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  injusticeHoneydew: jealous
  left: acquire
  marketer: explosion
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  recondite: gel
  replicas: 1
  sucker: coherent
  type: ClusterIP
kubernetesClusterDomain: cluster.local
