# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "diabetes.fullname" . }}-diabetes
  labels:
  {{- include "diabetes.labels" . | nindent 4 }}
data:
  BARK_SLOW_WINGMAN: {{ .Values.diabetes.barkSlowWingman | quote }}
  CHARACTERIZATION: {{ .Values.diabetes.characterization | quote }}
  COMMODITY_ETHEREAL: {{ .Values.diabetes.commodityEthereal | quote }}
  CROWN_FORGERY: {{ .Values.diabetes.crownForgery | quote }}
  CYST_INDIVIDUAL_TABLET: {{ .Values.diabetes.cystIndividualTablet | quote }}
  KNEEJERK: {{ .Values.diabetes.kneejerk | quote }}
  MAIZE_ABORTIVE_POPSICLE: {{ .Values.diabetes.maizeAbortivePopsicle | quote }}
  POPULIST: {{ .Values.diabetes.populist | quote }}
  SUPERVISE_SERIES_HAZE: {{ .Values.diabetes.superviseSeriesHaze | quote }}
  TONE_ALIBI: {{ .Values.diabetes.toneAlibi | quote }}
  WATERFRONT_APPETISER: {{ .Values.diabetes.waterfrontAppetiser | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "diabetes.fullname" . }}-diabetes
  labels:
  {{- include "diabetes.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: diabetes
spec:
  replicas: {{ .Values.diabetes.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: diabetes
      app.kubernetes.io/name: farmland
    {{- include "diabetes.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: diabetes
        app.kubernetes.io/name: farmland
      {{- include "diabetes.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 6c620fb6cff38fea88c59a0661a1dcfc17fe3c5f8bacbb9d5032db785aaeade1
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "diabetes.fullname" . }}-diabetes
        image: {{ .Values.diabetes.diabetes.image.repository }}:{{ .Values.diabetes.diabetes.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.diabetes.diabetes.imagePullPolicy }}
        name: diabetes
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.diabetes.diabetes.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.diabetes.diabetes.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "diabetes.fullname" . }}-diabetes
  labels:
  {{- include "diabetes.labels" . | nindent 4 }}
spec:
  type: {{ .Values.diabetes.type }}
  selector:
    app.kubernetes.io/instance: diabetes
    app.kubernetes.io/name: farmland
  {{- include "diabetes.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.diabetes.ports | toYaml | nindent 2 -}}
diabetes:
  barkSlowWingman: convection
  characterization: daisy
  commodityEthereal: impression
  crownForgery: endpoint
  cystIndividualTablet: everything
  diabetes:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  kneejerk: rear
  maizeAbortivePopsicle: fascinated
  populist: dive
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  superviseSeriesHaze: fundraising
  toneAlibi: profile
  type: ClusterIP
  waterfrontAppetiser: answer
kubernetesClusterDomain: cluster.local
