# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "farrow.fullname" . }}-farrow
  labels:
  {{- include "farrow.labels" . | nindent 4 }}
data:
  ALLOW_CONTRIBUTION: {{ .Values.farrow.allowContribution | quote }}
  CROW_ALIKE: {{ .Values.farrow.crowAlike | quote }}
  DEEP: {{ .Values.farrow.deep | quote }}
  HAND-HOLDING_AMNESTY: {{ .Values.farrow.handHoldingAmnesty | quote }}
  INVERSION_HOMETOWN: {{ .Values.farrow.inversionHometown | quote }}
  KEYBOARDING_BATHROBE_LIEU: {{ .Values.farrow.keyboardingBathrobeLieu | quote }}
  NETWORKING_IMPROVISE: {{ .Values.farrow.networkingImprovise | quote }}
  PANCAKE: {{ .Values.farrow.pancake | quote }}
  PENDULUM_TESTY: {{ .Values.farrow.pendulumTesty | quote }}
  SURGERY_HAKE: {{ .Values.farrow.surgeryHake | quote }}
  THEATER_BEAR: {{ .Values.farrow.theaterBear | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "farrow.fullname" . }}-farrow
  labels:
  {{- include "farrow.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: farrow
spec:
  replicas: {{ .Values.farrow.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: farrow
      app.kubernetes.io/name: reward
    {{- include "farrow.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: farrow
        app.kubernetes.io/name: reward
      {{- include "farrow.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 152f3bb88c6d51317823de5cc56a9d39e50c33577df53816b88b06c0bc893a95
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "farrow.fullname" . }}-farrow
        image: {{ .Values.farrow.farrow.image.repository }}:{{ .Values.farrow.farrow.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.farrow.farrow.imagePullPolicy }}
        name: farrow
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.farrow.farrow.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.farrow.farrow.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "farrow.fullname" . }}-farrow
  labels:
  {{- include "farrow.labels" . | nindent 4 }}
spec:
  type: {{ .Values.farrow.type }}
  selector:
    app.kubernetes.io/instance: farrow
    app.kubernetes.io/name: reward
  {{- include "farrow.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.farrow.ports | toYaml | nindent 2 -}}
farrow:
  allowContribution: recovery
  crowAlike: lava
  deep: horseradish
  farrow:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  handHoldingAmnesty: soft
  inversionHometown: gnu
  keyboardingBathrobeLieu: anatomy
  networkingImprovise: finicky
  pancake: fun
  pendulumTesty: spacing
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  surgeryHake: board
  theaterBear: fencing
  type: ClusterIP
kubernetesClusterDomain: cluster.local
