# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "label.fullname" . }}-label
  labels:
  {{- include "label.labels" . | nindent 4 }}
data:
  COLLAPSE: {{ .Values.label.collapse | quote }}
  DIVERGENT: {{ .Values.label.divergent | quote }}
  JACKFRUIT_BUILDING_CHOICE: {{ .Values.label.jackfruitBuildingChoice | quote }}
  KARATE: {{ .Values.label.karate | quote }}
  MANY_GUEST_OFFENCE: {{ .Values.label.manyGuestOffence | quote }}
  MINERAL_ROAR: {{ .Values.label.mineralRoar | quote }}
  SOCIETY: {{ .Values.label.society | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "label.fullname" . }}-label
  labels:
  {{- include "label.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: label
spec:
  replicas: {{ .Values.label.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: label
      app.kubernetes.io/name: analog
    {{- include "label.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: label
        app.kubernetes.io/name: analog
      {{- include "label.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 2554061a228fcfe1412a01d3adcc99ba71bd5f63409a6d9a63f3ed7f0a2893bf
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "label.fullname" . }}-label
        image: {{ .Values.label.label.image.repository }}:{{ .Values.label.label.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.label.label.imagePullPolicy }}
        name: label
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.label.label.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.label.label.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "label.fullname" . }}-label
  labels:
  {{- include "label.labels" . | nindent 4 }}
spec:
  type: {{ .Values.label.type }}
  selector:
    app.kubernetes.io/instance: label
    app.kubernetes.io/name: analog
  {{- include "label.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.label.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
label:
  collapse: stride
  divergent: tornado
  jackfruitBuildingChoice: agreeable
  karate: foundation
  label:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  manyGuestOffence: enlist
  mineralRoar: modem
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  society: monastery
  type: ClusterIP
