[VOL-3768] Passing list of allowed vendor IDs trough helm as a startup parameter
Change-Id: I21352077a3c6803e1869188a18356a89a44af455
diff --git a/voltha-adapter-openonu/templates/_helpers.tpl b/voltha-adapter-openonu/templates/_helpers.tpl
index bf89b45..2cf8200 100644
--- a/voltha-adapter-openonu/templates/_helpers.tpl
+++ b/voltha-adapter-openonu/templates/_helpers.tpl
@@ -15,9 +15,15 @@
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
{{/* Create a default fully qualified app name. We truncate at 63 chars because . . . */}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- $fullname := default (printf "%s-%s" .Release.Name $name) .Values.fullNameOverride -}}
{{- $fullname | trunc 63 | trimSuffix "-" -}}
{{- end -}}
+
+{{/* Comma separated list of allowed ONU Vendors */}}
+{{- define "allowed_onu_vendors" -}}
+{{- join "," .Values.allowed_onu_vendors}}
+{{- end -}}
diff --git a/voltha-adapter-openonu/templates/openonu-go-deploy.yaml b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
index 84bb42b..500db47 100644
--- a/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
+++ b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
@@ -98,6 +98,7 @@
- "--max_timeout_interadapter_comm={{ tpl .Values.adapter_open_onu.max_timeout_interadapter_comm . }}"
- "--trace_enabled={{ .Values.global.tracing.enabled }}"
- "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+ - "--allowed_onu_vendors={{ template "allowed_onu_vendors" . }}"
{{- if .Values.securityContext.enabled }}
securityContext:
allowPrivilegeEscalation: false