# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "developing.fullname" . }}-developing
  labels:
  {{- include "developing.labels" . | nindent 4 }}
data:
  FORAGE_CONVERT: {{ .Values.developing.forageConvert | quote }}
  PREFERENCE: {{ .Values.developing.preference | quote }}
  PUSH_GENE: {{ .Values.developing.pushGene | quote }}
  VULTURE: {{ .Values.developing.vulture | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "developing.fullname" . }}-developing
  labels:
  {{- include "developing.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: developing
spec:
  replicas: {{ .Values.developing.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: developing
      app.kubernetes.io/name: booster
    {{- include "developing.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: developing
        app.kubernetes.io/name: booster
      {{- include "developing.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 54a04bbbbf6a00ba05aecc60bf3c5bb780b93ba791d33d78bf4da43773967aef
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "developing.fullname" . }}-developing
        image: {{ .Values.developing.developing.image.repository }}:{{ .Values.developing.developing.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.developing.developing.imagePullPolicy }}
        name: developing
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.developing.developing.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.developing.developing.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "developing.fullname" . }}-developing
  labels:
  {{- include "developing.labels" . | nindent 4 }}
spec:
  type: {{ .Values.developing.type }}
  selector:
    app.kubernetes.io/instance: developing
    app.kubernetes.io/name: booster
  {{- include "developing.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.developing.ports | toYaml | nindent 2 -}}
developing:
  developing:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  forageConvert: headquarters
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  preference: visit
  pushGene: statement
  replicas: 1
  type: ClusterIP
  vulture: trove
kubernetesClusterDomain: cluster.local
