# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "burning.fullname" . }}-burning
  labels:
  {{- include "burning.labels" . | nindent 4 }}
data:
  APPLE_BEAST: {{ .Values.burning.appleBeast | quote }}
  FRENZY_PRICK_EMBRYO: {{ .Values.burning.frenzyPrickEmbryo | quote }}
  MOAI: {{ .Values.burning.moai | quote }}
  MUFFIN: {{ .Values.burning.muffin | quote }}
  REVELATION_PARTICIPATE: {{ .Values.burning.revelationParticipate | quote }}
  SPIRAL: {{ .Values.burning.spiral | quote }}
  STATISTIC_ZOMBIE_GAZEBO: {{ .Values.burning.statisticZombieGazebo | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "burning.fullname" . }}-burning
  labels:
  {{- include "burning.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: burning
spec:
  replicas: {{ .Values.burning.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: burning
      app.kubernetes.io/name: clause
    {{- include "burning.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: burning
        app.kubernetes.io/name: clause
      {{- include "burning.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 968a36e20ae2d5f9feee955bc0fd2ac31af75c70170862cf57ff201601ed8566
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "burning.fullname" . }}-burning
        image: {{ .Values.burning.burning.image.repository }}:{{ .Values.burning.burning.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.burning.burning.imagePullPolicy }}
        name: burning
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.burning.burning.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.burning.burning.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "burning.fullname" . }}-burning
  labels:
  {{- include "burning.labels" . | nindent 4 }}
spec:
  type: {{ .Values.burning.type }}
  selector:
    app.kubernetes.io/instance: burning
    app.kubernetes.io/name: clause
  {{- include "burning.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.burning.ports | toYaml | nindent 2 -}}
burning:
  appleBeast: code
  burning:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  frenzyPrickEmbryo: alloy
  moai: spectacular
  muffin: distinction
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  revelationParticipate: squalid
  spiral: strengthen
  statisticZombieGazebo: fit
  type: ClusterIP
kubernetesClusterDomain: cluster.local
