Reducing duplicated values on values files for SiaB
Reduced the amount of duplicated values between seba-ponsim values file.
To deploy, for example, the latest of seba-ponsim, now both seba-ponsim.yaml and seba-pomsim-latest.yaml values files need to be used with the specified order.
Makefile for SiaB is modified accordingly in the patch https://gerrit.opencord.org/#/c/16743/.
Also:
- removed stratumEnabled value from Mininet chart and added mnStratumSwitchCount
- moved bngAppUrl and bngAppVersion values on root of values file
Change-Id: I26b8e91f868646adc06f2c1feea72b333defd487
diff --git a/mininet/templates/mn-stratum-service.yaml b/mininet/templates/mn-stratum-service.yaml
index 0cf7d86..55fe517 100644
--- a/mininet/templates/mn-stratum-service.yaml
+++ b/mininet/templates/mn-stratum-service.yaml
@@ -16,7 +16,7 @@
# Service that exposes the gRPC port to control the stratum_bmv2 instance(s)
# running inside Mininet
-{{- if $.Values.stratumEnabled }}
+{{- if gt (.Values.mnStratumSwitchCount|int) 0 }}
apiVersion: v1
kind: Service
metadata:
@@ -30,8 +30,10 @@
spec:
type: ClusterIP
ports:
- - name: stratum-1
- port: 50001
+ {{- range $j, $junk := until (.Values.mnStratumSwitchCount|int) }}
+ - name: stratum-{{ add $j 1 }}
+ port: {{ add $j 50001 }}
+ {{- end}}
selector:
app: {{ template "mininet.name" . }}
release: {{ .Release.Name }}