# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lye.fullname" . }}-lye
  labels:
  {{- include "lye.labels" . | nindent 4 }}
data:
  CHARTER: {{ .Values.lye.charter | quote }}
  KARATE_PROGRESSION: {{ .Values.lye.karateProgression | quote }}
  LEAD_REMNANT: {{ .Values.lye.leadRemnant | quote }}
  LEVEL: {{ .Values.lye.level | quote }}
  LOT_SOMEONE: {{ .Values.lye.lotSomeone | quote }}
  ORIGIN_EMPLOYER: {{ .Values.lye.originEmployer | quote }}
  ROOT: {{ .Values.lye.root | quote }}
  WATERFRONT: {{ .Values.lye.waterfront | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lye.fullname" . }}-lye
  labels:
  {{- include "lye.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lye
spec:
  replicas: {{ .Values.lye.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lye
      app.kubernetes.io/name: shortage
    {{- include "lye.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lye
        app.kubernetes.io/name: shortage
      {{- include "lye.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4ae39776e7f2f8c074f86a7ce8898e4932085f6de9a84e2c7aea53ef4b245152
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lye.fullname" . }}-lye
        image: {{ .Values.lye.lye.image.repository }}:{{ .Values.lye.lye.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lye.lye.imagePullPolicy }}
        name: lye
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lye.lye.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lye.lye.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lye.fullname" . }}-lye
  labels:
  {{- include "lye.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lye.type }}
  selector:
    app.kubernetes.io/instance: lye
    app.kubernetes.io/name: shortage
  {{- include "lye.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lye.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lye:
  charter: stew
  karateProgression: grain
  leadRemnant: cookie
  level: gelding
  lotSomeone: clarification
  lye:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  originEmployer: snack
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  root: spelling
  type: ClusterIP
  waterfront: abnormality
