# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "forest.fullname" . }}-forest
  labels:
  {{- include "forest.labels" . | nindent 4 }}
data:
  INSTALLATION_DEDUCTION: {{ .Values.forest.installationDeduction | quote }}
  LOCKER: {{ .Values.forest.locker | quote }}
  MAGNET_BRICKLAYING: {{ .Values.forest.magnetBricklaying | quote }}
  PANNIER_BANG: {{ .Values.forest.pannierBang | quote }}
  SEED_DICTIONARY: {{ .Values.forest.seedDictionary | quote }}
  SOMEBODY: {{ .Values.forest.somebody | quote }}
  STRENGTHEN_CLARITY_REPUBLICAN: {{ .Values.forest.strengthenClarityRepublican |
    quote }}
  VITAMIN_SAMURAI_INSPIRE: {{ .Values.forest.vitaminSamuraiInspire | quote }}
  WINDOW_COIL_NEWSSTAND: {{ .Values.forest.windowCoilNewsstand | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "forest.fullname" . }}-forest
  labels:
  {{- include "forest.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: forest
spec:
  replicas: {{ .Values.forest.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: forest
      app.kubernetes.io/name: sled
    {{- include "forest.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: forest
        app.kubernetes.io/name: sled
      {{- include "forest.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 669397d80fb882d277dcfe97515d392261b506713a2f6cce1edf3fd1c6f2bf8a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "forest.fullname" . }}-forest
        image: {{ .Values.forest.forest.image.repository }}:{{ .Values.forest.forest.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.forest.forest.imagePullPolicy }}
        name: forest
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.forest.forest.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.forest.forest.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "forest.fullname" . }}-forest
  labels:
  {{- include "forest.labels" . | nindent 4 }}
spec:
  type: {{ .Values.forest.type }}
  selector:
    app.kubernetes.io/instance: forest
    app.kubernetes.io/name: sled
  {{- include "forest.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.forest.ports | toYaml | nindent 2 -}}
forest:
  forest:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  installationDeduction: terracotta
  locker: decency
  magnetBricklaying: say
  pannierBang: physical
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  seedDictionary: yogurt
  somebody: eurocentrism
  strengthenClarityRepublican: accomplishment
  type: ClusterIP
  vitaminSamuraiInspire: arrival
  windowCoilNewsstand: diagnose
kubernetesClusterDomain: cluster.local
