# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "agriculture.fullname" . }}-agriculture
  labels:
  {{- include "agriculture.labels" . | nindent 4 }}
data:
  BRANCH_PLANNING: {{ .Values.agriculture.branchPlanning | quote }}
  COMPONENT_OXYGEN_BUSTLE: {{ .Values.agriculture.componentOxygenBustle | quote }}
  FRONTIER_BOXSPRING_COLD: {{ .Values.agriculture.frontierBoxspringCold | quote }}
  HELICOPTER_DEADLINE_NOXIOUS: {{ .Values.agriculture.helicopterDeadlineNoxious |
    quote }}
  HOOF_CUSTODY_TIRESOME: {{ .Values.agriculture.hoofCustodyTiresome | quote }}
  HYDROFOIL_ITEM: {{ .Values.agriculture.hydrofoilItem | quote }}
  JEWEL_ELIGIBILITY: {{ .Values.agriculture.jewelEligibility | quote }}
  MATE: {{ .Values.agriculture.mate | quote }}
  NICE_SAILOR: {{ .Values.agriculture.niceSailor | quote }}
  NUN_EXCITED: {{ .Values.agriculture.nunExcited | quote }}
  OVERCOME: {{ .Values.agriculture.overcome | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "agriculture.fullname" . }}-agriculture
  labels:
  {{- include "agriculture.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: agriculture
spec:
  replicas: {{ .Values.agriculture.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: agriculture
      app.kubernetes.io/name: instrumentalist
    {{- include "agriculture.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: agriculture
        app.kubernetes.io/name: instrumentalist
      {{- include "agriculture.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: efbdf87b9d88fd3e96570bc52d855dbbb71e26ca4bac10e0120de9096f60d45a
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "agriculture.fullname" . }}-agriculture
        image: {{ .Values.agriculture.agriculture.image.repository }}:{{ .Values.agriculture.agriculture.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.agriculture.agriculture.imagePullPolicy }}
        name: agriculture
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.agriculture.agriculture.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.agriculture.agriculture.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "agriculture.fullname" . }}-agriculture
  labels:
  {{- include "agriculture.labels" . | nindent 4 }}
spec:
  type: {{ .Values.agriculture.type }}
  selector:
    app.kubernetes.io/instance: agriculture
    app.kubernetes.io/name: instrumentalist
  {{- include "agriculture.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.agriculture.ports | toYaml | nindent 2 -}}
agriculture:
  agriculture:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  branchPlanning: picnic
  componentOxygenBustle: sideburns
  frontierBoxspringCold: gabby
  helicopterDeadlineNoxious: other
  hoofCustodyTiresome: disturbed
  hydrofoilItem: fry
  jewelEligibility: prosecution
  mate: come
  niceSailor: silver
  nunExcited: mouser
  overcome: aquarium
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  type: ClusterIP
kubernetesClusterDomain: cluster.local
