# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "parsnip.fullname" . }}-parsnip
  labels:
  {{- include "parsnip.labels" . | nindent 4 }}
data:
  BLEED_CLEARING_LLAMA: {{ .Values.parsnip.bleedClearingLlama | quote }}
  CADDY_SARONG_BATHROOM: {{ .Values.parsnip.caddySarongBathroom | quote }}
  CANE_COUNSELING: {{ .Values.parsnip.caneCounseling | quote }}
  FILLET_BANKRUPTCY: {{ .Values.parsnip.filletBankruptcy | quote }}
  HAIR_GIFTED_BLUSH: {{ .Values.parsnip.hairGiftedBlush | quote }}
  MANUFACTURING_DERIVATION_MARKSMAN: {{ .Values.parsnip.manufacturingDerivationMarksman
    | quote }}
  PROSECUTOR: {{ .Values.parsnip.prosecutor | quote }}
  QUESTION_DRESS: {{ .Values.parsnip.questionDress | quote }}
  SLAY: {{ .Values.parsnip.slay | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "parsnip.fullname" . }}-parsnip
  labels:
  {{- include "parsnip.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: parsnip
spec:
  replicas: {{ .Values.parsnip.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: parsnip
      app.kubernetes.io/name: pomegranate
    {{- include "parsnip.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: parsnip
        app.kubernetes.io/name: pomegranate
      {{- include "parsnip.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9eba58d4a5194a2775e72f155fa164de428d2b4b3d602855a00c78ee82dbd340
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "parsnip.fullname" . }}-parsnip
        image: {{ .Values.parsnip.parsnip.image.repository }}:{{ .Values.parsnip.parsnip.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.parsnip.parsnip.imagePullPolicy }}
        name: parsnip
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.parsnip.parsnip.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.parsnip.parsnip.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "parsnip.fullname" . }}-parsnip
  labels:
  {{- include "parsnip.labels" . | nindent 4 }}
spec:
  type: {{ .Values.parsnip.type }}
  selector:
    app.kubernetes.io/instance: parsnip
    app.kubernetes.io/name: pomegranate
  {{- include "parsnip.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.parsnip.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
parsnip:
  bleedClearingLlama: deformation
  caddySarongBathroom: settler
  caneCounseling: groovy
  filletBankruptcy: console
  hairGiftedBlush: fang
  manufacturingDerivationMarksman: signup
  parsnip:
    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
  prosecutor: zucchini
  questionDress: subsidence
  replicas: 1
  slay: cultivar
  type: ClusterIP
