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/Chart.yaml b/mininet/Chart.yaml
index c668bcb..9f2322d 100644
--- a/mininet/Chart.yaml
+++ b/mininet/Chart.yaml
@@ -17,4 +17,4 @@
appVersion: 1.0.0
description: A Helm chart for Mininet
name: mininet
-version: 1.1.1
+version: 1.1.2
diff --git a/mininet/templates/deployment.yaml b/mininet/templates/deployment.yaml
index 90d54b2..ba653b7 100644
--- a/mininet/templates/deployment.yaml
+++ b/mininet/templates/deployment.yaml
@@ -40,7 +40,7 @@
- name: {{ .Chart.Name }}
image: "{{ .Values.global.registry }}{{ .Values.images.mininet.repository }}:{{ tpl .Values.images.mininet.tag . }}"
imagePullPolicy: {{ .Values.images.mininet.pullPolicy }}
-{{- if $.Values.stratumEnabled }}
+{{- if gt ($.Values.mnStratumSwitchCount|int) 0 }}
command: ["python"]
{{- end }}
args: [{{ .Values.topoScript }}]
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 }}
diff --git a/mininet/toposcripts/topo_sdbng.py b/mininet/toposcripts/topo_sdbng.py
index 0fb1683..3dae686 100644
--- a/mininet/toposcripts/topo_sdbng.py
+++ b/mininet/toposcripts/topo_sdbng.py
@@ -36,7 +36,7 @@
info( '*** Creating hosts\n' )
h1 = net.addHost( 'h1' ) # PPPoE Server
- h2 = net.addHost( 'h2', ip='10.10.10.1/24' ) # Upstream
+ h2 = net.addHost( 'h2', ip='10.10.10.1/24', mac="00:66:77:88:99:AA") # Upstream
# FIXME: enable multicast
# h3 = net.addHost( 'h3')
diff --git a/mininet/values.yaml b/mininet/values.yaml
index 1916755..8437a3f 100644
--- a/mininet/values.yaml
+++ b/mininet/values.yaml
@@ -49,7 +49,7 @@
- olt
topologyKey: kubernetes.io/hostname
-stratumEnabled: false
+mnStratumSwitchCount: 0
topoScript: '/toposcripts/topo.py'
onosOpenflowSvc: "onos-openflow.default.svc.cluster.local"
vlanMatchDepth: 2