# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "facet.fullname" . }}-facet
  labels:
  {{- include "facet.labels" . | nindent 4 }}
data:
  ANORAK_DELICIOUS: {{ .Values.facet.anorakDelicious | quote }}
  ENTERTAINING_VENTI: {{ .Values.facet.entertainingVenti | quote }}
  GERANIUM: {{ .Values.facet.geranium | quote }}
  ISCHEMIA_GLUTAMATE_EYESTRAIN: {{ .Values.facet.ischemiaGlutamateEyestrain | quote
    }}
  NASAL_FORBID_HUNDRED: {{ .Values.facet.nasalForbidHundred | quote }}
  PIMP_POMEGRANATE_OCELOT: {{ .Values.facet.pimpPomegranateOcelot | quote }}
  RACE_PROJECT: {{ .Values.facet.raceProject | quote }}
  RESUME: {{ .Values.facet.resume | quote }}
  SIDESTREAM: {{ .Values.facet.sidestream | quote }}
  VISTA_SPRUCE_PRINCIPLE: {{ .Values.facet.vistaSprucePrinciple | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "facet.fullname" . }}-facet
  labels:
  {{- include "facet.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: facet
spec:
  replicas: {{ .Values.facet.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: facet
      app.kubernetes.io/name: denim
    {{- include "facet.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: facet
        app.kubernetes.io/name: denim
      {{- include "facet.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: f0ef1b45abcc21af8cce7172dc0b31df1f463d85da3642ab9b83761d16733589
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "facet.fullname" . }}-facet
        image: {{ .Values.facet.facet.image.repository }}:{{ .Values.facet.facet.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.facet.facet.imagePullPolicy }}
        name: facet
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.facet.facet.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.facet.facet.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "facet.fullname" . }}-facet
  labels:
  {{- include "facet.labels" . | nindent 4 }}
spec:
  type: {{ .Values.facet.type }}
  selector:
    app.kubernetes.io/instance: facet
    app.kubernetes.io/name: denim
  {{- include "facet.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.facet.ports | toYaml | nindent 2 -}}
facet:
  anorakDelicious: performance
  entertainingVenti: marker
  facet:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  geranium: half
  ischemiaGlutamateEyestrain: rack
  nasalForbidHundred: symptomatic
  pimpPomegranateOcelot: doll
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  raceProject: nasal
  replicas: 1
  resume: beneficiary
  sidestream: cobbler
  type: ClusterIP
  vistaSprucePrinciple: ruthless
kubernetesClusterDomain: cluster.local
