# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "fireman.fullname" . }}-fireman
  labels:
  {{- include "fireman.labels" . | nindent 4 }}
data:
  BOLT_RED_ASHTRAY: {{ .Values.fireman.boltRedAshtray | quote }}
  BULL-FIGHTER_PIER: {{ .Values.fireman.bullFighterPier | quote }}
  DEFENSE_TRANSLATE: {{ .Values.fireman.defenseTranslate | quote }}
  HABIT_GIRDLE: {{ .Values.fireman.habitGirdle | quote }}
  OAFISH_ESTUARY: {{ .Values.fireman.oafishEstuary | quote }}
  PODCAST_LOGO: {{ .Values.fireman.podcastLogo | quote }}
  SHAKE_ATOM_METAPHOR: {{ .Values.fireman.shakeAtomMetaphor | quote }}
  STAGE_TINY: {{ .Values.fireman.stageTiny | quote }}
  TEXT_MAYONNAISE_GARDEN: {{ .Values.fireman.textMayonnaiseGarden | quote }}
  WRAPPING_HEARING: {{ .Values.fireman.wrappingHearing | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "fireman.fullname" . }}-fireman
  labels:
  {{- include "fireman.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: fireman
spec:
  replicas: {{ .Values.fireman.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: fireman
      app.kubernetes.io/name: fetch
    {{- include "fireman.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: fireman
        app.kubernetes.io/name: fetch
      {{- include "fireman.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c22709c4c8e58f1fb3250dbc12120af051421ad0e8332a6c6ecaf8ee22ac1ce8
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "fireman.fullname" . }}-fireman
        image: {{ .Values.fireman.fireman.image.repository }}:{{ .Values.fireman.fireman.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.fireman.fireman.imagePullPolicy }}
        name: fireman
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.fireman.fireman.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.fireman.fireman.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "fireman.fullname" . }}-fireman
  labels:
  {{- include "fireman.labels" . | nindent 4 }}
spec:
  type: {{ .Values.fireman.type }}
  selector:
    app.kubernetes.io/instance: fireman
    app.kubernetes.io/name: fetch
  {{- include "fireman.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.fireman.ports | toYaml | nindent 2 -}}
fireman:
  boltRedAshtray: surround
  bullFighterPier: hanger
  defenseTranslate: grandmother
  fireman:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  habitGirdle: error
  oafishEstuary: seep
  podcastLogo: obligation
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  shakeAtomMetaphor: turmeric
  stageTiny: beginning
  textMayonnaiseGarden: subset
  type: ClusterIP
  wrappingHearing: span
kubernetesClusterDomain: cluster.local
