# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dryer.fullname" . }}-dryer
  labels:
  {{- include "dryer.labels" . | nindent 4 }}
data:
  COMPANY: {{ .Values.dryer.company | quote }}
  MILL_BOORISH_RUBBISH: {{ .Values.dryer.millBoorishRubbish | quote }}
  QUALITY: {{ .Values.dryer.quality | quote }}
  SHOOT: {{ .Values.dryer.shoot | quote }}
  VARIATION_WEDGE_FORESTRY: {{ .Values.dryer.variationWedgeForestry | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dryer.fullname" . }}-dryer
  labels:
  {{- include "dryer.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dryer
spec:
  replicas: {{ .Values.dryer.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dryer
      app.kubernetes.io/name: dimple
    {{- include "dryer.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dryer
        app.kubernetes.io/name: dimple
      {{- include "dryer.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 85aff253b3febb093fefdee99d68b9c13277e3173b933535e293f7881b5cbf4a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dryer.fullname" . }}-dryer
        image: {{ .Values.dryer.dryer.image.repository }}:{{ .Values.dryer.dryer.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dryer.dryer.imagePullPolicy }}
        name: dryer
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dryer.dryer.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dryer.dryer.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dryer.fullname" . }}-dryer
  labels:
  {{- include "dryer.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dryer.type }}
  selector:
    app.kubernetes.io/instance: dryer
    app.kubernetes.io/name: dimple
  {{- include "dryer.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dryer.ports | toYaml | nindent 2 -}}
dryer:
  company: elimination
  dryer:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  millBoorishRubbish: practice
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  quality: kite
  replicas: 1
  shoot: kangaroo
  type: ClusterIP
  variationWedgeForestry: knife
kubernetesClusterDomain: cluster.local
