# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "family.fullname" . }}-family
  labels:
  {{- include "family.labels" . | nindent 4 }}
data:
  APRICOT_LECTURE_HILARIOUS: {{ .Values.family.apricotLectureHilarious | quote }}
  FLOAT: {{ .Values.family.float | quote }}
  HEAL_FIREPLACE: {{ .Values.family.healFireplace | quote }}
  INGRATE: {{ .Values.family.ingrate | quote }}
  INSURANCE_BARK: {{ .Values.family.insuranceBark | quote }}
  MATTRESS: {{ .Values.family.mattress | quote }}
  READING_CULTURED_MISSILE: {{ .Values.family.readingCulturedMissile | quote }}
  SHIPPER: {{ .Values.family.shipper | quote }}
  WOMANLY_ANALYSIS_COPYRIGHT: {{ .Values.family.womanlyAnalysisCopyright | quote
    }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "family.fullname" . }}-family
  labels:
  {{- include "family.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: family
spec:
  replicas: {{ .Values.family.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: family
      app.kubernetes.io/name: fancy
    {{- include "family.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: family
        app.kubernetes.io/name: fancy
      {{- include "family.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 1f54f12c533ff56de652f7d0d05dfcd8abc4f52f300a9fc27bca8d2b2060bf7b
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "family.fullname" . }}-family
        image: {{ .Values.family.family.image.repository }}:{{ .Values.family.family.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.family.family.imagePullPolicy }}
        name: family
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.family.family.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.family.family.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "family.fullname" . }}-family
  labels:
  {{- include "family.labels" . | nindent 4 }}
spec:
  type: {{ .Values.family.type }}
  selector:
    app.kubernetes.io/instance: family
    app.kubernetes.io/name: fancy
  {{- include "family.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.family.ports | toYaml | nindent 2 -}}
family:
  apricotLectureHilarious: illustrious
  family:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  float: blight
  healFireplace: cobbler
  ingrate: attenuation
  insuranceBark: live
  mattress: lend
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  readingCulturedMissile: vascular
  replicas: 1
  shipper: unable
  type: ClusterIP
  womanlyAnalysisCopyright: sparkle
kubernetesClusterDomain: cluster.local
