# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "jaw.fullname" . }}-jaw
  labels:
  {{- include "jaw.labels" . | nindent 4 }}
data:
  ADD_SPEECH_CONCERNED: {{ .Values.jaw.addSpeechConcerned | quote }}
  AFFINITY: {{ .Values.jaw.affinity | quote }}
  APPROACH_SAFARI: {{ .Values.jaw.approachSafari | quote }}
  BIN: {{ .Values.jaw.bin | quote }}
  DELICIOUS_SEAL: {{ .Values.jaw.deliciousSeal | quote }}
  DISASTER_OCTAGON: {{ .Values.jaw.disasterOctagon | quote }}
  GIRAFFE_EARTH_PINPOINT: {{ .Values.jaw.giraffeEarthPinpoint | quote }}
  MUSTARD: {{ .Values.jaw.mustard | quote }}
  PATIO: {{ .Values.jaw.patio | quote }}
  SAMPAN_ZUCCHINI_PATTERN: {{ .Values.jaw.sampanZucchiniPattern | quote }}
  TRANSPARENCY_DERRICK: {{ .Values.jaw.transparencyDerrick | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "jaw.fullname" . }}-jaw
  labels:
  {{- include "jaw.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: jaw
spec:
  replicas: {{ .Values.jaw.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: jaw
      app.kubernetes.io/name: tofu
    {{- include "jaw.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: jaw
        app.kubernetes.io/name: tofu
      {{- include "jaw.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: d414621b904e768352062b675e1b55ad642568176cab83fd5e7aac7b7d63a406
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "jaw.fullname" . }}-jaw
        image: {{ .Values.jaw.jaw.image.repository }}:{{ .Values.jaw.jaw.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.jaw.jaw.imagePullPolicy }}
        name: jaw
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.jaw.jaw.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.jaw.jaw.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "jaw.fullname" . }}-jaw
  labels:
  {{- include "jaw.labels" . | nindent 4 }}
spec:
  type: {{ .Values.jaw.type }}
  selector:
    app.kubernetes.io/instance: jaw
    app.kubernetes.io/name: tofu
  {{- include "jaw.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.jaw.ports | toYaml | nindent 2 -}}
jaw:
  addSpeechConcerned: ad hoc
  affinity: workhorse
  approachSafari: contact
  bin: consonant
  deliciousSeal: slay
  disasterOctagon: tentacle
  giraffeEarthPinpoint: support
  jaw:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  mustard: guilder
  patio: quiver
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sampanZucchiniPattern: gelatin
  transparencyDerrick: economic
  type: ClusterIP
kubernetesClusterDomain: cluster.local
