# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "omniscient.fullname" . }}-omniscient
  labels:
  {{- include "omniscient.labels" . | nindent 4 }}
data:
  AUDIT_NIGHTCLUB: {{ .Values.omniscient.auditNightclub | quote }}
  CRUNCH_PIGLET_SLIPPERS: {{ .Values.omniscient.crunchPigletSlippers | quote }}
  EDUCATE_LIBRARY_FORMATION: {{ .Values.omniscient.educateLibraryFormation | quote
    }}
  HYPOTHESIZE_UNEQUALED: {{ .Values.omniscient.hypothesizeUnequaled | quote }}
  IMAGINE: {{ .Values.omniscient.imagine | quote }}
  MINE_PETITE: {{ .Values.omniscient.minePetite | quote }}
  OPEN_IRIS: {{ .Values.omniscient.openIris | quote }}
  PRICKLY: {{ .Values.omniscient.prickly | quote }}
  QUALIFICATION_HEIGHT: {{ .Values.omniscient.qualificationHeight | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "omniscient.fullname" . }}-omniscient
  labels:
  {{- include "omniscient.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: omniscient
spec:
  replicas: {{ .Values.omniscient.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: omniscient
      app.kubernetes.io/name: ascent
    {{- include "omniscient.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: omniscient
        app.kubernetes.io/name: ascent
      {{- include "omniscient.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 504e439506f26562ba59598702907f2d66068b4f38139b810ef58e17c3b1bcf3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "omniscient.fullname" . }}-omniscient
        image: {{ .Values.omniscient.omniscient.image.repository }}:{{ .Values.omniscient.omniscient.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.omniscient.omniscient.imagePullPolicy }}
        name: omniscient
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.omniscient.omniscient.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.omniscient.omniscient.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "omniscient.fullname" . }}-omniscient
  labels:
  {{- include "omniscient.labels" . | nindent 4 }}
spec:
  type: {{ .Values.omniscient.type }}
  selector:
    app.kubernetes.io/instance: omniscient
    app.kubernetes.io/name: ascent
  {{- include "omniscient.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.omniscient.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
omniscient:
  auditNightclub: lunge
  crunchPigletSlippers: chin
  educateLibraryFormation: leveret
  hypothesizeUnequaled: suspect
  imagine: incandescence
  minePetite: thoughtful
  omniscient:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  openIris: kazoo
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  prickly: pyramid
  qualificationHeight: stot
  replicas: 1
  type: ClusterIP
