# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "applause.fullname" . }}-applause
  labels:
  {{- include "applause.labels" . | nindent 4 }}
data:
  ADVENT_FLASHY_AUDIT: {{ .Values.applause.adventFlashyAudit | quote }}
  FILL: {{ .Values.applause.fill | quote }}
  HANDFUL_SLEEPY_RAISE: {{ .Values.applause.handfulSleepyRaise | quote }}
  MISUNDERSTAND_DIME_INLAY: {{ .Values.applause.misunderstandDimeInlay | quote }}
  MODEL_VEHICLE: {{ .Values.applause.modelVehicle | quote }}
  PROGRAMME_DULCIMER_HEART-THROB: {{ .Values.applause.programmeDulcimerHeartThrob
    | quote }}
  RELIEVED_NAME: {{ .Values.applause.relievedName | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "applause.fullname" . }}-applause
  labels:
  {{- include "applause.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: applause
spec:
  replicas: {{ .Values.applause.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: applause
      app.kubernetes.io/name: wont
    {{- include "applause.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: applause
        app.kubernetes.io/name: wont
      {{- include "applause.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c26fa9405066b125c12116951dc7cb8362b2e9cc8f29a2ee566eedb73ade94b7
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "applause.fullname" . }}-applause
        image: {{ .Values.applause.applause.image.repository }}:{{ .Values.applause.applause.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.applause.applause.imagePullPolicy }}
        name: applause
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.applause.applause.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.applause.applause.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "applause.fullname" . }}-applause
  labels:
  {{- include "applause.labels" . | nindent 4 }}
spec:
  type: {{ .Values.applause.type }}
  selector:
    app.kubernetes.io/instance: applause
    app.kubernetes.io/name: wont
  {{- include "applause.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.applause.ports | toYaml | nindent 2 -}}
applause:
  adventFlashyAudit: embellishment
  applause:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  fill: spend
  handfulSleepyRaise: participation
  misunderstandDimeInlay: e-mail
  modelVehicle: message
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  programmeDulcimerHeartThrob: sculpting
  relievedName: collision
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
