# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dispensable.fullname" . }}-dispensable
  labels:
  {{- include "dispensable.labels" . | nindent 4 }}
data:
  ARMREST_CERTIFICATION: {{ .Values.dispensable.armrestCertification | quote }}
  AVENUE: {{ .Values.dispensable.avenue | quote }}
  BOUNDLESS: {{ .Values.dispensable.boundless | quote }}
  CYCLONE: {{ .Values.dispensable.cyclone | quote }}
  DIAGNOSIS_XYLOPHONE: {{ .Values.dispensable.diagnosisXylophone | quote }}
  HIKE_SAKE: {{ .Values.dispensable.hikeSake | quote }}
  MOUSE: {{ .Values.dispensable.mouse | quote }}
  PHENOMENON_CARPET_MEATBALL: {{ .Values.dispensable.phenomenonCarpetMeatball | quote
    }}
  RESOLUTE: {{ .Values.dispensable.resolute | quote }}
  SCULPTURAL_STORYBOARD: {{ .Values.dispensable.sculpturalStoryboard | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dispensable.fullname" . }}-dispensable
  labels:
  {{- include "dispensable.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dispensable
spec:
  replicas: {{ .Values.dispensable.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dispensable
      app.kubernetes.io/name: airbus
    {{- include "dispensable.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dispensable
        app.kubernetes.io/name: airbus
      {{- include "dispensable.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f0a0df4424c747cc0f25f7540827bc8ba86d1aadff8ccd03e2b9e78b71585a99
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dispensable.fullname" . }}-dispensable
        image: {{ .Values.dispensable.dispensable.image.repository }}:{{ .Values.dispensable.dispensable.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dispensable.dispensable.imagePullPolicy }}
        name: dispensable
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dispensable.dispensable.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dispensable.dispensable.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dispensable.fullname" . }}-dispensable
  labels:
  {{- include "dispensable.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dispensable.type }}
  selector:
    app.kubernetes.io/instance: dispensable
    app.kubernetes.io/name: airbus
  {{- include "dispensable.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dispensable.ports | toYaml | nindent 2 -}}
dispensable:
  armrestCertification: belfry
  avenue: legislation
  boundless: piety
  cyclone: rotten
  diagnosisXylophone: ectodermal
  dispensable:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  hikeSake: aquifer
  mouse: tritone
  phenomenonCarpetMeatball: amount
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  resolute: amount
  sculpturalStoryboard: footage
  type: ClusterIP
kubernetesClusterDomain: cluster.local
