# configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "act.fullname" . }}-act
  labels:
  {{- include "act.labels" . | nindent 4 }}
data:
  DEN_APP_DUE: {{ .Values.act.denAppDue | quote }}
  HAZELNUT_MACHINE: {{ .Values.act.hazelnutMachine | quote }}
  RESULT_UNIBODY_WATCHMAKER: {{ .Values.act.resultUnibodyWatchmaker | quote }}
  STRONG_MOTORCYCLE_ARTHUR: {{ .Values.act.strongMotorcycleArthur | quote }}
  VIBRISSAE_COMMUNITY_FOAL: {{ .Values.act.vibrissaeCommunityFoal | quote }} # deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "act.fullname" . }}-act
  labels:
  {{- include "act.labels" . | nindent 4 }}
  annotations:
    kubectl.kubernetes.io/default-container: act
spec:
  replicas: {{ .Values.act.replicas }}
  selector:
    matchLabels:
      app.kubernetes.io/instance: act
      app.kubernetes.io/name: constraint
    {{- include "act.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: act
        app.kubernetes.io/name: constraint
      {{- include "act.selectorLabels" . | nindent 8 }}
      annotations:
        checksum/config: 4ddb00727c311bdefc4a011ae08d8614248a547d4c89aeeacebfd42feed7430c
    spec:
      containers:
      - env:
        - name: KUBERNETES_CLUSTER_DOMAIN
          value: {{ quote .Values.kubernetesClusterDomain }}
        envFrom:
        - configMapRef:
            name: {{ include "act.fullname" . }}-act
        image: {{ .Values.act.act.image.repository }}:{{ .Values.act.act.image.tag | default
          .Chart.AppVersion }}
        imagePullPolicy: {{ .Values.act.act.imagePullPolicy }}
        name: act
        ports:
        - containerPort: 80
          name: http
          protocol: TCP
        resources: {{- toYaml .Values.act.act.resources | nindent 10 }}
        securityContext: {{- toYaml .Values.act.act.containerSecurityContext | nindent
          10 }}
      securityContext:
        fsGroup: 999 # service.yaml
apiVersion: v1
kind: Service
metadata:
  name: {{ include "act.fullname" . }}-act
  labels:
  {{- include "act.labels" . | nindent 4 }}
spec:
  type: {{ .Values.act.type }}
  selector:
    app.kubernetes.io/instance: act
    app.kubernetes.io/name: constraint
  {{- include "act.selectorLabels" . | nindent 4 }}
  ports:
	{{- .Values.act.ports | toYaml | nindent 2 -}}
act:
  act:
    containerSecurityContext: {}
    image:
      repository: nginx
      tag: latest
    imagePullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 200m
        memory: 200Mi
      requests:
        cpu: 200m
        memory: 200Mi
  denAppDue: dirndl
  hazelnutMachine: doorbell
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: http
  replicas: 1
  resultUnibodyWatchmaker: parenting
  strongMotorcycleArthur: questionnaire
  type: ClusterIP
  vibrissaeCommunityFoal: printing
kubernetesClusterDomain: cluster.local
