Revert "Support configuring multiple OF controllers in ofagents"

This reverts commit 8916892a520a60efb847c61c3054da45cb28bdd8.

Change-Id: Iac27757a9ed44d9d180d5ec5cbf5ee2e542a3622
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index 4d52c1f..25d76db 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -17,7 +17,7 @@
 description: A Helm chart for Voltha based on K8S resources in Voltha project
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 2.4.1
+version: 2.4.2
 
 # app version applies to multiple components with potentially different
 # container image versions
diff --git a/voltha/templates/ofagent-go.yaml b/voltha/templates/ofagent-go.yaml
index f8f2cc2..07c2b94 100644
--- a/voltha/templates/ofagent-go.yaml
+++ b/voltha/templates/ofagent-go.yaml
@@ -64,15 +64,15 @@
         image: '{{ tpl .Values.images.ofagent_go.registry . }}{{ tpl .Values.images.ofagent_go.repository . }}:{{ tpl .Values.images.ofagent_go.tag . }}'
         imagePullPolicy: {{ tpl .Values.images.ofagent_go.pullPolicy . }}
         env:
+        - name: CONTROLLER_SERVICE
+          value: "{{ .Values.services.controller.service }}:{{ .Values.services.controller.port }}"
         - name: COMPONENT_NAME
           valueFrom:
             fieldRef:
               fieldPath: metadata.labels['app.kubernetes.io/name']
         args:
         - "/app/ofagent"
-        {{- range .Values.services.controller }}
-        - "--controller={{ .service }}:{{ .port }}"
-        {{- end }}
+        - "--controller=$(CONTROLLER_SERVICE)"
         - "--voltha=voltha-api.{{ .Release.Namespace }}.svc.cluster.local:55555"
         - "--kv_store_host=voltha-etcd-cluster-client.{{ .Release.Namespace }}.svc.cluster.local"
         - "--kv_store_port=2379"
diff --git a/voltha/templates/ofagent-py.yaml b/voltha/templates/ofagent-py.yaml
index 711c4d6..7996d80 100644
--- a/voltha/templates/ofagent-py.yaml
+++ b/voltha/templates/ofagent-py.yaml
@@ -63,13 +63,13 @@
       - name: ofagent
         image: '{{ tpl .Values.images.ofagent_py.registry . }}{{ tpl .Values.images.ofagent_py.repository . }}:{{ tpl .Values.images.ofagent_py.tag . }}'
         imagePullPolicy: {{ tpl .Values.images.ofagent_py.pullPolicy . }}
+        env:
+        - name: CONTROLLER_SERVICE
+          value: "{{ .Values.services.controller.service }}:{{ .Values.services.controller.port }}"
         args:
         - "/ofagent/ofagent/main.py"
         - "-v"
-        - "--controller"
-        {{- range .Values.services.controller }}
-        - "{{ .service }}:{{ .port }}"
-        {{- end }}
+        - "--controller=$(CONTROLLER_SERVICE)"
         - "--grpc-endpoint=voltha-api.{{ .Release.Namespace }}.svc.cluster.local:55555"
         - "--probe=:8080"
         livenessProbe:
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 313d32d..b979076 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -61,10 +61,10 @@
     service: voltha-etcd-cluster-client.voltha.svc.cluster.local
     port: 2379
 
-  # Define the list of controllers to connect to
+  # Define controller to which to connect
   controller:
-    - service: onos-openflow.default.svc.cluster.local
-      port: 6653
+    service: onos-openflow.default.svc.cluster.local
+    port: 6653
 
 # Define the recplica count for everything
 replicas: