VOL-1891 - support adding labels on install
Change-Id: Iff41309926de67691a2642904d53356e15d2531f
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index 3adaf3c..8ed2821 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.1.0
+version: 2.1.1
appVersion: 2.1.1
diff --git a/voltha-adapter-openolt/templates/adapters-openolt.yaml b/voltha-adapter-openolt/templates/adapters-openolt.yaml
index c410fd1..ae4ae38 100644
--- a/voltha-adapter-openolt/templates/adapters-openolt.yaml
+++ b/voltha-adapter-openolt/templates/adapters-openolt.yaml
@@ -17,6 +17,19 @@
metadata:
name: adapter-open-olt
namespace: {{ .Release.Namespace }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openolt_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "openolt_deployment_labels" }}
+ {{- range $key, $val := .Values.openolt_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.adapter_open_olt }}
selector:
@@ -32,6 +45,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "openolt_pod_labels" }}
+ {{- range $key, $val := .Values.openolt_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha-adapter-openonu/Chart.yaml b/voltha-adapter-openonu/Chart.yaml
index aae9589..dade7e4 100644
--- a/voltha-adapter-openonu/Chart.yaml
+++ b/voltha-adapter-openonu/Chart.yaml
@@ -17,5 +17,5 @@
description: A Helm chart for Voltha OpenONU Adapter
icon: https://guide.opencord.org/logos/cord.svg
-version: 2.1.0
+version: 2.1.1
appVersion: 2.1.0
diff --git a/voltha-adapter-openonu/templates/adapters-openonu.yaml b/voltha-adapter-openonu/templates/adapters-openonu.yaml
index 4ccd9c5..98c4b3e 100644
--- a/voltha-adapter-openonu/templates/adapters-openonu.yaml
+++ b/voltha-adapter-openonu/templates/adapters-openonu.yaml
@@ -17,6 +17,19 @@
metadata:
name: adapter-open-onu
namespace: {{ .Release.Namespace }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "openonu_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "openonu_deployment_labels" }}
+ {{- range $key, $val := .Values.openonu_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.adapter_open_onu }}
selector:
@@ -32,6 +45,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "openonu_pod_labels" }}
+ {{- range $key, $val := .Values.openonu_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha-adapter-simulated/Chart.yaml b/voltha-adapter-simulated/Chart.yaml
index ec49f83..d6d20ee 100644
--- a/voltha-adapter-simulated/Chart.yaml
+++ b/voltha-adapter-simulated/Chart.yaml
@@ -17,5 +17,5 @@
description: A Helm chart for Voltha Simulated Adaptyer based on K8S resources in Voltha project
icon: https://guide.opencord.org/logos/cord.svg
-version: 2.1.1
+version: 2.1.2
appVersion: 2.1.1
diff --git a/voltha-adapter-simulated/templates/adapters-simulated.yaml b/voltha-adapter-simulated/templates/adapters-simulated.yaml
index 4849648..4012c20 100644
--- a/voltha-adapter-simulated/templates/adapters-simulated.yaml
+++ b/voltha-adapter-simulated/templates/adapters-simulated.yaml
@@ -18,6 +18,19 @@
metadata:
name: adapter-simulated-olt
namespace: {{ .Release.Namespace }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simolt_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "simolt_deployment_labels" }}
+ {{- range $key, $val := .Values.simolt_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.adapter_simulated_olt }}
selector:
@@ -33,6 +46,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "simolt_pod_labels" }}
+ {{- range $key, $val := .Values.simolt_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
@@ -57,6 +80,19 @@
metadata:
name: adapter-simulated-onu
namespace: {{ .Release.Namespace }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "simonu_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "simonu_deployment_labels" }}
+ {{- range $key, $val := .Values.simonu_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.adapter_simulated_onu }}
selector:
@@ -72,6 +108,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "simonu_pod_labels" }}
+ {{- range $key, $val := .Values.simonu_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index e0cf849..6bf5823 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -17,5 +17,5 @@
description: A Helm chart for Voltha based on K8S resources in Voltha project
icon: https://guide.opencord.org/logos/cord.svg
-version: 2.1.1
+version: 2.1.2
appVersion: 2.1.1
diff --git a/voltha/templates/api-server.yaml b/voltha/templates/api-server.yaml
index 2168d9a..14fa964 100644
--- a/voltha/templates/api-server.yaml
+++ b/voltha/templates/api-server.yaml
@@ -33,6 +33,19 @@
metadata:
name: voltha-api-server
serviceAccountName: {{ .Values.serviceaccount }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "api_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "api_deployment_labels" }}
+ {{- range $key, $val := .Values.api_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.afrouter }}
template:
@@ -45,6 +58,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "api_pod_labels" }}
+ {{- range $key, $val := .Values.api_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha/templates/cli.yaml b/voltha/templates/cli.yaml
index e185730..4ec8519 100644
--- a/voltha/templates/cli.yaml
+++ b/voltha/templates/cli.yaml
@@ -36,6 +36,19 @@
metadata:
name: voltha-cli-server
serviceAccountName: {{ .Values.serviceaccount }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "cli_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "cli_deployment_labels" }}
+ {{- range $key, $val := .Values.cli_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.cli }}
template:
@@ -48,6 +61,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "cli_pod_labels" }}
+ {{- range $key, $val := .Values.cli_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha/templates/ofagent.yaml b/voltha/templates/ofagent.yaml
index a2d2086..ca8e5d5 100644
--- a/voltha/templates/ofagent.yaml
+++ b/voltha/templates/ofagent.yaml
@@ -18,6 +18,19 @@
metadata:
name: voltha-ofagent
serviceAccountName: {{ .Values.serviceaccount }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "ofagent_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "ofagent_deployment_labels" }}
+ {{- range $key, $val := .Values.ofagent_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.ofagent }}
template:
@@ -30,6 +43,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "ofagent_pod_labels" }}
+ {{- range $key, $val := .Values.ofagent_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha/templates/ro-core.yaml b/voltha/templates/ro-core.yaml
index de2e2c6..1fb0f1a 100644
--- a/voltha/templates/ro-core.yaml
+++ b/voltha/templates/ro-core.yaml
@@ -48,6 +48,19 @@
metadata:
name: voltha-ro-core
serviceAccountName: {{ .Values.serviceaccount }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "ro_core_deployment_labels") }}
+ labels:
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "ro_core_deployment_labels" }}
+ {{- range $key, $val := .Values.ro_core_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: {{ .Values.replicas.ro_core }}
selector:
@@ -65,6 +78,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ {{- if hasKey .Values "extra_pod_labels" }}
+ {{- range $key, $val := .Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey .Values "ro_core_pod_labels" }}
+ {{- range $key, $val := .Values.ro_core_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec:
diff --git a/voltha/templates/rw-core.yaml b/voltha/templates/rw-core.yaml
index fe8682f..022aa9c 100644
--- a/voltha/templates/rw-core.yaml
+++ b/voltha/templates/rw-core.yaml
@@ -65,6 +65,19 @@
metadata:
name: voltha-rw-core-{{ $cluster }}{{ $cluster_core_id }}
serviceAccountName: {{ $root.Values.serviceaccount }}
+ {{- if or (hasKey $root.Values "extra_deployment_labels") (hasKey $root.Values "rw_core_deployment_labels") }}
+ labels:
+ {{- if hasKey $root.Values "extra_deployment_labels" }}
+ {{- range $key, $val := $root.Values.extra_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey $root.Values "rw_core_deployment_labels" }}
+ {{- range $key, $val := $root.Values.rw_core_deployment_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
spec:
replicas: 1
selector:
@@ -84,6 +97,16 @@
app.kubernetes.io/part-of: "voltha"
app.kubernetes.io/managed-by: {{ quote $root.Release.Service }}
helm.sh/chart: "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}"
+ {{- if hasKey $root.Values "extra_pod_labels" }}
+ {{- range $key, $val := $root.Values.extra_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
+ {{- if hasKey $root.Values "rw_core_pod_labels" }}
+ {{- range $key, $val := $root.Values.rw_core_pod_labels }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
+ {{- end }}
annotations:
cni: "calico"
spec: