# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dollar.fullname" . }}-dollar
  labels:
  {{- include "dollar.labels" . | nindent 4 }}
data:
  BLUEBERRY: {{ .Values.dollar.blueberry | quote }}
  BOOLEAN_SEMICOLON: {{ .Values.dollar.booleanSemicolon | quote }}
  COCKROACH_PRIESTHOOD_KEY: {{ .Values.dollar.cockroachPriesthoodKey | quote }}
  INHERITANCE_CROSS-CONTAMINATION_TENET: {{ .Values.dollar.inheritanceCrossContaminationTenet
    | quote }}
  LONGITUDE_ANTIBODY_OSTRICH: {{ .Values.dollar.longitudeAntibodyOstrich | quote
    }}
  LYE_SCREENWRITING_REDUCTION: {{ .Values.dollar.lyeScreenwritingReduction | quote
    }}
  PELT: {{ .Values.dollar.pelt | quote }}
  PLAYROOM_UNION: {{ .Values.dollar.playroomUnion | quote }}
  SIDEBOARD_GLUTAMATE_WAIT: {{ .Values.dollar.sideboardGlutamateWait | quote }}
  SNARL: {{ .Values.dollar.snarl | quote }}
  TICKET: {{ .Values.dollar.ticket | quote }}
  TOMATO: {{ .Values.dollar.tomato | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dollar.fullname" . }}-dollar
  labels:
  {{- include "dollar.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dollar
spec:
  replicas: {{ .Values.dollar.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dollar
      app.kubernetes.io/name: ensure
    {{- include "dollar.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dollar
        app.kubernetes.io/name: ensure
      {{- include "dollar.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0492d1e2ce2bc06054f2c215b9f8c99368e912f2ab89aae48b916a49b7a28208
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dollar.fullname" . }}-dollar
        image: {{ .Values.dollar.dollar.image.repository }}:{{ .Values.dollar.dollar.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dollar.dollar.imagePullPolicy }}
        name: dollar
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dollar.dollar.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dollar.dollar.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dollar.fullname" . }}-dollar
  labels:
  {{- include "dollar.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dollar.type }}
  selector:
    app.kubernetes.io/instance: dollar
    app.kubernetes.io/name: ensure
  {{- include "dollar.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dollar.ports | toYaml | nindent 2 -}}
dollar:
  blueberry: handsome
  booleanSemicolon: immigrant
  cockroachPriesthoodKey: postage
  dollar:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  inheritanceCrossContaminationTenet: silk
  longitudeAntibodyOstrich: compete
  lyeScreenwritingReduction: storm
  pelt: racial
  playroomUnion: heavy
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  sideboardGlutamateWait: abstracted
  snarl: employment
  ticket: safety
  tomato: yeast
  type: ClusterIP
kubernetesClusterDomain: cluster.local
