# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "yellow.fullname" . }}-yellow
  labels:
  {{- include "yellow.labels" . | nindent 4 }}
data:
  COMMOTION_PEPPERONI: {{ .Values.yellow.commotionPepperoni | quote }}
  CRAWL_PHENOMENON_GRIEF: {{ .Values.yellow.crawlPhenomenonGrief | quote }}
  DIADEM: {{ .Values.yellow.diadem | quote }}
  HOLIDAY: {{ .Values.yellow.holiday | quote }}
  MOSQUE_OLD_CAVE: {{ .Values.yellow.mosqueOldCave | quote }}
  SAINT_FLICK: {{ .Values.yellow.saintFlick | quote }}
  SMOGGY_CASUALTY: {{ .Values.yellow.smoggyCasualty | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "yellow.fullname" . }}-yellow
  labels:
  {{- include "yellow.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: yellow
spec:
  replicas: {{ .Values.yellow.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: yellow
      app.kubernetes.io/name: smock
    {{- include "yellow.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: yellow
        app.kubernetes.io/name: smock
      {{- include "yellow.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5401ce4d5eb300347a0c0bad70ae65fb0460d6a45023c9ec5ed5498a207cd90a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "yellow.fullname" . }}-yellow
        image: {{ .Values.yellow.yellow.image.repository }}:{{ .Values.yellow.yellow.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.yellow.yellow.imagePullPolicy }}
        name: yellow
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.yellow.yellow.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.yellow.yellow.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "yellow.fullname" . }}-yellow
  labels:
  {{- include "yellow.labels" . | nindent 4 }}
spec:
  type: {{ .Values.yellow.type }}
  selector:
    app.kubernetes.io/instance: yellow
    app.kubernetes.io/name: smock
  {{- include "yellow.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.yellow.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
yellow:
  commotionPepperoni: inauguration
  crawlPhenomenonGrief: versed
  diadem: voyage
  holiday: oregano
  mosqueOldCave: sigh
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  saintFlick: black
  smoggyCasualty: trowel
  type: ClusterIP
  yellow:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
