# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "knowing.fullname" . }}-knowing
  labels:
  {{- include "knowing.labels" . | nindent 4 }}
data:
  BAROMETER_GOAT: {{ .Values.knowing.barometerGoat | quote }}
  GEOLOGY_EMPLOYER_LITIGATION: {{ .Values.knowing.geologyEmployerLitigation | quote
    }}
  RAINMAKER_CONTRARY_BASICS: {{ .Values.knowing.rainmakerContraryBasics | quote }}
  THERMOMETER_TRAIN_PALM: {{ .Values.knowing.thermometerTrainPalm | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "knowing.fullname" . }}-knowing
  labels:
  {{- include "knowing.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: knowing
spec:
  replicas: {{ .Values.knowing.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: knowing
      app.kubernetes.io/name: retirement
    {{- include "knowing.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: knowing
        app.kubernetes.io/name: retirement
      {{- include "knowing.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c3723a5036156fcc4fd03fa86b37f581c8bac033f67081c9bf886850818dbdcd
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "knowing.fullname" . }}-knowing
        image: {{ .Values.knowing.knowing.image.repository }}:{{ .Values.knowing.knowing.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.knowing.knowing.imagePullPolicy }}
        name: knowing
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.knowing.knowing.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.knowing.knowing.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "knowing.fullname" . }}-knowing
  labels:
  {{- include "knowing.labels" . | nindent 4 }}
spec:
  type: {{ .Values.knowing.type }}
  selector:
    app.kubernetes.io/instance: knowing
    app.kubernetes.io/name: retirement
  {{- include "knowing.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.knowing.ports | toYaml | nindent 2 -}}
knowing:
  barometerGoat: tutu
  geologyEmployerLitigation: controversy
  knowing:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rainmakerContraryBasics: toast
  replicas: 1
  thermometerTrainPalm: communicant
  type: ClusterIP
kubernetesClusterDomain: cluster.local
