# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fax.fullname" . }}-fax
  labels:
  {{- include "fax.labels" . | nindent 4 }}
data:
  CONSIGNMENT: {{ .Values.fax.consignment | quote }}
  DIVISION: {{ .Values.fax.division | quote }}
  FORM_PING_STEADY: {{ .Values.fax.formPingSteady | quote }}
  FULFILLMENT_PENNY_MIME: {{ .Values.fax.fulfillmentPennyMime | quote }}
  GIFTED_DISPOSAL_TENDER: {{ .Values.fax.giftedDisposalTender | quote }}
  HEATER: {{ .Values.fax.heater | quote }}
  MANIAC: {{ .Values.fax.maniac | quote }}
  PICKET_SECURITY_WORD: {{ .Values.fax.picketSecurityWord | quote }}
  REFRIGERATOR_EVOLUTION_SEXUALITY: {{ .Values.fax.refrigeratorEvolutionSexuality
    | quote }}
  SILVER: {{ .Values.fax.silver | quote }}
  STORMY: {{ .Values.fax.stormy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fax.fullname" . }}-fax
  labels:
  {{- include "fax.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fax
spec:
  replicas: {{ .Values.fax.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fax
      app.kubernetes.io/name: wife
    {{- include "fax.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fax
        app.kubernetes.io/name: wife
      {{- include "fax.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 832a31c9d366a58d3d641bb92121ec84a77bf69b682ab9d919b963287dcdaad4
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fax.fullname" . }}-fax
        image: {{ .Values.fax.fax.image.repository }}:{{ .Values.fax.fax.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fax.fax.imagePullPolicy }}
        name: fax
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fax.fax.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fax.fax.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fax.fullname" . }}-fax
  labels:
  {{- include "fax.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fax.type }}
  selector:
    app.kubernetes.io/instance: fax
    app.kubernetes.io/name: wife
  {{- include "fax.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fax.ports | toYaml | nindent 2 -}}
fax:
  consignment: cygnet
  division: tutu
  fax:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  formPingSteady: arithmetic
  fulfillmentPennyMime: shed
  giftedDisposalTender: cacao
  heater: heyday
  maniac: bakeware
  picketSecurityWord: slippery
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  refrigeratorEvolutionSexuality: error
  replicas: 1
  silver: seizure
  stormy: synonym
  type: ClusterIP
kubernetesClusterDomain: cluster.local
