# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "prompt.fullname" . }}-prompt
  labels:
  {{- include "prompt.labels" . | nindent 4 }}
data:
  CELERY_TRAPEZOID_COMPLICITY: {{ .Values.prompt.celeryTrapezoidComplicity | quote
    }}
  DEMONIC: {{ .Values.prompt.demonic | quote }}
  FOREVER_PATENT: {{ .Values.prompt.foreverPatent | quote }}
  MATCHMAKER_SEAPLANE_CLAW: {{ .Values.prompt.matchmakerSeaplaneClaw | quote }}
  METEOROLOGY_CITRUS_SUBJECT: {{ .Values.prompt.meteorologyCitrusSubject | quote
    }}
  SHELL_GRAY: {{ .Values.prompt.shellGray | quote }}
  SUPPORTER_HARMONICA_MORTISE: {{ .Values.prompt.supporterHarmonicaMortise | quote
    }}
  TIGHTS_DROP: {{ .Values.prompt.tightsDrop | quote }}
  WHISPER_WINGTIP_SLASH: {{ .Values.prompt.whisperWingtipSlash | quote }}
  WOODCHUCK_DELIVER_CONDITION: {{ .Values.prompt.woodchuckDeliverCondition | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "prompt.fullname" . }}-prompt
  labels:
  {{- include "prompt.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: prompt
spec:
  replicas: {{ .Values.prompt.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: prompt
      app.kubernetes.io/name: founding
    {{- include "prompt.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: prompt
        app.kubernetes.io/name: founding
      {{- include "prompt.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 89adc8c75eceb51343aecd4ffee183868bbd30b02e5a0fd211ccb783d1d7652f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "prompt.fullname" . }}-prompt
        image: {{ .Values.prompt.prompt.image.repository }}:{{ .Values.prompt.prompt.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.prompt.prompt.imagePullPolicy }}
        name: prompt
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.prompt.prompt.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.prompt.prompt.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "prompt.fullname" . }}-prompt
  labels:
  {{- include "prompt.labels" . | nindent 4 }}
spec:
  type: {{ .Values.prompt.type }}
  selector:
    app.kubernetes.io/instance: prompt
    app.kubernetes.io/name: founding
  {{- include "prompt.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.prompt.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
prompt:
  celeryTrapezoidComplicity: agent
  demonic: vast
  foreverPatent: defense
  matchmakerSeaplaneClaw: tuition
  meteorologyCitrusSubject: preoccupation
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prompt:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  shellGray: bake
  supporterHarmonicaMortise: cummerbund
  tightsDrop: disguise
  type: ClusterIP
  whisperWingtipSlash: lollipop
  woodchuckDeliverCondition: mile
