# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "prosperity.fullname" . }}-prosperity
  labels:
  {{- include "prosperity.labels" . | nindent 4 }}
data:
  ASH_FEAR_TATTLER: {{ .Values.prosperity.ashFearTattler | quote }}
  COMPLAINT: {{ .Values.prosperity.complaint | quote }}
  COOPERATIVE_SIGHTSEEING_IRIDESCENCE: {{ .Values.prosperity.cooperativeSightseeingIridescence
    | quote }}
  DETAINEE_WHISKEY: {{ .Values.prosperity.detaineeWhiskey | quote }}
  PENDULUM_SUBSIDY_SEQUENCE: {{ .Values.prosperity.pendulumSubsidySequence | quote
    }}
  PILAF: {{ .Values.prosperity.pilaf | quote }}
  PLEASANT: {{ .Values.prosperity.pleasant | quote }}
  WHISKEY_COMPASSION: {{ .Values.prosperity.whiskeyCompassion | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "prosperity.fullname" . }}-prosperity
  labels:
  {{- include "prosperity.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: prosperity
spec:
  replicas: {{ .Values.prosperity.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: prosperity
      app.kubernetes.io/name: shoe-horn
    {{- include "prosperity.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: prosperity
        app.kubernetes.io/name: shoe-horn
      {{- include "prosperity.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6e84e25121bdf714b6abfa7692d0186b63815cdb5aad201eb2fc567b096f0648
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "prosperity.fullname" . }}-prosperity
        image: {{ .Values.prosperity.prosperity.image.repository }}:{{ .Values.prosperity.prosperity.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.prosperity.prosperity.imagePullPolicy }}
        name: prosperity
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.prosperity.prosperity.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.prosperity.prosperity.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "prosperity.fullname" . }}-prosperity
  labels:
  {{- include "prosperity.labels" . | nindent 4 }}
spec:
  type: {{ .Values.prosperity.type }}
  selector:
    app.kubernetes.io/instance: prosperity
    app.kubernetes.io/name: shoe-horn
  {{- include "prosperity.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.prosperity.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
prosperity:
  ashFearTattler: dressing
  complaint: lacking
  cooperativeSightseeingIridescence: subtract
  detaineeWhiskey: reveal
  pendulumSubsidySequence: traveler
  pilaf: vinyl
  pleasant: temperature
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prosperity:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  replicas: 1
  type: ClusterIP
  whiskeyCompassion: condor
