# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "curtailment.fullname" . }}-curtailment
  labels:
  {{- include "curtailment.labels" . | nindent 4 }}
data:
  GOING_METABOLITE: {{ .Values.curtailment.goingMetabolite | quote }}
  TECTONICS_FASTEN_BARBECUE: {{ .Values.curtailment.tectonicsFastenBarbecue | quote
    }}
  TRANSPARENCY_UNIQUE: {{ .Values.curtailment.transparencyUnique | quote }}
  UNDERNEATH_RAINSTORM: {{ .Values.curtailment.underneathRainstorm | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "curtailment.fullname" . }}-curtailment
  labels:
  {{- include "curtailment.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: curtailment
spec:
  replicas: {{ .Values.curtailment.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: curtailment
      app.kubernetes.io/name: enhance
    {{- include "curtailment.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: curtailment
        app.kubernetes.io/name: enhance
      {{- include "curtailment.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 5e0d04d46e1d2feca76e37dc2fdd28d4b86d39e17aefd9aa5d8173730f0848d0
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "curtailment.fullname" . }}-curtailment
        image: {{ .Values.curtailment.curtailment.image.repository }}:{{ .Values.curtailment.curtailment.image.tag
          | default .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.curtailment.curtailment.imagePullPolicy }}
        name: curtailment
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.curtailment.curtailment.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.curtailment.curtailment.containerSecurityContext
          | nindent 10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "curtailment.fullname" . }}-curtailment
  labels:
  {{- include "curtailment.labels" . | nindent 4 }}
spec:
  type: {{ .Values.curtailment.type }}
  selector:
    app.kubernetes.io/instance: curtailment
    app.kubernetes.io/name: enhance
  {{- include "curtailment.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.curtailment.ports | toYaml | nindent 2 -}}
curtailment:
  curtailment:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  goingMetabolite: comprehension
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  tectonicsFastenBarbecue: reasoning
  transparencyUnique: variable
  type: ClusterIP
  underneathRainstorm: insight
kubernetesClusterDomain: cluster.local
