VOL-2371 Pre-release voltha 2.2.0;
Remove multi-core configurations
Change-Id: I8445190a5c9e156cf454fc33bd1d37507dc5e304
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index d5fca77..80a1cc7 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -17,8 +17,8 @@
description: A Helm chart for Voltha based on K8S resources in Voltha project
icon: https://guide.opencord.org/logos/cord.svg
-version: 2.1.17
+version: 2.2.0
# appVersion is 2 because this chart contains multiple 2.x images that may have
# different individual image versions.
-appVersion: 2
+appVersion: 2.2
diff --git a/voltha/requirements.yaml b/voltha/requirements.yaml
index 1062c2d..a6e50db 100644
--- a/voltha/requirements.yaml
+++ b/voltha/requirements.yaml
@@ -20,5 +20,5 @@
condition: private_kafka_cluster
- name: voltha-etcd-cluster
repository: file://../voltha-etcd-cluster
- version: 2.1.1
+ version: 2.2.0
condition: private_etcd_cluster
diff --git a/voltha/templates/afrouter-config.yaml b/voltha/templates/afrouter-config.yaml
deleted file mode 100644
index 6bbd501..0000000
--- a/voltha/templates/afrouter-config.yaml
+++ /dev/null
@@ -1,290 +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.
-
-{{- if not .Values.therecanbeonlyone }}
----
-{{- $root := . }}
-apiVersion: v1
-data:
- arouter.voltha.json: |
- {
- "servers": [
- {
- "name": "grpc_command",
- "port": 55555,
- "address": "",
- "type": "grpc",
- "routers": [
- {
- "_TODO": "Suport a router list, remove the package and service from the router",
- "package": "voltha",
- "service": "VolthaService",
- "router": "vcore"
- },
- {
- "package": "afrouter",
- "service": "Configuration",
- "router": "local"
- }
- ]
- }
- ],
- "routers": [
- {
- "name": "vcore",
- "package": "voltha",
- "service": "VolthaService",
- "proto_descriptor": "voltha.pb",
- "routes": [
- {
- "name": "dev_manager",
- "proto_descriptor": "voltha.pb",
- "type": "rpc_affinity_message",
- "association": "round_robin",
- "routing_field": "id",
- "backend_cluster": "vcore",
- "_COMMENT": "Methods here MUST be specified above, this overrides thier default beahvior",
- "methods": [
- "CreateDevice",
- "GetCoreInstance",
- "EnableLogicalDevicePort",
- "DisableLogicalDevicePort",
- "EnableDevice",
- "DisableDevice",
- "RebootDevice",
- "DeleteDevice",
- "DownloadImage",
- "CancelImageDownload",
- "ActivateImageUpdate",
- "RevertImageUpdate",
- "UpdateDevicePmConfigs",
- "CreateAlarmFilter",
- "UpdateAlarmFilter",
- "DeleteAlarmFilter",
- "SelfTest"
- ],
- "nb_binding_methods": [
- "CreateDevice"
- ],
- "_TODO": "Overrides not implemented yet, config ignored",
- "overrides": [ ]
- },
- {
- "name": "logger",
- "proto_descriptor": "voltha.pb",
- "type": "source",
- "routing_field": "component_name",
- "backend_cluster": "ro_vcore",
- "methods": [
- "UpdateLogLevel",
- "GetLogLevels"
- ]
- },
- {
- "name": "read_only",
- "type": "round_robin",
- "association": "round_robin",
- "backend_cluster": "ro_vcore",
- "methods": [
- "ListDevicePorts",
- "ListDevicePmConfigs",
- "GetImages",
- "GetImageDownloadStatus",
- "GetImageDownload",
- "ListImageDownloads",
- "ListDeviceFlows",
- "ListDeviceFlowGroups",
- "ListLogicalDeviceFlows",
- "ListLogicalDeviceFlowGroups",
- "ListDevices",
- "GetDevice",
- "ListLogicalDevices",
- "GetLogicalDevices",
- "GetDeviceType",
- "GetDeviceGroup",
- "GetLogicalDevice",
- "GetAlarmFilter",
- "ListLogicalDevicePorts",
- "GetLogicalDevicePort",
- "ListAdapters",
- "GetVoltha"
- ]
- },
- {
- "name": "dev_manager_ofagent",
- "type": "binding",
- "_association": "round_robin",
- "binding": {
- "type": "header",
- "field": "voltha_backend_name",
- "method": "Subscribe",
- "association": "round_robin"
- },
- "backend_cluster": "vcore",
- "methods": [
- "StreamPacketsOut",
- "ReceivePacketsIn",
- "ReceiveChangeEvents",
- "Subscribe",
- "UpdateLogicalDeviceFlowTable",
- "UpdateLogicalDeviceFlowGroupTable",
- "GetLogicalDevice",
- "GetLogicalDevicePort",
- "EnableLogicalDevicePort",
- "DisableLogicalDevicePort",
- "ListLogicalDevices",
- "ListLogicalDeviceFlows",
- "ListLogicalDeviceFlowGroups",
- "ListLogicalDevicePorts",
- "ListLogicalDeviceMeters",
- "UpdateLogicalDeviceMeterTable"
- ],
- "_TODO": "Overrides not implemented yet, config ignored",
- "overrides": [ ]
- }
- ]
- },
- {
- "name": "local",
- "package": "afrouter",
- "service": "Configuration",
- "proto_descriptor": "voltha.pb",
- "routes": [
- {
- "name": "logger-local",
- "proto_descriptor": "voltha.pb",
- "type": "source",
- "routing_field": "component_name",
- "backend_cluster": "api_server",
- "methods": [
- "UpdateLogLevel",
- "GetLogLevels"
- ]
- }
- ]
- }
- ],
- "backend_clusters": [
- {
- "name": "vcore",
- "backends": [
-{{- /*
- The conversion of the the recplicas.rw_core (number) to a string
- and then back to an int is a work-a-round required for helm
- v.2.15. It is currently considered a regression bug in helm
- (https://github.com/helm/helm/issues/6708). The need for this
- work-a-round should be re-checked against helm occationally and
- removed if no longer needed.
-*/ -}}
-{{- range $i, $e := until (int (toString .Values.replicas.rw_core)) }}
-{{- $cluster := add1 $i }}
- {
- "name": "vcore{{ $cluster }}",
- "type": "active_active",
- "association": {
- "strategy": "serial_number",
- "location": "header",
- "_TODO": "The key below needs to be implemented, currently hard coded",
- "key": "voltha_serial_number"
- },
- "connections": [
- {
- "name": "vcore{{ $cluster }}1",
- "addr": "voltha-rw-core-{{ $cluster }}1.{{ $root.Release.Namespace }}.svc.cluster.local",
- "port": "50057"
- },
- {
- "name": "vcore{{ $cluster }}2",
- "addr": "voltha-rw-core-{{ $cluster }}2.{{ $root.Release.Namespace }}.svc.cluster.local",
- "port": "50057"
- }
- ]
-{{- /*
- The conversion of the the recplicas.rw_core (number) to a string
- and then back to an int is a work-a-round required for helm
- v.2.15. It is currently considered a regression bug in helm
- (https://github.com/helm/helm/issues/6708). The need for this
- work-a-round should be re-checked against helm occationally and
- removed if no longer needed.
-*/ -}}
- }{{ if lt $cluster (int (toString $root.Values.replicas.rw_core)) }},{{ end }}
-{{- end}}
- ]
- },
- {
- "name": "ro_vcore",
- "backends": [
-{{- /*
- The conversion of the the recplicas.rw_core (number) to a string
- and then back to an int is a work-a-round required for helm
- v.2.15. It is currently considered a regression bug in helm
- (https://github.com/helm/helm/issues/6708). The need for this
- work-a-round should be re-checked against helm occationally and
- removed if no longer needed.
-*/ -}}
-{{- range $core_idx, $e := until (int (toString .Values.replicas.rw_core)) }}
- {
- "name": "ro_vcore{{ $core_idx }}",
- "type": "server",
- "connections": [
- {
- "name": "ro_vcore{{ $core_idx }}1",
- "addr": "voltha-ro-core-{{ $core_idx }}.voltha-ro-core.{{ $root.Release.Namespace }}.svc.cluster.local",
- "port": "50057"
- }
- ]
-{{- /*
- The conversion of the the recplicas.rw_core (number) to a string
- and then back to an int is a work-a-round required for helm
- v.2.15. It is currently considered a regression bug in helm
- (https://github.com/helm/helm/issues/6708). The need for this
- work-a-round should be re-checked against helm occationally and
- removed if no longer needed.
-*/ -}}
- }{{ if lt (add1 $core_idx) (int (toString $root.Values.replicas.rw_core)) }},{{ end }}
-{{- end}}
- ]
- },
- {
- "_COMMENT": "This allows api-server to route to its own configuration api endpoint",
- "name": "api_server",
- "backends": [
- {
- "name": "api_server0",
- "type": "server",
- "connections": [
- {
- "name": "api_server01",
- "addr": "localhost",
- "port": "55554"
- }
- ]
- }
- ]
- }
- ],
- "api": {
- "_comment": "If this isn't defined then no api is available for dynamic configuration and queries",
- "address": "",
- "port": 55554,
- "probeHost": "",
- "probePort": 8080
- }
- }
-
-kind: ConfigMap
-metadata:
- name: afrouter-config
- serviceAccountName: {{ .Values.serviceaccount }}
-{{- end}}
diff --git a/voltha/templates/api-server.yaml b/voltha/templates/api-server.yaml
deleted file mode 100644
index 11ccb31..0000000
--- a/voltha/templates/api-server.yaml
+++ /dev/null
@@ -1,131 +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.
-{{- if not .Values.therecanbeonlyone }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: voltha-api
- serviceAccountName: {{ .Values.serviceaccount }}
-spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- ports:
- - name: grpc
- port: 55555
- targetPort: 55555
- selector:
- app: voltha-api-server
-
----
-apiVersion: apps/v1beta1
-kind: Deployment
-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:
- metadata:
- labels:
- app: voltha-api-server
- app.kubernetes.io/name: "api-server"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "api"
- 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:
- serviceAccountName: {{ .Values.serviceaccount }}
- containers:
- - name: arouter
- image: '{{ tpl .Values.images.afrouter.registry . }}{{ tpl .Values.images.afrouter.repository . }}:{{ tpl .Values.images.afrouter.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.afrouter.pullPolicy . }}
- volumeMounts:
- - name: config-volume
- mountPath: /app/config
- ports:
- - containerPort: 55555
- env:
- - name: POD_NAMESPACE
- value: {{ .Release.Namespace }}
- command: ["/app/afrouter"]
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
- readinessProbe:
- httpGet:
- path: /readz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
- args: ["-config", "/app/config/arouter.voltha.json"]
- - name: arouterd
- env:
- - name: POD_NAMESPACE
- value: {{ .Release.Namespace }}
- - name: KAFKA_HOST
- value: {{ .Values.services.kafka.cluster.service }}
- - name: KAFKA_PORT
- value: {{ quote .Values.services.kafka.cluster.port }}
- - name: KAFKA_TOPIC
- value: {{ quote .Values.api_server.kafka_topic }}
- image: '{{ tpl .Values.images.afrouterd.registry . }}{{ tpl .Values.images.afrouterd.repository . }}:{{ tpl .Values.images.afrouterd.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.afrouterd.pullPolicy . }}
- command: ["/app/arouterd"]
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8081
- initialDelaySeconds: 10
- periodSeconds: 5
- readinessProbe:
- httpGet:
- path: /readz
- port: 8081
- initialDelaySeconds: 10
- periodSeconds: 5
- restartPolicy: Always
- volumes:
- - name: config-volume
- configMap:
- name: afrouter-config
-{{- end }}
diff --git a/voltha/templates/cli.yaml b/voltha/templates/cli.yaml
deleted file mode 100644
index c92c00c..0000000
--- a/voltha/templates/cli.yaml
+++ /dev/null
@@ -1,93 +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.
-
-{{- if .Values.replicas.cli }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: voltha-cli
- serviceAccountName: {{ .Values.serviceaccount }}
- labels:
- name: vcli
-spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- ports:
- - name: ssh
- port: 5022
- targetPort: 22
- selector:
- app: vcli
-
----
-apiVersion: apps/v1beta1
-kind: Deployment
-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:
- metadata:
- labels:
- app: vcli
- app.kubernetes.io/name: "cli-server"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "cli"
- 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:
- serviceAccountName: {{ .Values.serviceaccount }}
- containers:
- - name: vcli
- image: '{{ tpl .Values.images.cli.registry . }}{{ tpl .Values.images.cli.repository . }}:{{ tpl .Values.images.cli.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.cli.pullPolicy . }}
- env:
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- args:
- - "/voltha/python/cli/setup.sh"
- - "-g voltha-api.{{ .Release.Namespace }}.svc.cluster.local:55555"
- ports:
- - containerPort: 22
- name: ssh-port
-{{- end}}
diff --git a/voltha/templates/ro-core.yaml b/voltha/templates/ro-core.yaml
deleted file mode 100644
index e463cc1..0000000
--- a/voltha/templates/ro-core.yaml
+++ /dev/null
@@ -1,143 +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.
-{{- if not .Values.therecanbeonlyone }}
-{{- $set_log_level := tpl .Values.rw_core.log_level . | upper }}
-{{- $log_level := 3 }}
-{{- if eq $set_log_level "DEBUG" }}
-{{- $log_level = 0 }}
-{{- else if eq $set_log_level "INFO" }}
-{{- $log_level = 1 }}
-{{- else if eq $set_log_level "WARN" }}
-{{- $log_level = 2 }}
-{{- else if eq $set_log_level "ERROR" }}
-{{- $log_level = 3 }}
-{{- else if eq $set_log_level "PANIC" }}
-{{- $log_level = 4 }}
-{{- else if eq $set_log_level "FATAL" }}
-{{- $log_level = 5 }}
-{{- else }}
-{{- $log_level = 3 }}
-{{- end }}
-
----
-apiVersion: v1
-kind: Service
-metadata:
- name: voltha-ro-core
-spec:
- ports:
- - name: grpc
- port: 50057
- clusterIP: None
- selector:
- app: ro-core
-
----
-apiVersion: apps/v1
-kind: StatefulSet
-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:
- matchLabels:
- app: ro-core
- serviceName: voltha-ro-core
- podManagementPolicy: Parallel
- template:
- metadata:
- labels:
- app: ro-core
- app.kubernetes.io/name: "read-only-core"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "core"
- 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:
- affinity:
- podAntiAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- - topologyKey: "kubernetes.io/hostname"
- labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - ro-core
- serviceAccountName: {{ .Values.serviceaccount }}
- containers:
- - name: voltha
- image: '{{ tpl .Values.images.ro_core.registry . }}{{ tpl .Values.images.ro_core.repository . }}:{{ tpl .Values.images.ro_core.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.ro_core.pullPolicy . }}
- env:
- - name: NAMESPACE
- value: {{ quote .Release.Namespace }}
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- args:
- - "/app/ro_core"
- - "-kv_store_type=etcd"
- - "-kv_store_host={{ .Values.services.etcd.service }}"
- - "-kv_store_port={{ .Values.services.etcd.port }}"
- - "-grpc_host=$(POD_IP)"
- - "-grpc_port=50057"
- - "-banner=true"
- - "-ro_core_topic=rocore"
- - "-log_level={{ $log_level }}"
- - "-probe_port=8080"
- ports:
- - containerPort: 50057
- name: grpc-port
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
- readinessProbe:
- httpGet:
- path: /readz
- port: 8080
- initialDelaySeconds: 10
- periodSeconds: 5
-{{- end }}
diff --git a/voltha/templates/rw-core-only-one.yaml b/voltha/templates/rw-core-only-one.yaml
deleted file mode 100644
index 5c0949c..0000000
--- a/voltha/templates/rw-core-only-one.yaml
+++ /dev/null
@@ -1,153 +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.
-{{- if .Values.therecanbeonlyone }}
-{{- $set_log_level := tpl .Values.rw_core.log_level . | upper }}
-{{- $log_level := 3 }}
-{{- if eq $set_log_level "DEBUG" }}
-{{- $log_level = 0 }}
-{{- else if eq $set_log_level "INFO" }}
-{{- $log_level = 1 }}
-{{- else if eq $set_log_level "WARN" }}
-{{- $log_level = 2 }}
-{{- else if eq $set_log_level "ERROR" }}
-{{- $log_level = 3 }}
-{{- else if eq $set_log_level "PANIC" }}
-{{- $log_level = 4 }}
-{{- else if eq $set_log_level "FATAL" }}
-{{- $log_level = 5 }}
-{{- else }}
-{{- $log_level = 3 }}
-{{- end }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: voltha-api
- serviceAccountName: {{ .Values.serviceaccount }}
-spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- ports:
- - name: grpc
- port: 55555
- targetPort: 50057
- selector:
- app: rw-core
----
-apiVersion: v1
-kind: Service
-metadata:
- name: voltha-rw-core
- serviceAccountName: {{ .Values.serviceaccount }}
-spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- clusterIP: None
- ports:
- - name: grpc
- port: 50057
- targetPort: 50057
- selector:
- app: rw-core
----
-apiVersion: apps/v1beta1
-kind: Deployment
-metadata:
- name: voltha-rw-core
- serviceAccountName: {{ .Values.serviceaccount }}
- {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "rw_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 "rw_core_deployment_labels" }}
- {{- range $key, $val := .Values.rw_core_deployment_labels }}
- {{ $key }}: {{ $val | quote }}
- {{- end }}
- {{- end }}
- {{- end }}
-spec:
- replicas: 1
- template:
- metadata:
- labels:
- app: rw-core
- app.kubernetes.io/name: "read-write-core"
- app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
- app.kubernetes.io/component: "core"
- 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 "rw_core_pod_labels" }}
- {{- range $key, $val := .Values.rw_core_pod_labels }}
- {{ $key }}: {{ $val | quote }}
- {{- end }}
- {{- end }}
- annotations:
- cni: "calico"
- spec:
- serviceAccountName: {{ .Values.serviceaccount }}
- containers:
- - name: voltha
- image: '{{ tpl .Values.images.rw_core.registry . }}{{ tpl .Values.images.rw_core.repository . }}:{{ tpl .Values.images.rw_core.tag . }}'
- imagePullPolicy: {{ tpl .Values.images.rw_core.pullPolicy . }}
- env:
- - name: NAMESPACE
- value: voltha
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- args:
- - "/app/rw_core"
- - "-kv_store_type=etcd"
- - "-kv_store_host={{ .Values.services.etcd.service }}"
- - "-kv_store_port={{ .Values.services.etcd.port }}"
- - "-grpc_host=0.0.0.0"
- - "-grpc_port=50057"
- - "-banner=true"
- - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
- - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
- - "-kafka_cluster_host={{ .Values.services.kafka.cluster.port }}"
- - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
- - "-rw_core_topic=rwcore"
- - "-core_pair_topic=core-pair-1"
- - "-kv_store_data_prefix=service/voltha"
- - "-in_competing_mode=false"
- - "-core_timeout=9999"
- - "-timeout_long_request=9999"
- - "-timeout_request=9999"
- - "-log_level={{ $log_level }}"
- - "-probe_port=8080"
- ports:
- - containerPort: 50057
- name: grpc
- livenessProbe:
- httpGet:
- path: /healthz
- port: 8080
- initialDelaySeconds: 3
- periodSeconds: 3
- readinessProbe:
- httpGet:
- path: /readz
- port: 8080
- initialDelaySeconds: 3
- periodSeconds: 3
-{{- end }}
diff --git a/voltha/templates/rw-core.yaml b/voltha/templates/rw-core.yaml
index 01c7da2..72bdab3 100644
--- a/voltha/templates/rw-core.yaml
+++ b/voltha/templates/rw-core.yaml
@@ -11,15 +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 .Values.therecanbeonlyone }}
-{{- $root := . -}}
-{{- $tag := tpl .Values.images.rw_core.tag . }}
-{{- $repository := tpl .Values.images.rw_core.repository . }}
-{{- $registry := tpl .Values.images.rw_core.registry . }}
-{{- $pullpolicy := tpl .Values.images.rw_core.pullPolicy . }}
-{{- $core_timeout := tpl $root.Values.rw_core.core_timeout . }}
-{{- $long_request_timeout := tpl $root.Values.rw_core.timeout_long_request . }}
-{{- $request_timeout := tpl $root.Values.rw_core.timeout_request . }}
{{- $set_log_level := tpl .Values.rw_core.log_level . | upper }}
{{- $log_level := 3 }}
{{- if eq $set_log_level "DEBUG" }}
@@ -37,26 +28,28 @@
{{- else }}
{{- $log_level = 3 }}
{{- end }}
-{{- /*
- The conversion of the the recplicas.rw_core (number) to a string
- and then back to an int is a work-a-round required for helm
- v.2.15. It is currently considered a regression bug in helm
- (https://github.com/helm/helm/issues/6708). The need for this
- work-a-round should be re-checked against helm occationally and
- removed if no longer needed.
-*/ -}}
-{{- range $i, $e := until (int (toString .Values.replicas.rw_core)) }}
-{{- $cluster := add1 $i }}
-{{- range $i, $e := until 2 }}
-{{- $cluster_core_id := add1 $i }}
---
apiVersion: v1
kind: Service
metadata:
- name: voltha-rw-core-{{ $cluster }}{{ $cluster_core_id }}
- serviceAccountName: {{ $root.Values.serviceaccount }}
+ name: voltha-api
+ serviceAccountName: {{ .Values.serviceaccount }}
spec:
- serviceAccountName: {{ $root.Values.serviceaccount }}
+ serviceAccountName: {{ .Values.serviceaccount }}
+ ports:
+ - name: grpc
+ port: 55555
+ targetPort: 50057
+ selector:
+ app: rw-core
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: voltha-rw-core
+ serviceAccountName: {{ .Values.serviceaccount }}
+spec:
+ serviceAccountName: {{ .Values.serviceaccount }}
clusterIP: None
ports:
- name: grpc
@@ -64,82 +57,58 @@
targetPort: 50057
selector:
app: rw-core
- affinity-group: {{ quote $cluster }}
- affinity-group-core-id: {{ quote $cluster_core_id }}
-
---
-apiVersion: apps/v1
+apiVersion: apps/v1beta1
kind: Deployment
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") }}
+ name: voltha-rw-core
+ serviceAccountName: {{ .Values.serviceaccount }}
+ {{- if or (hasKey .Values "extra_deployment_labels") (hasKey .Values "rw_core_deployment_labels") }}
labels:
- {{- if hasKey $root.Values "extra_deployment_labels" }}
- {{- range $key, $val := $root.Values.extra_deployment_labels }}
+ {{- if hasKey .Values "extra_deployment_labels" }}
+ {{- range $key, $val := .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 }}
+ {{- if hasKey .Values "rw_core_deployment_labels" }}
+ {{- range $key, $val := .Values.rw_core_deployment_labels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
replicas: 1
- selector:
- matchLabels:
- app: rw-core
- affinity-group: {{ quote $cluster }}
- affinity-group-core-id: {{ quote $cluster_core_id }}
template:
metadata:
labels:
app: rw-core
- affinity-group: {{ quote $cluster }}
- affinity-group-core-id: {{ quote $cluster_core_id }}
app.kubernetes.io/name: "read-write-core"
- app.kubernetes.io/version: {{ quote $root.Chart.AppVersion }}
+ app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "core"
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 }}
+ 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 $root.Values "rw_core_pod_labels" }}
- {{- range $key, $val := $root.Values.rw_core_pod_labels }}
+ {{- if hasKey .Values "rw_core_pod_labels" }}
+ {{- range $key, $val := .Values.rw_core_pod_labels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
annotations:
cni: "calico"
spec:
- affinity:
- podAntiAffinity:
- requiredDuringSchedulingIgnoredDuringExecution:
- - topologyKey: "kubernetes.io/hostname"
- labelSelector:
- matchExpressions:
- - key: app
- operator: In
- values:
- - rw-core
- - key: affinity-group
- operator: In
- values:
- - {{ quote $cluster }}
- serviceAccountName: {{ $root.Values.serviceaccount }}
+ serviceAccountName: {{ .Values.serviceaccount }}
containers:
- name: voltha
- image: '{{ $registry }}{{ $repository }}:{{ $tag }}'
- imagePullPolicy: {{ $pullpolicy }}
+ image: '{{ tpl .Values.images.rw_core.registry . }}{{ tpl .Values.images.rw_core.repository . }}:{{ tpl .Values.images.rw_core.tag . }}'
+ imagePullPolicy: {{ tpl .Values.images.rw_core.pullPolicy . }}
env:
- name: NAMESPACE
- value: {{ quote $root.Release.Namespace }}
+ value: voltha
- name: POD_IP
valueFrom:
fieldRef:
@@ -147,27 +116,27 @@
args:
- "/app/rw_core"
- "-kv_store_type=etcd"
- - "-kv_store_host={{ $root.Values.services.etcd.service }}"
- - "-kv_store_port={{ $root.Values.services.etcd.port }}"
- - "-grpc_host=$(POD_IP)"
+ - "-kv_store_host={{ .Values.services.etcd.service }}"
+ - "-kv_store_port={{ .Values.services.etcd.port }}"
+ - "-grpc_host=0.0.0.0"
- "-grpc_port=50057"
- "-banner=true"
- - "-kafka_adapter_host={{ $root.Values.services.kafka.adapter.service }}"
- - "-kafka_adapter_port={{ $root.Values.services.kafka.adapter.port }}"
- - "-kafka_cluster_host={{ $root.Values.services.kafka.cluster.port }}"
- - "-kafka_cluster_port={{ $root.Values.services.kafka.cluster.port }}"
+ - "-kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
+ - "-kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
+ - "-kafka_cluster_host={{ .Values.services.kafka.cluster.port }}"
+ - "-kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
- "-rw_core_topic=rwcore"
- - "-core_pair_topic=core-pair-{{ $cluster }}"
+ - "-core_pair_topic=core-pair-1"
- "-kv_store_data_prefix=service/voltha"
- - "-in_competing_mode=true"
- - "-core_timeout={{ $core_timeout }}"
- - "-timeout_long_request={{ $long_request_timeout }}"
- - "-timeout_request={{ $request_timeout }}"
+ - "-in_competing_mode=false"
+ - "-core_timeout=9999"
+ - "-timeout_long_request=9999"
+ - "-timeout_request=9999"
- "-log_level={{ $log_level }}"
- "-probe_port=8080"
ports:
- containerPort: 50057
- name: grpc-port
+ name: grpc
livenessProbe:
httpGet:
path: /healthz
@@ -180,6 +149,4 @@
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
-{{- end }}
-{{- end }}
-{{- end }}
+
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 8d288a7..bea3bb3 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -16,7 +16,6 @@
serviceaccount: voltha-serviceaccount
private_etcd_cluster: true
private_kafka_cluster: true
-therecanbeonlyone: false
# Default Values
# The following are the default values used for every container in the
@@ -71,14 +70,8 @@
rw_core: 1
# For everything else replicas are replicas
- cli: 1
ofagent: 1
- ro_core: 1
- afrouter: 1
- afrouterd: 1
-ro_core:
- log_level: '{{ .Values.defaults.log_level }}'
rw_core:
log_level: '{{ .Values.defaults.log_level }}'
@@ -86,44 +79,18 @@
timeout_long_request: '{{ .Values.defaults.rw_core.timeout }}'
timeout_request: '{{ .Values.defaults.rw_core.timeout }}'
-api_server:
- kafka_topic: 'affinityRouter'
# Define Docker images to be used
images:
- cli:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-cli'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
-
ofagent:
registry: '{{ .Values.defaults.image_registry }}'
repository: '{{ .Values.defaults.image_org }}voltha-ofagent'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
-
- ro_core:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-ro-core'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
+ tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.3{{- end }}{{- else }}2.2.3{{- end }}'
pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
rw_core:
registry: '{{ .Values.defaults.image_registry }}'
repository: '{{ .Values.defaults.image_org }}voltha-rw-core'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
+ tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.3{{- end }}{{- else }}2.2.3{{- end }}'
pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
- afrouter:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-afrouter'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
-
- afrouterd:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-afrouterd'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.2.2{{- end }}{{- else }}2.2.2{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
- restartPolicy: 'Always'