# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "talent.fullname" . }}-talent
  labels:
  {{- include "talent.labels" . | nindent 4 }}
data:
  AUSPICIOUS: {{ .Values.talent.auspicious | quote }}
  CITIZENSHIP_BATTING: {{ .Values.talent.citizenshipBatting | quote }}
  COLLAR: {{ .Values.talent.collar | quote }}
  COMPETITOR_DESERVE_LUCKY: {{ .Values.talent.competitorDeserveLucky | quote }}
  ENDIVE_PREGNANCY: {{ .Values.talent.endivePregnancy | quote }}
  EXAMPLE_CLERK_TIMBER: {{ .Values.talent.exampleClerkTimber | quote }}
  FORCE: {{ .Values.talent.force | quote }}
  FRONT: {{ .Values.talent.front | quote }}
  GREAT-GRANDMOTHER_PURPOSE: {{ .Values.talent.greatGrandmotherPurpose | quote }}
  INHIBITION_ASSESSMENT: {{ .Values.talent.inhibitionAssessment | quote }}
  SQUASH: {{ .Values.talent.squash | quote }}
  TRY_ROCKET_BOND: {{ .Values.talent.tryRocketBond | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "talent.fullname" . }}-talent
  labels:
  {{- include "talent.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: talent
spec:
  replicas: {{ .Values.talent.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: talent
      app.kubernetes.io/name: cousin
    {{- include "talent.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: talent
        app.kubernetes.io/name: cousin
      {{- include "talent.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: c4c33eb808877515d565d26cd9f5e18212be699c47f06254dd68b558c74382f3
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "talent.fullname" . }}-talent
        image: {{ .Values.talent.talent.image.repository }}:{{ .Values.talent.talent.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.talent.talent.imagePullPolicy }}
        name: talent
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.talent.talent.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.talent.talent.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "talent.fullname" . }}-talent
  labels:
  {{- include "talent.labels" . | nindent 4 }}
spec:
  type: {{ .Values.talent.type }}
  selector:
    app.kubernetes.io/instance: talent
    app.kubernetes.io/name: cousin
  {{- include "talent.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.talent.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
talent:
  auspicious: eavesdropper
  citizenshipBatting: message
  collar: catamaran
  competitorDeserveLucky: sticky
  endivePregnancy: tool
  exampleClerkTimber: horror
  force: hint
  front: cuckoo
  greatGrandmotherPurpose: skate
  inhibitionAssessment: lightscreen
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  squash: currency
  talent:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  tryRocketBond: cover
  type: ClusterIP
