# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "wampum.fullname" . }}-wampum
  labels:
  {{- include "wampum.labels" . | nindent 4 }}
data:
  BLESS_SPECTACLES_CLAM: {{ .Values.wampum.blessSpectaclesClam | quote }}
  CHARITY_EMBARRASSED_ASSET: {{ .Values.wampum.charityEmbarrassedAsset | quote }}
  CLAUSE_TRIPOD: {{ .Values.wampum.clauseTripod | quote }}
  HOLDER_AMUSEMENT_LAWMAKER: {{ .Values.wampum.holderAmusementLawmaker | quote }}
  MUDDY_PEER: {{ .Values.wampum.muddyPeer | quote }}
  OUTHOUSE_SMOGGY: {{ .Values.wampum.outhouseSmoggy | quote }}
  PEPPER: {{ .Values.wampum.pepper | quote }}
  POINTLESS_PLASTERBOARD_RUNWAY: {{ .Values.wampum.pointlessPlasterboardRunway |
    quote }}
  STEP-AUNT_NEONATE_YOLK: {{ .Values.wampum.stepAuntNeonateYolk | quote }}
  WARMTH: {{ .Values.wampum.warmth | quote }}
  WEALTHY_TAME: {{ .Values.wampum.wealthyTame | quote }}
  WHISKEY_WAKEFUL: {{ .Values.wampum.whiskeyWakeful | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "wampum.fullname" . }}-wampum
  labels:
  {{- include "wampum.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: wampum
spec:
  replicas: {{ .Values.wampum.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: wampum
      app.kubernetes.io/name: everything
    {{- include "wampum.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: wampum
        app.kubernetes.io/name: everything
      {{- include "wampum.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 3c9ee5a72c5297705ff86f0d05e3a047fe7e7952b4fe6a3a557936cec26c2217
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "wampum.fullname" . }}-wampum
        image: {{ .Values.wampum.wampum.image.repository }}:{{ .Values.wampum.wampum.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.wampum.wampum.imagePullPolicy }}
        name: wampum
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.wampum.wampum.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.wampum.wampum.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "wampum.fullname" . }}-wampum
  labels:
  {{- include "wampum.labels" . | nindent 4 }}
spec:
  type: {{ .Values.wampum.type }}
  selector:
    app.kubernetes.io/instance: wampum
    app.kubernetes.io/name: everything
  {{- include "wampum.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.wampum.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
wampum:
  blessSpectaclesClam: hull
  charityEmbarrassedAsset: goddess
  clauseTripod: slapstick
  holderAmusementLawmaker: documentary
  muddyPeer: silica
  outhouseSmoggy: relate
  pepper: somebody
  pointlessPlasterboardRunway: melon
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  stepAuntNeonateYolk: compass
  type: ClusterIP
  wampum:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  warmth: cagey
  wealthyTame: dish
  whiskeyWakeful: roadway
