# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "boom.fullname" . }}-boom
  labels:
  {{- include "boom.labels" . | nindent 4 }}
data:
  BOURGEOISIE_SCHOOLHOUSE_SPANDEX: {{ .Values.boom.bourgeoisieSchoolhouseSpandex
    | quote }}
  HANDLEBAR_CONTAGION_DAIRY: {{ .Values.boom.handlebarContagionDairy | quote }}
  HYDROCARBON_COMBAT_TABLET: {{ .Values.boom.hydrocarbonCombatTablet | quote }}
  LITERATE_TREMOR_ADAPTABLE: {{ .Values.boom.literateTremorAdaptable | quote }}
  SHED: {{ .Values.boom.shed | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "boom.fullname" . }}-boom
  labels:
  {{- include "boom.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: boom
spec:
  replicas: {{ .Values.boom.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: boom
      app.kubernetes.io/name: sunbeam
    {{- include "boom.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: boom
        app.kubernetes.io/name: sunbeam
      {{- include "boom.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4faf8a0987cc9f1267b8dd69deb9b429b0cb85d7fda9ea4e89d8d4e8feceb749
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "boom.fullname" . }}-boom
        image: {{ .Values.boom.boom.image.repository }}:{{ .Values.boom.boom.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.boom.boom.imagePullPolicy }}
        name: boom
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.boom.boom.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.boom.boom.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "boom.fullname" . }}-boom
  labels:
  {{- include "boom.labels" . | nindent 4 }}
spec:
  type: {{ .Values.boom.type }}
  selector:
    app.kubernetes.io/instance: boom
    app.kubernetes.io/name: sunbeam
  {{- include "boom.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.boom.ports | toYaml | nindent 2 -}}
boom:
  boom:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  bourgeoisieSchoolhouseSpandex: listening
  handlebarContagionDairy: expedite
  hydrocarbonCombatTablet: used
  literateTremorAdaptable: encouraging
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shed: tightfisted
  type: ClusterIP
kubernetesClusterDomain: cluster.local
