# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "intuition.fullname" . }}-intuition
  labels:
  {{- include "intuition.labels" . | nindent 4 }}
data:
  LEVEL_CRIBBAGE: {{ .Values.intuition.levelCribbage | quote }}
  NIGHTLIGHT_AWE: {{ .Values.intuition.nightlightAwe | quote }}
  RETROSPECT_LANDSCAPE_BARBITURATE: {{ .Values.intuition.retrospectLandscapeBarbiturate
    | quote }}
  SIDECAR: {{ .Values.intuition.sidecar | quote }}
  STORY_TRENCH: {{ .Values.intuition.storyTrench | quote }}
  TEXT: {{ .Values.intuition.text | quote }}
  UPPER_COURT_INHIBITOR: {{ .Values.intuition.upperCourtInhibitor | quote }}
  VIOLENCE: {{ .Values.intuition.violence | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "intuition.fullname" . }}-intuition
  labels:
  {{- include "intuition.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: intuition
spec:
  replicas: {{ .Values.intuition.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: intuition
      app.kubernetes.io/name: aboriginal
    {{- include "intuition.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: intuition
        app.kubernetes.io/name: aboriginal
      {{- include "intuition.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 7aeb34cb168ccfe658dfdcbc61aa6e12168e57679eeba5ec4cccfc2f97aed7d9
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "intuition.fullname" . }}-intuition
        image: {{ .Values.intuition.intuition.image.repository }}:{{ .Values.intuition.intuition.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.intuition.intuition.imagePullPolicy }}
        name: intuition
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.intuition.intuition.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.intuition.intuition.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "intuition.fullname" . }}-intuition
  labels:
  {{- include "intuition.labels" . | nindent 4 }}
spec:
  type: {{ .Values.intuition.type }}
  selector:
    app.kubernetes.io/instance: intuition
    app.kubernetes.io/name: aboriginal
  {{- include "intuition.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.intuition.ports | toYaml | nindent 2 -}}
intuition:
  intuition:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  levelCribbage: accordion
  nightlightAwe: bread
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  retrospectLandscapeBarbiturate: lay
  sidecar: avocado
  storyTrench: prophet
  text: style
  type: ClusterIP
  upperCourtInhibitor: sewer
  violence: conduct
kubernetesClusterDomain: cluster.local
