# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "elderly.fullname" . }}-elderly
  labels:
  {{- include "elderly.labels" . | nindent 4 }}
data:
  BULK_GUARDED_CILANTRO: {{ .Values.elderly.bulkGuardedCilantro | quote }}
  CIGARETTE_PEEP: {{ .Values.elderly.cigarettePeep | quote }}
  DEAD_AIRFARE_MUSKRAT: {{ .Values.elderly.deadAirfareMuskrat | quote }}
  LEGISLATION_BUTANE_COLISEUM: {{ .Values.elderly.legislationButaneColiseum | quote
    }}
  NEUROBIOLOGIST: {{ .Values.elderly.neurobiologist | quote }}
  PLACEMENT_TRANSITION: {{ .Values.elderly.placementTransition | quote }}
  PROXIMITY_HANDRAIL_GREASY: {{ .Values.elderly.proximityHandrailGreasy | quote }}
  SCINTILLATING: {{ .Values.elderly.scintillating | quote }}
  SENATE: {{ .Values.elderly.senate | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "elderly.fullname" . }}-elderly
  labels:
  {{- include "elderly.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: elderly
spec:
  replicas: {{ .Values.elderly.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: elderly
      app.kubernetes.io/name: digestion
    {{- include "elderly.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: elderly
        app.kubernetes.io/name: digestion
      {{- include "elderly.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5b37148058d265a30fbc7901d24bc32548a5968839e2bbfbd87e3bf61469ad83
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "elderly.fullname" . }}-elderly
        image: {{ .Values.elderly.elderly.image.repository }}:{{ .Values.elderly.elderly.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.elderly.elderly.imagePullPolicy }}
        name: elderly
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.elderly.elderly.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.elderly.elderly.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "elderly.fullname" . }}-elderly
  labels:
  {{- include "elderly.labels" . | nindent 4 }}
spec:
  type: {{ .Values.elderly.type }}
  selector:
    app.kubernetes.io/instance: elderly
    app.kubernetes.io/name: digestion
  {{- include "elderly.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.elderly.ports | toYaml | nindent 2 -}}
elderly:
  bulkGuardedCilantro: chair
  cigarettePeep: partridge
  deadAirfareMuskrat: grape
  elderly:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  legislationButaneColiseum: eliminate
  neurobiologist: tube
  placementTransition: anesthesiology
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  proximityHandrailGreasy: confusion
  replicas: 1
  scintillating: domineering
  senate: ejector
  type: ClusterIP
kubernetesClusterDomain: cluster.local
