Index: /branches/main/array-ingress-controller/helmchart/array-ingress/templates/deployment.yaml
===================================================================
--- /branches/main/array-ingress-controller/helmchart/array-ingress/templates/deployment.yaml	(revision 12)
+++ /branches/main/array-ingress-controller/helmchart/array-ingress/templates/deployment.yaml	(working copy)
@@ -10,7 +10,7 @@
     chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
 spec:
   serviceName: {{ include "array-ingress.fullname" . }}-headless
-  replicas: 3
+  replicas: {{ .Values.replicaCount }}
   selector:
     matchLabels:
       app: {{ include "array-ingress.name" . }}
@@ -34,10 +34,21 @@
           env:
             - name: PLATFORM
               value: {{ .Values.platform }}
+            {{- if and .Values.apv.enabled .Values.asf.enabled }}
+            {{- fail "Both APV and ASF cannot be enabled at the same time" }}
+            {{- else if not (or .Values.apv.enabled .Values.asf.enabled) }}
+            {{- fail "Atlease One device (APV or ASF) must be enabled" }}
+            {{- end }}
+            {{- if .Values.apv.enabled }}
             - name: CONTROLLER_TYPE
-              value: {{ .Values.controller_type }}
+              value: APV
+            {{- else if .Values.asf.enabled }}
+            - name: CONTROLLER_TYPE
+              value: ASF
+            {{- end }}
             - name: CONTROLLER_NAMESPACE
               value: {{ .Values.namespace }}
+            {{- if .Values.apv.enabled }}
             - name: APV_IP
               value: {{ .Values.apv.ip }}
             - name: APV_USERNAME
@@ -48,6 +59,18 @@
               value: {{ .Values.apv.insecureskip | quote }}
             - name: APV_TIMEOUT
               value: {{ .Values.apv.timeout }}
+            {{- else if .Values.asf.enabled }}
+            - name: ASF_IP
+              value: {{ .Values.asf.ip }}
+            - name: ASF_USERNAME
+              value: {{ .Values.asf.username }}
+            - name: ASF_PASSWORD
+              value: {{ .Values.asf.password }}
+            - name: ASF_INSECURE_SKIP
+              value: {{ .Values.asf.insecureskip | quote }}
+            - name: ASF_TIMEOUT
+              value: {{ .Values.asf.timeout }}
+            {{- end }}
             - name: EMAIL_FROM
               value: {{ .Values.email.from }}
             - name: EMAIL_PASSWORD
@@ -56,6 +79,7 @@
               value: {{ .Values.email.recipients }}
             - name: EMAIL_CC
               value: {{ .Values.email.cc }}
+
           volumeMounts:
             - name: log-volume
               mountPath: {{ .Values.pvc.logMountPath }}
