# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "allergist.fullname" . }}-allergist
  labels:
  {{- include "allergist.labels" . | nindent 4 }}
data:
  ALPHA_LACKING: {{ .Values.allergist.alphaLacking | quote }}
  NETWORKING_LONGITUDE_BELLIGERENT: {{ .Values.allergist.networkingLongitudeBelligerent
    | quote }}
  RATTY_LIST: {{ .Values.allergist.rattyList | quote }}
  REINDEER_STONEWORK_HURT: {{ .Values.allergist.reindeerStoneworkHurt | quote }}
  RESERVATION: {{ .Values.allergist.reservation | quote }}
  SIMPLIFICATION: {{ .Values.allergist.simplification | quote }}
  SORT_JET: {{ .Values.allergist.sortJet | quote }}
  TUBA: {{ .Values.allergist.tuba | quote }}
  TYPEFACE_WALKWAY: {{ .Values.allergist.typefaceWalkway | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "allergist.fullname" . }}-allergist
  labels:
  {{- include "allergist.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: allergist
spec:
  replicas: {{ .Values.allergist.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: allergist
      app.kubernetes.io/name: contact
    {{- include "allergist.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: allergist
        app.kubernetes.io/name: contact
      {{- include "allergist.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 97f3ca7a33591429d6f524c9a057e18aafaad2fd8a239db78ced4e2e32779453
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "allergist.fullname" . }}-allergist
        image: {{ .Values.allergist.allergist.image.repository }}:{{ .Values.allergist.allergist.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.allergist.allergist.imagePullPolicy }}
        name: allergist
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.allergist.allergist.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.allergist.allergist.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "allergist.fullname" . }}-allergist
  labels:
  {{- include "allergist.labels" . | nindent 4 }}
spec:
  type: {{ .Values.allergist.type }}
  selector:
    app.kubernetes.io/instance: allergist
    app.kubernetes.io/name: contact
  {{- include "allergist.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.allergist.ports | toYaml | nindent 2 -}}
allergist:
  allergist:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  alphaLacking: clearance
  networkingLongitudeBelligerent: plenty
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rattyList: fisting
  reindeerStoneworkHurt: tentacle
  replicas: 1
  reservation: ahead
  simplification: effect
  sortJet: momentous
  tuba: kilometer
  type: ClusterIP
  typefaceWalkway: barbeque
kubernetesClusterDomain: cluster.local
