# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "pitching.fullname" . }}-pitching
  labels:
  {{- include "pitching.labels" . | nindent 4 }}
data:
  BOXER_FEATURE: {{ .Values.pitching.boxerFeature | quote }}
  CHIMPANZEE_VARIANT_INTEGRITY: {{ .Values.pitching.chimpanzeeVariantIntegrity |
    quote }}
  LOQUAT_DISEASE: {{ .Values.pitching.loquatDisease | quote }}
  NOTION_BIOPSY_POLITICS: {{ .Values.pitching.notionBiopsyPolitics | quote }}
  PLATE_ALIKE_SCENARIO: {{ .Values.pitching.plateAlikeScenario | quote }}
  PROVIDENCE_MUSHY_GLIMPSE: {{ .Values.pitching.providenceMushyGlimpse | quote }}
  SPURIOUS_BONGO_ROCKER: {{ .Values.pitching.spuriousBongoRocker | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "pitching.fullname" . }}-pitching
  labels:
  {{- include "pitching.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: pitching
spec:
  replicas: {{ .Values.pitching.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: pitching
      app.kubernetes.io/name: outlet
    {{- include "pitching.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: pitching
        app.kubernetes.io/name: outlet
      {{- include "pitching.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 55375e34640754a186c435cb19225742599e739d13e64aff9033b44934f2f99c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "pitching.fullname" . }}-pitching
        image: {{ .Values.pitching.pitching.image.repository }}:{{ .Values.pitching.pitching.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.pitching.pitching.imagePullPolicy }}
        name: pitching
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.pitching.pitching.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.pitching.pitching.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "pitching.fullname" . }}-pitching
  labels:
  {{- include "pitching.labels" . | nindent 4 }}
spec:
  type: {{ .Values.pitching.type }}
  selector:
    app.kubernetes.io/instance: pitching
    app.kubernetes.io/name: outlet
  {{- include "pitching.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.pitching.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
pitching:
  boxerFeature: hoof
  chimpanzeeVariantIntegrity: booty
  loquatDisease: abortion
  notionBiopsyPolitics: potato
  pitching:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  plateAlikeScenario: garlic
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  providenceMushyGlimpse: lip
  replicas: 1
  spuriousBongoRocker: person
  type: ClusterIP
