# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "indigence.fullname" . }}-indigence
  labels:
  {{- include "indigence.labels" . | nindent 4 }}
data:
  ABOLISHMENT_AIRCRAFT: {{ .Values.indigence.abolishmentAircraft | quote }}
  ARENA_COMPULSION: {{ .Values.indigence.arenaCompulsion | quote }}
  BET_PSYCHOTIC_RACING: {{ .Values.indigence.betPsychoticRacing | quote }}
  ECONOMICS: {{ .Values.indigence.economics | quote }}
  EMANATE_PRESCRIPTION: {{ .Values.indigence.emanatePrescription | quote }}
  MOB_THERAPEUTIC_SHELL: {{ .Values.indigence.mobTherapeuticShell | quote }}
  TELL_VACCINE_MEANING: {{ .Values.indigence.tellVaccineMeaning | quote }}
  THRIFT: {{ .Values.indigence.thrift | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "indigence.fullname" . }}-indigence
  labels:
  {{- include "indigence.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: indigence
spec:
  replicas: {{ .Values.indigence.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: indigence
      app.kubernetes.io/name: puny
    {{- include "indigence.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: indigence
        app.kubernetes.io/name: puny
      {{- include "indigence.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 78bd6bb59079909b94106465bfb10e3767fb1ac6f59cc8b50d0caca6f4f29695
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "indigence.fullname" . }}-indigence
        image: {{ .Values.indigence.indigence.image.repository }}:{{ .Values.indigence.indigence.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.indigence.indigence.imagePullPolicy }}
        name: indigence
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.indigence.indigence.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.indigence.indigence.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "indigence.fullname" . }}-indigence
  labels:
  {{- include "indigence.labels" . | nindent 4 }}
spec:
  type: {{ .Values.indigence.type }}
  selector:
    app.kubernetes.io/instance: indigence
    app.kubernetes.io/name: puny
  {{- include "indigence.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.indigence.ports | toYaml | nindent 2 -}}
indigence:
  abolishmentAircraft: cliff
  arenaCompulsion: spectrograph
  betPsychoticRacing: abdomen
  economics: method
  emanatePrescription: visa
  indigence:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  mobTherapeuticShell: accomplish
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tellVaccineMeaning: gallery
  thrift: continent
  type: ClusterIP
kubernetesClusterDomain: cluster.local
