# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "alibi.fullname" . }}-alibi
  labels:
  {{- include "alibi.labels" . | nindent 4 }}
data:
  APPRECIATE_DAME: {{ .Values.alibi.appreciateDame | quote }}
  BACK_NIGHTMARE: {{ .Values.alibi.backNightmare | quote }}
  BASIN: {{ .Values.alibi.basin | quote }}
  CHILDHOOD_PSYCHOLOGIST_FIRST: {{ .Values.alibi.childhoodPsychologistFirst | quote
    }}
  FULFILLMENT: {{ .Values.alibi.fulfillment | quote }}
  LAPDOG: {{ .Values.alibi.lapdog | quote }}
  MAJESTIC: {{ .Values.alibi.majestic | quote }}
  PROTEIN_ATTACH_TOILET: {{ .Values.alibi.proteinAttachToilet | quote }}
  SALON: {{ .Values.alibi.salon | quote }}
  SKIP_PSYCHEDELIC: {{ .Values.alibi.skipPsychedelic | quote }}
  SUPPER_DARN_ZOOT-SUIT: {{ .Values.alibi.supperDarnZootSuit | quote }}
  WELL_GRUESOME_CLAP: {{ .Values.alibi.wellGruesomeClap | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "alibi.fullname" . }}-alibi
  labels:
  {{- include "alibi.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: alibi
spec:
  replicas: {{ .Values.alibi.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: alibi
      app.kubernetes.io/name: celebrity
    {{- include "alibi.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: alibi
        app.kubernetes.io/name: celebrity
      {{- include "alibi.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f167f329f211c26acc7d78a4a0fe69c80537d49b5af41ed3c268298dc04e8bdf
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "alibi.fullname" . }}-alibi
        image: {{ .Values.alibi.alibi.image.repository }}:{{ .Values.alibi.alibi.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.alibi.alibi.imagePullPolicy }}
        name: alibi
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.alibi.alibi.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.alibi.alibi.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "alibi.fullname" . }}-alibi
  labels:
  {{- include "alibi.labels" . | nindent 4 }}
spec:
  type: {{ .Values.alibi.type }}
  selector:
    app.kubernetes.io/instance: alibi
    app.kubernetes.io/name: celebrity
  {{- include "alibi.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.alibi.ports | toYaml | nindent 2 -}}
alibi:
  alibi:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  appreciateDame: ceramics
  backNightmare: wipe
  basin: subconscious
  childhoodPsychologistFirst: make
  fulfillment: attraction
  lapdog: baker
  majestic: teller
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proteinAttachToilet: ball
  replicas: 1
  salon: consulate
  skipPsychedelic: independent
  supperDarnZootSuit: tiger
  type: ClusterIP
  wellGruesomeClap: blazer
kubernetesClusterDomain: cluster.local
