# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "seeder.fullname" . }}-seeder
  labels:
  {{- include "seeder.labels" . | nindent 4 }}
data:
  BARGE_STALLION: {{ .Values.seeder.bargeStallion | quote }}
  CROISSANT_PADDLE_SKI: {{ .Values.seeder.croissantPaddleSki | quote }}
  DANCER: {{ .Values.seeder.dancer | quote }}
  ESTUARY_APE_BOON: {{ .Values.seeder.estuaryApeBoon | quote }}
  FINICKY: {{ .Values.seeder.finicky | quote }}
  INSURGENCE_CHOP_NOTEPAD: {{ .Values.seeder.insurgenceChopNotepad | quote }}
  PUMPKINSEED_MISTY_DENSITY: {{ .Values.seeder.pumpkinseedMistyDensity | quote }}
  SITE: {{ .Values.seeder.site | quote }}
  STING_WREN: {{ .Values.seeder.stingWren | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "seeder.fullname" . }}-seeder
  labels:
  {{- include "seeder.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: seeder
spec:
  replicas: {{ .Values.seeder.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: seeder
      app.kubernetes.io/name: broom
    {{- include "seeder.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: seeder
        app.kubernetes.io/name: broom
      {{- include "seeder.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: a33cf0476a4445a17cc927c06eb44002d0d264a94b3d7caf8a97c9c1b30dab35
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "seeder.fullname" . }}-seeder
        image: {{ .Values.seeder.seeder.image.repository }}:{{ .Values.seeder.seeder.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.seeder.seeder.imagePullPolicy }}
        name: seeder
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.seeder.seeder.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.seeder.seeder.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "seeder.fullname" . }}-seeder
  labels:
  {{- include "seeder.labels" . | nindent 4 }}
spec:
  type: {{ .Values.seeder.type }}
  selector:
    app.kubernetes.io/instance: seeder
    app.kubernetes.io/name: broom
  {{- include "seeder.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.seeder.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
seeder:
  bargeStallion: sushi
  croissantPaddleSki: biosphere
  dancer: beginning
  estuaryApeBoon: alliance
  finicky: malice
  insurgenceChopNotepad: appeal
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  pumpkinseedMistyDensity: weeder
  replicas: 1
  seeder:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  site: celebration
  stingWren: termination
  type: ClusterIP
