# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "prune.fullname" . }}-prune
  labels:
  {{- include "prune.labels" . | nindent 4 }}
data:
  BANK: {{ .Values.prune.bank | quote }}
  BROWSING_SPUME_ROYAL: {{ .Values.prune.browsingSpumeRoyal | quote }}
  CARPETING: {{ .Values.prune.carpeting | quote }}
  DECADENCE_TAIL_BIRD-WATCHER: {{ .Values.prune.decadenceTailBirdWatcher | quote
    }}
  DRIVER: {{ .Values.prune.driver | quote }}
  FORAGER: {{ .Values.prune.forager | quote }}
  POCKETBOOK_MANACLE_CHARTER: {{ .Values.prune.pocketbookManacleCharter | quote }}
  POUCH_SCULPTING: {{ .Values.prune.pouchSculpting | quote }}
  SHOAT_RECREATION: {{ .Values.prune.shoatRecreation | quote }}
  SIGNET: {{ .Values.prune.signet | quote }}
  STREETCAR: {{ .Values.prune.streetcar | quote }}
  SUMMIT_STIR-FRY: {{ .Values.prune.summitStirFry | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "prune.fullname" . }}-prune
  labels:
  {{- include "prune.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: prune
spec:
  replicas: {{ .Values.prune.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: prune
      app.kubernetes.io/name: zampone
    {{- include "prune.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: prune
        app.kubernetes.io/name: zampone
      {{- include "prune.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: dc315036f174e51cb2bbf57aac42e83d5d4757ba5c51d49f25dba8edf173678d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "prune.fullname" . }}-prune
        image: {{ .Values.prune.prune.image.repository }}:{{ .Values.prune.prune.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.prune.prune.imagePullPolicy }}
        name: prune
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.prune.prune.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.prune.prune.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "prune.fullname" . }}-prune
  labels:
  {{- include "prune.labels" . | nindent 4 }}
spec:
  type: {{ .Values.prune.type }}
  selector:
    app.kubernetes.io/instance: prune
    app.kubernetes.io/name: zampone
  {{- include "prune.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.prune.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
prune:
  bank: menu
  browsingSpumeRoyal: earthquake
  carpeting: macadamia
  decadenceTailBirdWatcher: covariate
  driver: disease
  forager: sideboard
  pocketbookManacleCharter: goose
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pouchSculpting: compress
  prune:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  shoatRecreation: abundance
  signet: peep
  streetcar: jog
  summitStirFry: position
  type: ClusterIP
