# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "tart.fullname" . }}-tart
  labels:
  {{- include "tart.labels" . | nindent 4 }}
data:
  BANKING_TENNIS: {{ .Values.tart.bankingTennis | quote }}
  LABORER_DISCONNECTION: {{ .Values.tart.laborerDisconnection | quote }}
  PARSER: {{ .Values.tart.parser | quote }}
  RETIREMENT: {{ .Values.tart.retirement | quote }}
  TUNE-UP_ASPIRING: {{ .Values.tart.tuneUpAspiring | quote }}
  VEGETATION_RITZY: {{ .Values.tart.vegetationRitzy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "tart.fullname" . }}-tart
  labels:
  {{- include "tart.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: tart
spec:
  replicas: {{ .Values.tart.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: tart
      app.kubernetes.io/name: woodshed
    {{- include "tart.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: tart
        app.kubernetes.io/name: woodshed
      {{- include "tart.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 29e496b19ce87a3291624661533df3556cda7ef58afe6303a554c07c5a9e7b74
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "tart.fullname" . }}-tart
        image: {{ .Values.tart.tart.image.repository }}:{{ .Values.tart.tart.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.tart.tart.imagePullPolicy }}
        name: tart
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.tart.tart.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.tart.tart.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "tart.fullname" . }}-tart
  labels:
  {{- include "tart.labels" . | nindent 4 }}
spec:
  type: {{ .Values.tart.type }}
  selector:
    app.kubernetes.io/instance: tart
    app.kubernetes.io/name: woodshed
  {{- include "tart.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.tart.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
tart:
  bankingTennis: spruce
  laborerDisconnection: daybed
  parser: save
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  retirement: implement
  tart:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  tuneUpAspiring: messy
  type: ClusterIP
  vegetationRitzy: crow
