# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "cheek.fullname" . }}-cheek
  labels:
  {{- include "cheek.labels" . | nindent 4 }}
data:
  EMPTY_MANSARD_BANG: {{ .Values.cheek.emptyMansardBang | quote }}
  EYEBROWS_PREACH: {{ .Values.cheek.eyebrowsPreach | quote }}
  LAST_SPARKLE_WILLOW: {{ .Values.cheek.lastSparkleWillow | quote }}
  TREMBLE_UNDERGROUND: {{ .Values.cheek.trembleUnderground | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "cheek.fullname" . }}-cheek
  labels:
  {{- include "cheek.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: cheek
spec:
  replicas: {{ .Values.cheek.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: cheek
      app.kubernetes.io/name: unarmed
    {{- include "cheek.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: cheek
        app.kubernetes.io/name: unarmed
      {{- include "cheek.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 8c108465f332983334f35390a7edcc5cb93bd13aac70ceee7ad2fe4fae86b5fa
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "cheek.fullname" . }}-cheek
        image: {{ .Values.cheek.cheek.image.repository }}:{{ .Values.cheek.cheek.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.cheek.cheek.imagePullPolicy }}
        name: cheek
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.cheek.cheek.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.cheek.cheek.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "cheek.fullname" . }}-cheek
  labels:
  {{- include "cheek.labels" . | nindent 4 }}
spec:
  type: {{ .Values.cheek.type }}
  selector:
    app.kubernetes.io/instance: cheek
    app.kubernetes.io/name: unarmed
  {{- include "cheek.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.cheek.ports | toYaml | nindent 2 -}}
cheek:
  cheek:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  emptyMansardBang: horrible
  eyebrowsPreach: velocity
  lastSparkleWillow: alight
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  trembleUnderground: premeditation
  type: ClusterIP
kubernetesClusterDomain: cluster.local
