VOL-1701 - modify existing open olt template to support either go or python impl
Change-Id: I6fc52bdd524c5684634a5b51ad69e5f922b696a7
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index f62d422..2735672 100644
--- a/voltha-adapter-openolt/Chart.yaml
+++ b/voltha-adapter-openolt/Chart.yaml
@@ -17,5 +17,5 @@
description: A Helm chart for Voltha OpenOLT Adapter
icon: https://guide.opencord.org/logos/cord.svg
-version: 2.0.0
+version: 2.0.1
appVersion: 2.0.0
diff --git a/voltha-adapter-openolt/templates/adapters-openolt.yaml b/voltha-adapter-openolt/templates/adapters-openolt.yaml
index 4e9c798..1047629 100644
--- a/voltha-adapter-openolt/templates/adapters-openolt.yaml
+++ b/voltha-adapter-openolt/templates/adapters-openolt.yaml
@@ -31,9 +31,23 @@
spec:
containers:
- name: adapter-open-olt
+ {{- if .Values.use_go }}
+ image: {{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl .Values.images.adapter_open_olt.tag_go . }}
+ {{- else }}
image: {{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl .Values.images.adapter_open_olt.tag . }}
+ {{- end }}
imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }}
args:
+ {{- if .Values.use_go }}
+ - "/app/openolt"
+ - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
+ - "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
+ - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
+ - "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
+ - "--core_topic=rwcore"
+ - "--kv_store_host={{ .Values.services.etcd.service }}"
+ - "--kv_store_port={{ .Values.services.etcd.port }}"
+ {{- else}}
- "/voltha/adapters/openolt/main.py"
- "--verbose"
- "--kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}"
@@ -41,3 +55,4 @@
- "--core_topic=rwcore"
- "--backend=etcd"
- "--etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}"
+ {{- end}}
diff --git a/voltha-adapter-openolt/values.yaml b/voltha-adapter-openolt/values.yaml
index 467d5d6..7610fa4 100644
--- a/voltha-adapter-openolt/values.yaml
+++ b/voltha-adapter-openolt/values.yaml
@@ -13,6 +13,8 @@
# limitations under the License.
---
+use_go: false
+
# Default overrides
defaults:
image_registry:
@@ -43,5 +45,6 @@
adapter_open_olt:
registry: '{{ .Values.defaults.image_registry | default "" }}'
repository: '{{ .Values.defaults.image_org | default "voltha/" }}voltha-openolt-adapter'
+ tag_go: '{{ .Values.defaults.image_tag | default "master-go" }}'
tag: '{{ .Values.defaults.image_tag | default .Chart.AppVersion }}'
pullPolicy: '{{ .Values.defaults.image_pullPolicy | default "Always" }}'