# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "thunderhead.fullname" . }}-thunderhead
  labels:
  {{- include "thunderhead.labels" . | nindent 4 }}
data:
  BRASS_PRESTIGE_AHEAD: {{ .Values.thunderhead.brassPrestigeAhead | quote }}
  COMPLEMENT: {{ .Values.thunderhead.complement | quote }}
  JACKFRUIT: {{ .Values.thunderhead.jackfruit | quote }}
  MIN: {{ .Values.thunderhead.min | quote }}
  PICKAXE: {{ .Values.thunderhead.pickaxe | quote }}
  RAIMENT_INTERVIEW_WEEDER: {{ .Values.thunderhead.raimentInterviewWeeder | quote
    }}
  STRIP_MAT_SKYSCRAPER: {{ .Values.thunderhead.stripMatSkyscraper | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "thunderhead.fullname" . }}-thunderhead
  labels:
  {{- include "thunderhead.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: thunderhead
spec:
  replicas: {{ .Values.thunderhead.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: thunderhead
      app.kubernetes.io/name: wee
    {{- include "thunderhead.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: thunderhead
        app.kubernetes.io/name: wee
      {{- include "thunderhead.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 19d0f0fe0530b434f8436324bf8dcac3aca16634d623c201f2cc05661648a7ff
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "thunderhead.fullname" . }}-thunderhead
        image: {{ .Values.thunderhead.thunderhead.image.repository }}:{{ .Values.thunderhead.thunderhead.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.thunderhead.thunderhead.imagePullPolicy }}
        name: thunderhead
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.thunderhead.thunderhead.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.thunderhead.thunderhead.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "thunderhead.fullname" . }}-thunderhead
  labels:
  {{- include "thunderhead.labels" . | nindent 4 }}
spec:
  type: {{ .Values.thunderhead.type }}
  selector:
    app.kubernetes.io/instance: thunderhead
    app.kubernetes.io/name: wee
  {{- include "thunderhead.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.thunderhead.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
thunderhead:
  brassPrestigeAhead: syndicate
  complement: unbecoming
  jackfruit: charge
  min: cluster
  pickaxe: sake
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  raimentInterviewWeeder: frock
  replicas: 1
  stripMatSkyscraper: witty
  thunderhead:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
