# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "dentist.fullname" . }}-dentist
  labels:
  {{- include "dentist.labels" . | nindent 4 }}
data:
  BEASTIE_GRIT_SENSE: {{ .Values.dentist.beastieGritSense | quote }}
  CIVILIZATION_EXCESS_SKULL: {{ .Values.dentist.civilizationExcessSkull | quote }}
  DISTINCTION_SALE: {{ .Values.dentist.distinctionSale | quote }}
  EXPEDITE: {{ .Values.dentist.expedite | quote }}
  FORUM_MOP: {{ .Values.dentist.forumMop | quote }}
  LINGUISTICS_AHEAD_TENSE: {{ .Values.dentist.linguisticsAheadTense | quote }}
  MUTE_TAMBOUR: {{ .Values.dentist.muteTambour | quote }}
  NOUGAT: {{ .Values.dentist.nougat | quote }}
  REJECT_INVESTIGATE_BUYING: {{ .Values.dentist.rejectInvestigateBuying | quote }}
  SEPAL: {{ .Values.dentist.sepal | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dentist.fullname" . }}-dentist
  labels:
  {{- include "dentist.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: dentist
spec:
  replicas: {{ .Values.dentist.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: dentist
      app.kubernetes.io/name: announcement
    {{- include "dentist.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: dentist
        app.kubernetes.io/name: announcement
      {{- include "dentist.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: e7c7ae7ae1d04a12da5fc4c9adc320c4ae4e072e0a1332874650afa1875c4a34
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "dentist.fullname" . }}-dentist
        image: {{ .Values.dentist.dentist.image.repository }}:{{ .Values.dentist.dentist.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.dentist.dentist.imagePullPolicy }}
        name: dentist
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.dentist.dentist.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.dentist.dentist.containerSecurityContext |
          nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "dentist.fullname" . }}-dentist
  labels:
  {{- include "dentist.labels" . | nindent 4 }}
spec:
  type: {{ .Values.dentist.type }}
  selector:
    app.kubernetes.io/instance: dentist
    app.kubernetes.io/name: announcement
  {{- include "dentist.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.dentist.ports | toYaml | nindent 2 -}}
dentist:
  beastieGritSense: frown
  civilizationExcessSkull: modeling
  dentist:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  distinctionSale: vertigo
  expedite: surround
  forumMop: nightmare
  linguisticsAheadTense: goofy
  muteTambour: teacher
  nougat: lifted
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  rejectInvestigateBuying: cauliflower
  replicas: 1
  sepal: softball
  type: ClusterIP
kubernetesClusterDomain: cluster.local
