# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "bongo.fullname" . }}-bongo
  labels:
  {{- include "bongo.labels" . | nindent 4 }}
data:
  AIRFIELD: {{ .Values.bongo.airfield | quote }}
  BLIND_LOG_INTERVIEWER: {{ .Values.bongo.blindLogInterviewer | quote }}
  CRIMINAL_WORKPLACE_EXPERIENCE: {{ .Values.bongo.criminalWorkplaceExperience | quote
    }}
  CULTURED: {{ .Values.bongo.cultured | quote }}
  DEN_HOUSING_ALTITUDE: {{ .Values.bongo.denHousingAltitude | quote }}
  FAME_STRENGTH: {{ .Values.bongo.fameStrength | quote }}
  FUTURISTIC_COLLISION_DENTIST: {{ .Values.bongo.futuristicCollisionDentist | quote
    }}
  ORE_ASPHALT_SOCIALISM: {{ .Values.bongo.oreAsphaltSocialism | quote }}
  SIDE_FEDERATION: {{ .Values.bongo.sideFederation | quote }}
  TIN: {{ .Values.bongo.tin | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "bongo.fullname" . }}-bongo
  labels:
  {{- include "bongo.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: bongo
spec:
  replicas: {{ .Values.bongo.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: bongo
      app.kubernetes.io/name: beaver
    {{- include "bongo.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: bongo
        app.kubernetes.io/name: beaver
      {{- include "bongo.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2a63f1f8d536a42e29544ac33766521ad99982429f9dfbece51491f06b8a4cfd
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "bongo.fullname" . }}-bongo
        image: {{ .Values.bongo.bongo.image.repository }}:{{ .Values.bongo.bongo.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.bongo.bongo.imagePullPolicy }}
        name: bongo
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.bongo.bongo.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.bongo.bongo.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "bongo.fullname" . }}-bongo
  labels:
  {{- include "bongo.labels" . | nindent 4 }}
spec:
  type: {{ .Values.bongo.type }}
  selector:
    app.kubernetes.io/instance: bongo
    app.kubernetes.io/name: beaver
  {{- include "bongo.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.bongo.ports | toYaml | nindent 2 -}}
bongo:
  airfield: stability
  blindLogInterviewer: charm
  bongo:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  criminalWorkplaceExperience: bather
  cultured: permission
  denHousingAltitude: catastrophe
  fameStrength: utilisation
  futuristicCollisionDentist: user
  oreAsphaltSocialism: cagey
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sideFederation: cart
  tin: squatter
  type: ClusterIP
kubernetesClusterDomain: cluster.local
