# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lunch.fullname" . }}-lunch
  labels:
  {{- include "lunch.labels" . | nindent 4 }}
data:
  AID_LEGACY_MACABRE: {{ .Values.lunch.aidLegacyMacabre | quote }}
  EFFICIENCY_FRESH_DERBY: {{ .Values.lunch.efficiencyFreshDerby | quote }}
  EXAMINATION: {{ .Values.lunch.examination | quote }}
  EXASPERATION_AUTHORITY: {{ .Values.lunch.exasperationAuthority | quote }}
  HUTCH: {{ .Values.lunch.hutch | quote }}
  INSTRUCTOR_MUSSEL_FERRET: {{ .Values.lunch.instructorMusselFerret | quote }}
  PROGENITOR_WORKING: {{ .Values.lunch.progenitorWorking | quote }}
  UNDERSHIRT_DARKNESS_SOFTWARE: {{ .Values.lunch.undershirtDarknessSoftware | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lunch.fullname" . }}-lunch
  labels:
  {{- include "lunch.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lunch
spec:
  replicas: {{ .Values.lunch.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lunch
      app.kubernetes.io/name: artichoke
    {{- include "lunch.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lunch
        app.kubernetes.io/name: artichoke
      {{- include "lunch.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 30cf09e7b7c39c78da8fe63eb252fedac6124a11577990d187454792799d0fc7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lunch.fullname" . }}-lunch
        image: {{ .Values.lunch.lunch.image.repository }}:{{ .Values.lunch.lunch.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lunch.lunch.imagePullPolicy }}
        name: lunch
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lunch.lunch.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lunch.lunch.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lunch.fullname" . }}-lunch
  labels:
  {{- include "lunch.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lunch.type }}
  selector:
    app.kubernetes.io/instance: lunch
    app.kubernetes.io/name: artichoke
  {{- include "lunch.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lunch.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lunch:
  aidLegacyMacabre: poker
  efficiencyFreshDerby: loading
  examination: matter
  exasperationAuthority: awake
  hutch: discourse
  instructorMusselFerret: sordid
  lunch:
    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
  progenitorWorking: moonlight
  replicas: 1
  type: ClusterIP
  undershirtDarknessSoftware: jewellery
