# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "practice.fullname" . }}-practice
  labels:
  {{- include "practice.labels" . | nindent 4 }}
data:
  ARCHAEOLOGIST_HEMISPHERE: {{ .Values.practice.archaeologistHemisphere | quote }}
  AWFUL_MEANING_FLOWERY: {{ .Values.practice.awfulMeaningFlowery | quote }}
  DIVER_BARGE: {{ .Values.practice.diverBarge | quote }}
  FEMALE_PRECEDENCE_REBELLION: {{ .Values.practice.femalePrecedenceRebellion | quote
    }}
  LION: {{ .Values.practice.lion | quote }}
  PREOCCUPATION: {{ .Values.practice.preoccupation | quote }}
  PRUNE_STAKE: {{ .Values.practice.pruneStake | quote }}
  QUICKSAND_FANTASY_EJECTOR: {{ .Values.practice.quicksandFantasyEjector | quote
    }}
  STUMBLING_BRICK: {{ .Values.practice.stumblingBrick | quote }}
  SWEATSHOP_COFFIN_BATH: {{ .Values.practice.sweatshopCoffinBath | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "practice.fullname" . }}-practice
  labels:
  {{- include "practice.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: practice
spec:
  replicas: {{ .Values.practice.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: practice
      app.kubernetes.io/name: face
    {{- include "practice.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: practice
        app.kubernetes.io/name: face
      {{- include "practice.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 29236c2993335a1b41d73660272308a0363f1d28e7d034e5b6068eafe3b9aa68
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "practice.fullname" . }}-practice
        image: {{ .Values.practice.practice.image.repository }}:{{ .Values.practice.practice.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.practice.practice.imagePullPolicy }}
        name: practice
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.practice.practice.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.practice.practice.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "practice.fullname" . }}-practice
  labels:
  {{- include "practice.labels" . | nindent 4 }}
spec:
  type: {{ .Values.practice.type }}
  selector:
    app.kubernetes.io/instance: practice
    app.kubernetes.io/name: face
  {{- include "practice.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.practice.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
practice:
  archaeologistHemisphere: hovercraft
  awfulMeaningFlowery: ruthless
  diverBarge: terrace
  femalePrecedenceRebellion: tomorrow
  lion: site
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  practice:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  preoccupation: mainland
  pruneStake: consolidate
  quicksandFantasyEjector: principal
  replicas: 1
  stumblingBrick: maker
  sweatshopCoffinBath: log
  type: ClusterIP
