# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "taste.fullname" . }}-taste
  labels:
  {{- include "taste.labels" . | nindent 4 }}
data:
  AFFINITY: {{ .Values.taste.affinity | quote }}
  BRASH_ERA: {{ .Values.taste.brashEra | quote }}
  CHATEAU_LUDICROUS_HIRING: {{ .Values.taste.chateauLudicrousHiring | quote }}
  DOCUMENT: {{ .Values.taste.document | quote }}
  MOST_POTATO: {{ .Values.taste.mostPotato | quote }}
  OBEDIENCE: {{ .Values.taste.obedience | quote }}
  PACE_NETSUKE_SHRED: {{ .Values.taste.paceNetsukeShred | quote }}
  PRAYER: {{ .Values.taste.prayer | quote }}
  SHORTWAVE_MARGARINE: {{ .Values.taste.shortwaveMargarine | quote }}
  TACKLE: {{ .Values.taste.tackle | quote }}
  YANG_DISPOSAL_FANTASY: {{ .Values.taste.yangDisposalFantasy | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "taste.fullname" . }}-taste
  labels:
  {{- include "taste.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: taste
spec:
  replicas: {{ .Values.taste.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: taste
      app.kubernetes.io/name: altitude
    {{- include "taste.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: taste
        app.kubernetes.io/name: altitude
      {{- include "taste.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: bb39e56409864ddcb186fe217b21841a5edbffa1e4698b96a3fb018e64399b9d
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "taste.fullname" . }}-taste
        image: {{ .Values.taste.taste.image.repository }}:{{ .Values.taste.taste.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.taste.taste.imagePullPolicy }}
        name: taste
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.taste.taste.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.taste.taste.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "taste.fullname" . }}-taste
  labels:
  {{- include "taste.labels" . | nindent 4 }}
spec:
  type: {{ .Values.taste.type }}
  selector:
    app.kubernetes.io/instance: taste
    app.kubernetes.io/name: altitude
  {{- include "taste.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.taste.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
taste:
  affinity: turnip
  brashEra: situation
  chateauLudicrousHiring: buffer
  document: dad
  mostPotato: bicycle
  obedience: jug
  paceNetsukeShred: gel
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prayer: fluttering
  replicas: 1
  shortwaveMargarine: sub
  tackle: uncertainty
  taste:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  type: ClusterIP
  yangDisposalFantasy: barbarous
