# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "banking.fullname" . }}-banking
  labels:
  {{- include "banking.labels" . | nindent 4 }}
data:
  BUREAU: {{ .Values.banking.bureau | quote }}
  BURRO_DECRYPTION: {{ .Values.banking.burroDecryption | quote }}
  CHOP: {{ .Values.banking.chop | quote }}
  COUNT: {{ .Values.banking.count | quote }}
  INTUITION_CREDITOR_MASTICATION: {{ .Values.banking.intuitionCreditorMastication
    | quote }}
  NUMBERLESS_LATITUDE: {{ .Values.banking.numberlessLatitude | quote }}
  REPLICATION: {{ .Values.banking.replication | quote }}
  SALAMI: {{ .Values.banking.salami | quote }}
  SAUSAGE_CARAVAN: {{ .Values.banking.sausageCaravan | quote }}
  SHELL_MONITOR_ESPALIER: {{ .Values.banking.shellMonitorEspalier | quote }}
  SOLDIER_WILLOW: {{ .Values.banking.soldierWillow | quote }}
  TEMPLE_DOE_GARBAGE: {{ .Values.banking.templeDoeGarbage | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "banking.fullname" . }}-banking
  labels:
  {{- include "banking.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: banking
spec:
  replicas: {{ .Values.banking.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: banking
      app.kubernetes.io/name: pray
    {{- include "banking.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: banking
        app.kubernetes.io/name: pray
      {{- include "banking.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 581218e820c42c2a7528410b47b3ea31523aa54a59c691761f14b3aaad580392
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "banking.fullname" . }}-banking
        image: {{ .Values.banking.banking.image.repository }}:{{ .Values.banking.banking.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.banking.banking.imagePullPolicy }}
        name: banking
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.banking.banking.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.banking.banking.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "banking.fullname" . }}-banking
  labels:
  {{- include "banking.labels" . | nindent 4 }}
spec:
  type: {{ .Values.banking.type }}
  selector:
    app.kubernetes.io/instance: banking
    app.kubernetes.io/name: pray
  {{- include "banking.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.banking.ports | toYaml | nindent 2 -}}
banking:
  banking:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  bureau: shovel
  burroDecryption: traveler
  chop: drill
  count: cheat
  intuitionCreditorMastication: fun
  numberlessLatitude: cabbage
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  replication: mariachi
  salami: slope
  sausageCaravan: ravioli
  shellMonitorEspalier: probability
  soldierWillow: cattle
  templeDoeGarbage: mocha
  type: ClusterIP
kubernetesClusterDomain: cluster.local
