# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "screening.fullname" . }}-screening
  labels:
  {{- include "screening.labels" . | nindent 4 }}
data:
  DELICIOUS_HARMONICA: {{ .Values.screening.deliciousHarmonica | quote }}
  FOREGO: {{ .Values.screening.forego | quote }}
  HYACINTH_INSPIRATION_RAINMAKER: {{ .Values.screening.hyacinthInspirationRainmaker
    | quote }}
  INCONVENIENCE: {{ .Values.screening.inconvenience | quote }}
  LEADERSHIP_COLESLAW_PRESET: {{ .Values.screening.leadershipColeslawPreset | quote
    }}
  MINIMUM_THONG: {{ .Values.screening.minimumThong | quote }}
  PUBLIC_GOODNESS_ABBREVIATION: {{ .Values.screening.publicGoodnessAbbreviation |
    quote }}
  SHOEHORN_BROWSING: {{ .Values.screening.shoehornBrowsing | quote }}
  STREET: {{ .Values.screening.street | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "screening.fullname" . }}-screening
  labels:
  {{- include "screening.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: screening
spec:
  replicas: {{ .Values.screening.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: screening
      app.kubernetes.io/name: bump
    {{- include "screening.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: screening
        app.kubernetes.io/name: bump
      {{- include "screening.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 466e227006601560ea080b8e7c31d84efe30f28f2eada17f2df6ba8675e49c9a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "screening.fullname" . }}-screening
        image: {{ .Values.screening.screening.image.repository }}:{{ .Values.screening.screening.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.screening.screening.imagePullPolicy }}
        name: screening
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.screening.screening.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.screening.screening.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "screening.fullname" . }}-screening
  labels:
  {{- include "screening.labels" . | nindent 4 }}
spec:
  type: {{ .Values.screening.type }}
  selector:
    app.kubernetes.io/instance: screening
    app.kubernetes.io/name: bump
  {{- include "screening.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.screening.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
screening:
  deliciousHarmonica: stacking
  forego: dance
  hyacinthInspirationRainmaker: somersault
  inconvenience: pilaf
  leadershipColeslawPreset: surname
  minimumThong: obsession
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  publicGoodnessAbbreviation: divider
  replicas: 1
  screening:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  shoehornBrowsing: firewall
  street: popsicle
  type: ClusterIP
