# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "white.fullname" . }}-white
  labels:
  {{- include "white.labels" . | nindent 4 }}
data:
  BANGLE: {{ .Values.white.bangle | quote }}
  CAPITAL: {{ .Values.white.capital | quote }}
  CAR_TOLL_CLING: {{ .Values.white.carTollCling | quote }}
  PRESENT: {{ .Values.white.present | quote }}
  SOUNDNESS_TRITONE: {{ .Values.white.soundnessTritone | quote }}
  TRIBE: {{ .Values.white.tribe | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "white.fullname" . }}-white
  labels:
  {{- include "white.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: white
spec:
  replicas: {{ .Values.white.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: white
      app.kubernetes.io/name: ask
    {{- include "white.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: white
        app.kubernetes.io/name: ask
      {{- include "white.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 9cacaf3948f1fa58261d4c0da4dc7f6ef057dd332c43367a644a056c1fd18976
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "white.fullname" . }}-white
        image: {{ .Values.white.white.image.repository }}:{{ .Values.white.white.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.white.white.imagePullPolicy }}
        name: white
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.white.white.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.white.white.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "white.fullname" . }}-white
  labels:
  {{- include "white.labels" . | nindent 4 }}
spec:
  type: {{ .Values.white.type }}
  selector:
    app.kubernetes.io/instance: white
    app.kubernetes.io/name: ask
  {{- include "white.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.white.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
white:
  bangle: samovar
  capital: flesh
  carTollCling: warden
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  present: mow
  replicas: 1
  soundnessTritone: noir
  tribe: planter
  type: ClusterIP
  white:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
