VOL-3183 - chart best practice updates
- separated each resource into its own template
- added security context for runas
- added namespace to metadata
- added release name as part of selector
Change-Id: I2a63d099f6bbc4b0615addceccfbd04cff09ef4f
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index c44c179..f338094 100644
--- a/voltha-adapter-openolt/Chart.yaml
+++ b/voltha-adapter-openolt/Chart.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,10 +11,26 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+---
+apiVersion: "v1"
+name: "voltha-adapter-openolt"
+version: 2.4.4
+description: "A Helm chart for Voltha OpenOLT Adapter"
+keywords:
+ - "onf"
+ - "voltha"
+ - "adapter"
+ - "olt"
+ - "open"
+home: "https://www.opennetworking.org/voltha"
+icon: "https://guide.opencord.org/logos/voltha.svg"
+sources:
+ - "https://github.com/opencord/voltha-openolt-adapter"
+maintainers:
+ - name: "Open Networking Foundation"
+ email: "info@opennetworking.org"
+ url: "https://www.opennetworking.org"
-name: voltha-adapter-openolt
-description: A Helm chart for Voltha OpenOLT Adapter
-icon: https://guide.opencord.org/logos/cord.svg
-
-version: 2.4.3
+# appVersion refers to multiple components with potentially different
+# container image versions.
appVersion: 2.4.1
diff --git a/voltha-adapter-openolt/templates/adapters-openolt.yaml b/voltha-adapter-openolt/templates/openolt-deploy.yaml
similarity index 90%
rename from voltha-adapter-openolt/templates/adapters-openolt.yaml
rename to voltha-adapter-openolt/templates/openolt-deploy.yaml
index aa3d6b8..9173980 100644
--- a/voltha-adapter-openolt/templates/adapters-openolt.yaml
+++ b/voltha-adapter-openolt/templates/openolt-deploy.yaml
@@ -12,24 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $log_level := tpl .Values.adapter_open_olt.log_level . | upper }}
-
-{{- if .Values.profiler.enabled }}
-apiVersion: v1
-kind: Service
-metadata:
- name: adapter-open-olt-profiler
- serviceAccountName: {{ .Values.serviceaccount }}
-spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- clusterIP: None
- ports:
- - name: profiler
- port: 6060
- targetPort: 6060
- selector:
- app: adapter-open-olt
---
-{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -52,10 +35,13 @@
selector:
matchLabels:
app: adapter-open-olt
+ release: {{ .Release.Name }}
template:
metadata:
+ namespace: {{ .Release.Namespace }}
labels:
app: adapter-open-olt
+ release: {{ .Release.Name }}
app.kubernetes.io/name: "adapter-open-olt"
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
@@ -72,14 +58,18 @@
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
- annotations:
- cni: "calico"
spec:
+ {{- if .Values.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.securityContext.runAsUser }}
+ runAsGroup: {{ .Values.securityContext.runAsGroup }}
+ fsGroup: {{ .Values.securityContext.fsGroup }}
+ {{- end }}
containers:
- name: adapter-open-olt
image: '{{ tpl .Values.images.adapter_open_olt.registry . }}{{ tpl .Values.images.adapter_open_olt.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_olt.tag . ) . }}'
imagePullPolicy: {{ tpl .Values.images.adapter_open_olt.pullPolicy . }}
- env:
+ env:
- name: COMPONENT_NAME
valueFrom:
fieldRef:
diff --git a/voltha-adapter-openolt/templates/openolt-profile-svc.yaml b/voltha-adapter-openolt/templates/openolt-profile-svc.yaml
new file mode 100644
index 0000000..f04e9fb
--- /dev/null
+++ b/voltha-adapter-openolt/templates/openolt-profile-svc.yaml
@@ -0,0 +1,31 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+{{- if .Values.profiler.enabled }}
+{{- $log_level := tpl .Values.adapter_open_olt.log_level . | upper }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: adapter-open-olt-profiler
+ namespace: {{ .Release.Namespace }}
+spec:
+ clusterIP: None
+ ports:
+ - name: profiler
+ port: 6060
+ targetPort: 6060
+ selector:
+ app: adapter-open-olt
+ release: {{ .Release.Name }}
+{{- end }}
diff --git a/voltha-adapter-openolt/values.yaml b/voltha-adapter-openolt/values.yaml
index 4090902..3f609f1 100644
--- a/voltha-adapter-openolt/values.yaml
+++ b/voltha-adapter-openolt/values.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+---
# Default overrides
defaults:
@@ -23,25 +23,32 @@
topics:
core_topic: "rwcore"
adapter_open_olt_topic: "openolt"
-
+
# Define prefix path for etcd
- # If you're running multiple voltha stacks the this value
+ # If you're running multiple voltha stacks the this value
# should be unique across the stacks.
kv_store_data_prefix: "service/voltha"
+# Default security context under which the containers run
+securityContext:
+ enabled: true
+ fsGroup: 1001
+ runAsUser: 1001
+ runAsGroup: 1001
+
# Define connectivity to required services
services:
kafka:
adapter:
- service: voltha-kafka.voltha.svc.cluster.local
+ service: kafka
port: 9092
cluster:
- service: voltha-kafka.voltha.svc.cluster.local
+ service: kafka
port: 9092
# Define connectivity to etcd
etcd:
- service: voltha-etcd-cluster-client.voltha.svc.cluster.local
+ service: etcd
port: 2379
# Expose the golang pprof webserver, if enabled
diff --git a/voltha-adapter-openonu/Chart.yaml b/voltha-adapter-openonu/Chart.yaml
index 7c85984..450d410 100644
--- a/voltha-adapter-openonu/Chart.yaml
+++ b/voltha-adapter-openonu/Chart.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,9 +11,26 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+---
+apiVersion: "v1"
+name: "voltha-adapter-openonu"
+version: 2.3.8
+description: "A Helm chart for Voltha OpenONU Adapter"
+keywords:
+ - "onf"
+ - "voltha"
+ - "adapter"
+ - "onu"
+ - "open"
+home: "https://www.opennetworking.org/voltha"
+icon: "https://guide.opencord.org/logos/voltha.svg"
+sources:
+ - "https://github.com/opencord/voltha-openonu-adapter"
+maintainers:
+ - name: "Open Networking Foundation"
+ email: "info@opennetworking.org"
+ url: "https://www.opennetworking.org"
-name: voltha-adapter-openonu
-description: A Helm chart for Voltha OpenONU Adapter
-icon: https://guide.opencord.org/logos/cord.svg
-
-version: 2.3.7
\ No newline at end of file
+# appVersion refers to multiple components with potentially different
+# container image versions.
+appVersion: 2.4
diff --git a/voltha-adapter-openonu/templates/adapters-openonu-go.yaml b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
similarity index 90%
rename from voltha-adapter-openonu/templates/adapters-openonu-go.yaml
rename to voltha-adapter-openonu/templates/openonu-go-deploy.yaml
index 1c3d5dd..35d1d29 100644
--- a/voltha-adapter-openonu/templates/adapters-openonu-go.yaml
+++ b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
@@ -1,4 +1,3 @@
-{{- if and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go }}
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,8 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+{{- if and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go }}
{{- $log_level := tpl .Values.adapter_open_onu.log_level . | upper }}
-
+---
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -37,10 +37,13 @@
selector:
matchLabels:
app: adapter-open-onu
+ release: {{ .Release.Name }}
template:
metadata:
+ namespace: {{ .Release.Namespace }}
labels:
app: adapter-open-onu
+ release: {{ .Release.Name }}
app.kubernetes.io/name: "adapter-open-onu"
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
@@ -57,9 +60,13 @@
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
- annotations:
- cni: "calico"
spec:
+ {{- if .Values.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.securityContext.runAsUser }}
+ runAsGroup: {{ .Values.securityContext.runAsGroup }}
+ fsGroup: {{ .Values.securityContext.fsGroup }}
+ {{- end }}
containers:
- name: adapter-open-onu
image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu_go.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu_go.tag . ) . }}'
diff --git a/voltha-adapter-openonu/templates/adapters-openonu.yaml b/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
similarity index 91%
rename from voltha-adapter-openonu/templates/adapters-openonu.yaml
rename to voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
index f7ffa94..bba823b 100644
--- a/voltha-adapter-openonu/templates/adapters-openonu.yaml
+++ b/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
{{- if not (and (hasKey .Values "use_openonu_adapter_go") .Values.use_openonu_adapter_go) }}
---
apiVersion: apps/v1
@@ -39,10 +38,13 @@
selector:
matchLabels:
app: adapter-open-onu
+ release: {{ .Release.Name }}
template:
metadata:
+ namespace: {{ .Release.Namespace }}
labels:
app: adapter-open-onu
+ release: {{ .Release.Name }}
app.kubernetes.io/name: "adapter-open-onu"
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
@@ -59,9 +61,13 @@
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
- annotations:
- cni: "calico"
spec:
+ {{- if .Values.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.securityContext.runAsUser }}
+ runAsGroup: {{ .Values.securityContext.runAsGroup }}
+ fsGroup: {{ .Values.securityContext.fsGroup }}
+ {{- end }}
containers:
- name: adapter-open-onu
image: '{{ tpl .Values.images.adapter_open_onu.registry . }}{{ tpl .Values.images.adapter_open_onu.repository . }}:{{ tpl ( tpl .Values.images.adapter_open_onu.tag . ) . }}'
diff --git a/voltha-adapter-openonu/values.yaml b/voltha-adapter-openonu/values.yaml
index 0097619..c803098 100644
--- a/voltha-adapter-openonu/values.yaml
+++ b/voltha-adapter-openonu/values.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
+---
use_openonu_adapter_go: false
# Default overrides
@@ -27,19 +26,26 @@
adapter_open_onu_topic: "brcm_openomci_onu"
adapter_open_olt_topic: "openolt"
+# Default security context under which the containers run
+securityContext:
+ enabled: true
+ fsGroup: 1001
+ runAsUser: 1001
+ runAsGroup: 1001
+
# Define connectivity to required services
services:
kafka:
adapter:
- service: voltha-kafka.voltha.svc.cluster.local
+ service: kafka
port: 9092
cluster:
- service: voltha-kafka.voltha.svc.cluster.local
+ service: kafka
port: 9092
# Define connectivity to etcd
etcd:
- service: voltha-etcd-cluster-client.voltha.svc.cluster.local
+ service: etcd
port: 2379
# Define the recplica count for everything
diff --git a/voltha-adapter-simulated/Chart.yaml b/voltha-adapter-simulated/Chart.yaml
index 74498fb..a47dd97 100644
--- a/voltha-adapter-simulated/Chart.yaml
+++ b/voltha-adapter-simulated/Chart.yaml
@@ -11,13 +11,28 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
---
-name: voltha-adapter-simulated
-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.2.4
+apiVersion: "v1"
+name: "voltha-adapter-simulated"
+version: 2.2.5
+description: "A Helm chart for Voltha Simulated Adapter"
+keywords:
+ - "onf"
+ - "voltha"
+ - "adapter"
+ - "sim"
+ - "simulated"
+ - "open"
+home: "https://www.opennetworking.org/voltha"
+icon: "https://guide.opencord.org/logos/voltha.svg"
+sources:
+ - "https://github.com/opencord/voltha-simonu-adapter"
+ - "https://github.com/opencord/voltha-simolt-adapter"
+maintainers:
+ - name: "Open Networking Foundation"
+ email: "info@opennetworking.org"
+ url: "https://www.opennetworking.org"
+depricated: true
# appVersion refers to multiple components with potentially different
# container image versions.
diff --git a/voltha-adapter-simulated/templates/adapters-simulated.yaml b/voltha-adapter-simulated/templates/adapters-simulated.yaml
deleted file mode 100644
index 830c2a5..0000000
--- a/voltha-adapter-simulated/templates/adapters-simulated.yaml
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 2019-present Open Networking Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
----
-apiVersion: apps/v1
-kind: Deployment
-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:
- matchLabels:
- app: adapter-simulated-olt
- template:
- metadata:
- labels:
- app: adapter-simulated-olt
- app.kubernetes.io/name: "adapter-simulated-olt"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "adapter"
- 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:
- containers:
- - name: adapter-simulated-olt
- image: '{{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ tpl .Values.images.adapter_simulated_olt.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.adapter_simulated_olt.pullPolicy . }}
- args:
- - "/app/simulated_olt"
- - "-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 }}"
- - "-kv_store_host={{ .Values.services.etcd.service }}"
- - "-kv_store_port={{ .Values.services.etcd.port }}"
- - "-core_topic=rwcore"
- - "-simulator_topic=simulated_olt"
- - "-onu_number={{ .Values.onus_per_pon_port }}"
- - "-probe_port=8080"
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
- readinessProbe:
- httpGet:
- path: /readz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
-
----
-apiVersion: apps/v1
-kind: Deployment
-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:
- matchLabels:
- app: adapter-simulated-onu
- template:
- metadata:
- labels:
- app: adapter-simulated-onu
- app.kubernetes.io/name: "adapter-simulated-onu"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "adapter"
- 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:
- containers:
- - name: adapter-simulated-onu
- image: '{{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }}
- args:
- - "/app/simulated_onu"
- - "-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 }}"
- - "-kv_store_host={{ .Values.services.etcd.service }}"
- - "-kv_store_port={{ .Values.services.etcd.port }}"
- - "-core_topic=rwcore"
- - "-simulator_topic=simulated_onu"
- - "-probe_port=8080"
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
- readinessProbe:
- httpGet:
- path: /readz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
diff --git a/voltha-adapter-simulated/templates/olt-adapter-deploy.yaml b/voltha-adapter-simulated/templates/olt-adapter-deploy.yaml
new file mode 100644
index 0000000..2129123
--- /dev/null
+++ b/voltha-adapter-simulated/templates/olt-adapter-deploy.yaml
@@ -0,0 +1,95 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+apiVersion: apps/v1
+kind: Deployment
+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:
+ matchLabels:
+ app: adapter-simulated-olt
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ namespace: {{ .Release.Namespace }}
+ labels:
+ app: adapter-simulated-olt
+ release: {{ .Release.Name }}
+ app.kubernetes.io/name: "adapter-simulated-olt"
+ app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
+ app.kubernetes.io/component: "adapter"
+ 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 }}
+ spec:
+ {{- if .Values.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.securityContext.runAsUser }}
+ runAsGroup: {{ .Values.securityContext.runAsGroup }}
+ fsGroup: {{ .Values.securityContext.fsGroup }}
+ {{- end }}
+ containers:
+ - name: adapter-simulated-olt
+ image: '{{ tpl .Values.images.adapter_simulated_olt.registry . }}{{ tpl .Values.images.adapter_simulated_olt.repository . }}:{{ tpl .Values.images.adapter_simulated_olt.tag . }}'
+ imagePullPolicy: {{ tpl .Values.images.adapter_simulated_olt.pullPolicy . }}
+ args:
+ - "/app/simulated_olt"
+ - "-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 }}"
+ - "-kv_store_host={{ .Values.services.etcd.service }}"
+ - "-kv_store_port={{ .Values.services.etcd.port }}"
+ - "-core_topic=rwcore"
+ - "-simulator_topic=simulated_olt"
+ - "-onu_number={{ .Values.onus_per_pon_port }}"
+ - "-probe_port=8080"
+ livenessProbe:
+ httpGet:
+ path: /healthz
+ port: 8080
+ initialDelaySeconds: 10
+ periodSeconds: 5
+ readinessProbe:
+ httpGet:
+ path: /readz
+ port: 8080
+ initialDelaySeconds: 10
+ periodSeconds: 5
diff --git a/voltha-adapter-simulated/templates/onu-adapter-deploy.yaml b/voltha-adapter-simulated/templates/onu-adapter-deploy.yaml
new file mode 100644
index 0000000..7a271c6
--- /dev/null
+++ b/voltha-adapter-simulated/templates/onu-adapter-deploy.yaml
@@ -0,0 +1,94 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+apiVersion: apps/v1
+kind: Deployment
+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:
+ matchLabels:
+ app: adapter-simulated-onu
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ namespace: {{ .Release.Namespace }}
+ labels:
+ app: adapter-simulated-onu
+ release: {{ .Release.Name }}
+ app.kubernetes.io/name: "adapter-simulated-onu"
+ app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
+ app.kubernetes.io/component: "adapter"
+ 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 }}
+ spec:
+ {{- if .Values.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.securityContext.runAsUser }}
+ runAsGroup: {{ .Values.securityContext.runAsGroup }}
+ fsGroup: {{ .Values.securityContext.fsGroup }}
+ {{- end }}
+ containers:
+ - name: adapter-simulated-onu
+ image: '{{ tpl .Values.images.adapter_simulated_onu.registry . }}{{ tpl .Values.images.adapter_simulated_onu.repository . }}:{{ tpl .Values.images.adapter_simulated_onu.tag . }}'
+ imagePullPolicy: {{ tpl .Values.images.adapter_simulated_onu.pullPolicy . }}
+ args:
+ - "/app/simulated_onu"
+ - "-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 }}"
+ - "-kv_store_host={{ .Values.services.etcd.service }}"
+ - "-kv_store_port={{ .Values.services.etcd.port }}"
+ - "-core_topic=rwcore"
+ - "-simulator_topic=simulated_onu"
+ - "-probe_port=8080"
+ livenessProbe:
+ httpGet:
+ path: /healthz
+ port: 8080
+ initialDelaySeconds: 10
+ periodSeconds: 5
+ readinessProbe:
+ httpGet:
+ path: /readz
+ port: 8080
+ initialDelaySeconds: 10
+ periodSeconds: 5
diff --git a/voltha-adapter-simulated/values.yaml b/voltha-adapter-simulated/values.yaml
index 19d6109..d5a913f 100644
--- a/voltha-adapter-simulated/values.yaml
+++ b/voltha-adapter-simulated/values.yaml
@@ -11,8 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
---
+
# Default overrides
defaults:
image_registry: ""
@@ -20,6 +20,13 @@
image_pullPolicy: "Always"
image_tag: ~
+# Default security context under which the containers run
+securityContext:
+ enabled: true
+ fsGroup: 1001
+ runAsUser: 1001
+ runAsGroup: 1001
+
# Define connectivity to required services
services:
kafka:
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index 8f0eeb8..a449d4d 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,15 +11,18 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+---
apiVersion: "v1"
name: "voltha"
-version: "2.4.10"
+version: "2.4.11"
description: "A Helm chart for Voltha based on K8S resources in Voltha project"
keywords:
- "onf"
- "voltha"
+ - "core"
+ - "ofagent"
home: "https://www.opennetworking.org/voltha"
-icon: "https://guide.opencord.org/logos/cord.svg"
+icon: "https://guide.opencord.org/logos/voltha.svg"
sources:
- "https://github.com/opencord/voltha-go"
- "https://github.com/opencord/ofagent-go"
diff --git a/voltha/templates/api-svc.yaml b/voltha/templates/api-svc.yaml
index 04f8dea..1804875 100644
--- a/voltha/templates/api-svc.yaml
+++ b/voltha/templates/api-svc.yaml
@@ -16,6 +16,7 @@
kind: Service
metadata:
name: voltha-api
+ namespace: "{{ .Release.Namespace }}"
spec:
ports:
- name: grpc
@@ -23,3 +24,4 @@
targetPort: 50057
selector:
app: rw-core
+ release: "{{ .Release.Name }}"
diff --git a/voltha/templates/core-deploy.yaml b/voltha/templates/core-deploy.yaml
index 3dfb922..699afce 100644
--- a/voltha/templates/core-deploy.yaml
+++ b/voltha/templates/core-deploy.yaml
@@ -17,6 +17,7 @@
kind: Deployment
metadata:
name: voltha-rw-core
+ namespace: {{ .Release.Namespace }}
{{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "rw_core_deployment_labels") }}
labels:
{{- if hasKey .Values "extra_deployment_labels" }}
@@ -32,10 +33,16 @@
{{- end }}
spec:
replicas: 1
+ selector:
+ matchLabels:
+ app: rw-core
+ release: {{ .Release.Name }}
template:
metadata:
+ namespace: {{ .Release.Namespace }}
labels:
app: rw-core
+ release: {{ .Release.Name }}
app.kubernetes.io/name: "read-write-core"
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "core"
diff --git a/voltha/templates/core-profile-svc.yaml b/voltha/templates/core-profile-svc.yaml
index 967d4ab..49f16da 100644
--- a/voltha/templates/core-profile-svc.yaml
+++ b/voltha/templates/core-profile-svc.yaml
@@ -17,6 +17,7 @@
kind: Service
metadata:
name: voltha-rw-core-profiler
+ namespace: {{ .Release.Namespace }}
spec:
clusterIP: None
ports:
@@ -25,4 +26,5 @@
targetPort: 6060
selector:
app: rw-core
+ release: {{ .Release.Name }}
{{- end }}
diff --git a/voltha/templates/ofagent-deploy.yaml b/voltha/templates/ofagent-deploy.yaml
index e45e957..2c38a5f 100644
--- a/voltha/templates/ofagent-deploy.yaml
+++ b/voltha/templates/ofagent-deploy.yaml
@@ -17,6 +17,7 @@
kind: Deployment
metadata:
name: voltha-ofagent
+ namespace: {{ .Release.Namespace }}
{{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "ofagent_deployment_labels") }}
labels:
{{- if hasKey .Values "extra_deployment_labels" }}
@@ -34,8 +35,10 @@
replicas: {{ .Values.replicas.ofagent }}
template:
metadata:
+ namespace: {{ .Release.Namespace }}
labels:
app: ofagent
+ release: {{ .Release.Name }}
app.kubernetes.io/name: "open-flow-agent"
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "integration"
@@ -74,8 +77,8 @@
{{- range .Values.services.controller }}
- "--controller={{ .service }}:{{ .port }}"
{{- end }}
- - "--voltha=voltha-api.{{ .Release.Namespace }}.svc.cluster.local:55555"
- - "--kv_store_host=voltha-etcd-cluster-client.{{ .Release.Namespace }}.svc.cluster.local"
+ - "--voltha=voltha-api.{{ .Release.Namespace }}.svc:55555"
+ - "--kv_store_host=etcd.{{ .Release.Namespace }}.svc"
- "--kv_store_port=2379"
- "--kv_store_type=etcd"
- "--kv_store_request_timeout=60s"
diff --git a/voltha/templates/ofagent-profile-svc.yaml b/voltha/templates/ofagent-profile-svc.yaml
index 6a18864..1e77a08 100644
--- a/voltha/templates/ofagent-profile-svc.yaml
+++ b/voltha/templates/ofagent-profile-svc.yaml
@@ -17,6 +17,7 @@
kind: Service
metadata:
name: voltha-of-agent-profiler
+ namespace: {{ .Release.Namespace }}
spec:
clusterIP: None
ports:
@@ -25,4 +26,5 @@
targetPort: 6060
selector:
app: ofagent
+ release: {{ .Release.Name }}
{{- end }}
diff --git a/voltha/values.yaml b/voltha/values.yaml
index cba138c..6964d80 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -1,4 +1,3 @@
----
# Copyright 2019-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -12,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+---
# Default Values
# The following are the default values used for every container in the
@@ -32,6 +32,7 @@
# should be unique across the stacks.
kv_store_data_prefix: "service/voltha"
+# Default security context under which the containers run
securityContext:
enabled: true
fsGroup: 1001