# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "plow.fullname" . }}-plow
  labels:
  {{- include "plow.labels" . | nindent 4 }}
data:
  ALE: {{ .Values.plow.ale | quote }}
  BELLIGERENT_INFUSION_ALTAR: {{ .Values.plow.belligerentInfusionAltar | quote }}
  BUSINESS_BOUQUET_RELIEF: {{ .Values.plow.businessBouquetRelief | quote }}
  CUTICLE_DIRECTIVE_SCHOLAR: {{ .Values.plow.cuticleDirectiveScholar | quote }}
  DAY_ADOBE_PREVENT: {{ .Values.plow.dayAdobePrevent | quote }}
  FERRET: {{ .Values.plow.ferret | quote }}
  GYMNASTICS: {{ .Values.plow.gymnastics | quote }}
  LASAGNA_DEVIANCE: {{ .Values.plow.lasagnaDeviance | quote }}
  SCOOTER: {{ .Values.plow.scooter | quote }}
  STATEMENT_RICH: {{ .Values.plow.statementRich | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "plow.fullname" . }}-plow
  labels:
  {{- include "plow.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: plow
spec:
  replicas: {{ .Values.plow.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: plow
      app.kubernetes.io/name: cutlet
    {{- include "plow.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: plow
        app.kubernetes.io/name: cutlet
      {{- include "plow.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bd1efa0ef9fadb9cf597e8b23b5399df59efd11121a6037af809cb8399c20f5f
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "plow.fullname" . }}-plow
        image: {{ .Values.plow.plow.image.repository }}:{{ .Values.plow.plow.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.plow.plow.imagePullPolicy }}
        name: plow
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.plow.plow.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.plow.plow.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "plow.fullname" . }}-plow
  labels:
  {{- include "plow.labels" . | nindent 4 }}
spec:
  type: {{ .Values.plow.type }}
  selector:
    app.kubernetes.io/instance: plow
    app.kubernetes.io/name: cutlet
  {{- include "plow.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.plow.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
plow:
  ale: rebellious
  belligerentInfusionAltar: training
  businessBouquetRelief: frown
  cuticleDirectiveScholar: branch
  dayAdobePrevent: observation
  ferret: jewel
  gymnastics: camel
  lasagnaDeviance: melodic
  plow:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  scooter: afraid
  statementRich: weeder
  type: ClusterIP
