# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "lace.fullname" . }}-lace
  labels:
  {{- include "lace.labels" . | nindent 4 }}
data:
  ANTERIOR_TAG_CHEST: {{ .Values.lace.anteriorTagChest | quote }}
  BADGER_VOYAGE: {{ .Values.lace.badgerVoyage | quote }}
  COMPLIANCE_DULCIMER_LOOPHOLE: {{ .Values.lace.complianceDulcimerLoophole | quote
    }}
  EVIL_SULFUR_RESIDENT: {{ .Values.lace.evilSulfurResident | quote }}
  GOODBYE: {{ .Values.lace.goodbye | quote }}
  HULL_POPPY: {{ .Values.lace.hullPoppy | quote }}
  LACKING: {{ .Values.lace.lacking | quote }}
  MUDDLED_FENG: {{ .Values.lace.muddledFeng | quote }}
  NURSE: {{ .Values.lace.nurse | quote }}
  QUARTET_ROSEMARY_HOMELAND: {{ .Values.lace.quartetRosemaryHomeland | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "lace.fullname" . }}-lace
  labels:
  {{- include "lace.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: lace
spec:
  replicas: {{ .Values.lace.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: lace
      app.kubernetes.io/name: stick
    {{- include "lace.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: lace
        app.kubernetes.io/name: stick
      {{- include "lace.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 0d0b23795bf0cc4f4b0f8dc6571cd9e763ac7bb8a692cc310a35b2532a31bbec
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "lace.fullname" . }}-lace
        image: {{ .Values.lace.lace.image.repository }}:{{ .Values.lace.lace.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.lace.lace.imagePullPolicy }}
        name: lace
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.lace.lace.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.lace.lace.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "lace.fullname" . }}-lace
  labels:
  {{- include "lace.labels" . | nindent 4 }}
spec:
  type: {{ .Values.lace.type }}
  selector:
    app.kubernetes.io/instance: lace
    app.kubernetes.io/name: stick
  {{- include "lace.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.lace.ports | toYaml | nindent 2 -}}
kubernetesClusterDomain: cluster.local
lace:
  anteriorTagChest: preserve
  badgerVoyage: call
  complianceDulcimerLoophole: constellation
  evilSulfurResident: state
  goodbye: squirrel
  hullPoppy: ecumenist
  lace:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  lacking: criminal
  muddledFeng: legislation
  nurse: copying
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  quartetRosemaryHomeland: embarrass
  replicas: 1
  type: ClusterIP
