# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "revelation.fullname" . }}-revelation
  labels:
  {{- include "revelation.labels" . | nindent 4 }}
data:
  BILLOWY: {{ .Values.revelation.billowy | quote }}
  CRY_COUNCILMAN_HIGH-RISE: {{ .Values.revelation.cryCouncilmanHighRise | quote }}
  DISPLAY_TAILBUD_MORPHOLOGY: {{ .Values.revelation.displayTailbudMorphology | quote
    }}
  EYELINER: {{ .Values.revelation.eyeliner | quote }}
  FRUIT_GREEDY: {{ .Values.revelation.fruitGreedy | quote }}
  GRUESOME_SCIENTIFIC: {{ .Values.revelation.gruesomeScientific | quote }}
  KNIFE-EDGE_SICKNESS_BIPLANE: {{ .Values.revelation.knifeEdgeSicknessBiplane | quote
    }}
  STRATEGY_IMPACT: {{ .Values.revelation.strategyImpact | quote }}
  TANGERINE_TAMALE: {{ .Values.revelation.tangerineTamale | quote }}
  TWILIGHT_SWEAR_BOUQUET: {{ .Values.revelation.twilightSwearBouquet | quote }}
  VIOLATION_APPEARANCE: {{ .Values.revelation.violationAppearance | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "revelation.fullname" . }}-revelation
  labels:
  {{- include "revelation.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: revelation
spec:
  replicas: {{ .Values.revelation.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: revelation
      app.kubernetes.io/name: pumpkinseed
    {{- include "revelation.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: revelation
        app.kubernetes.io/name: pumpkinseed
      {{- include "revelation.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: fc03159c2c1a438c2b55568180a88291687775ce96a4d47502b90d009715b665
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "revelation.fullname" . }}-revelation
        image: {{ .Values.revelation.revelation.image.repository }}:{{ .Values.revelation.revelation.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.revelation.revelation.imagePullPolicy }}
        name: revelation
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.revelation.revelation.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.revelation.revelation.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "revelation.fullname" . }}-revelation
  labels:
  {{- include "revelation.labels" . | nindent 4 }}
spec:
  type: {{ .Values.revelation.type }}
  selector:
    app.kubernetes.io/instance: revelation
    app.kubernetes.io/name: pumpkinseed
  {{- include "revelation.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.revelation.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
revelation:
  billowy: antling
  cryCouncilmanHighRise: barbeque
  displayTailbudMorphology: validate
  eyeliner: ambitious
  fruitGreedy: adult
  gruesomeScientific: arise
  knifeEdgeSicknessBiplane: fur
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  revelation:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  strategyImpact: confront
  tangerineTamale: gliding
  twilightSwearBouquet: pajamas
  type: ClusterIP
  violationAppearance: habitat
