# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "appear.fullname" . }}-appear
  labels:
  {{- include "appear.labels" . | nindent 4 }}
data:
  CHRONOMETER_OAR: {{ .Values.appear.chronometerOar | quote }}
  DINING_MARXISM: {{ .Values.appear.diningMarxism | quote }}
  FAMILY: {{ .Values.appear.family | quote }}
  GAME: {{ .Values.appear.game | quote }}
  SHOW_HEN: {{ .Values.appear.showHen | quote }}
  SLEEPING: {{ .Values.appear.sleeping | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "appear.fullname" . }}-appear
  labels:
  {{- include "appear.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: appear
spec:
  replicas: {{ .Values.appear.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: appear
      app.kubernetes.io/name: noun
    {{- include "appear.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: appear
        app.kubernetes.io/name: noun
      {{- include "appear.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2e6f6f95fb5cf0c4d13deef86d6a76795033d43daa330a2ee4400924d1f6f13b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "appear.fullname" . }}-appear
        image: {{ .Values.appear.appear.image.repository }}:{{ .Values.appear.appear.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.appear.appear.imagePullPolicy }}
        name: appear
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.appear.appear.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.appear.appear.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "appear.fullname" . }}-appear
  labels:
  {{- include "appear.labels" . | nindent 4 }}
spec:
  type: {{ .Values.appear.type }}
  selector:
    app.kubernetes.io/instance: appear
    app.kubernetes.io/name: noun
  {{- include "appear.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.appear.ports | toYaml | nindent 2 -}}
appear:
  appear:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  chronometerOar: molasses
  diningMarxism: fail
  family: fish
  game: prow
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  showHen: parking
  sleeping: kiosk
  type: ClusterIP
kubernetesClusterDomain: cluster.local
