# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "health-care.fullname" . }}-health-care
  labels:
  {{- include "health-care.labels" . | nindent 4 }}
data:
  AGREE: {{ .Values.healthCare.agree | quote }}
  BANJO_OPPORTUNIST_DEEP: {{ .Values.healthCare.banjoOpportunistDeep | quote }}
  HOLE_PODCAST: {{ .Values.healthCare.holePodcast | quote }}
  SUFFOCATION_SCENERY_SAUERKRAUT: {{ .Values.healthCare.suffocationScenerySauerkraut
    | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "health-care.fullname" . }}-health-care
  labels:
  {{- include "health-care.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: health-care
spec:
  replicas: {{ .Values.healthCare.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: health-care
      app.kubernetes.io/name: entree
    {{- include "health-care.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: health-care
        app.kubernetes.io/name: entree
      {{- include "health-care.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 490cc7004b267b9adb9ffcfcfc011a9de8143456120ff5122d8908e852cc7182
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "health-care.fullname" . }}-health-care
        image: {{ .Values.healthCare.healthCare.image.repository }}:{{ .Values.healthCare.healthCare.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.healthCare.healthCare.imagePullPolicy }}
        name: health-care
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.healthCare.healthCare.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.healthCare.healthCare.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "health-care.fullname" . }}-health-care
  labels:
  {{- include "health-care.labels" . | nindent 4 }}
spec:
  type: {{ .Values.healthCare.type }}
  selector:
    app.kubernetes.io/instance: health-care
    app.kubernetes.io/name: entree
  {{- include "health-care.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.healthCare.ports | toYaml | nindent 2 -}}
healthCare:
  agree: chatter
  banjoOpportunistDeep: easel
  healthCare:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  holePodcast: community
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  suffocationScenerySauerkraut: tap
  type: ClusterIP
kubernetesClusterDomain: cluster.local
