Added voltha-infra chart
Added voltha-stack chart
Moved "defaults" values to "global" so that they can be managed by the
macro charts
Added examples for different workflows
Change-Id: I5fb2bfa54a1be725892445e93bd8a35d608e5d14
diff --git a/.gitignore b/.gitignore
index 2a444f2..05567ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,12 @@
# local chart repo dir used when building the http-accessible repo
chart_repo
+# helm-repo-tools repo (in case of local testing)
+helm-repo-tools/
+
# lockfiles for requirements.yaml for dependent charts
requirements.lock
+Chart.lock
# sub charts directories, created by helm dep ...
charts
diff --git a/README.md b/README.md
index 7d17795..a690e32 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
This repository defines [Kubernetes Helm](https://helm.sh/) charts that can be
used to deploy a [VOLTHA](https://www.opennetworking.org/voltha/) instance.
-More information and documentation can be found in the
+More information and documentation can be found in the
[voltha docs](https://docs.voltha.org/master/kind-voltha/README.html) which we recommend as the starting point.
## Installing charts
@@ -18,127 +18,198 @@
allocation (`DHCP`) as examplified by the [SEBA
Project](https://www.opennetworking.org/seba/).
-## Deploying using kind-voltha
+## Example deployment
-We suggest an automated deployment of VOLTHA by using
-[kind-volta](https://docs.voltha.org/master/kind-voltha/README.html?highlight=tracing) as described in the
-[voltha docs](https://docs.voltha.org/master/kind-voltha/README.html).
-Note that `kind-voltha` is a thin wrapper over `helm` chart commands, automating some commands and arguments.
+The following describes how to deploy VOLTHA.
-## Manual Example deployment
-
-The following describes how to deploy VOLTHA manually.
-
-### Prerequisite Helm Chart Repositories
-To use the charts for VOLTHA the following two Helm repositories should be
+### Prerequisites
+To use the charts for VOLTHA the following Helm repositories should be
added to your helm environment:
```shell
-helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
-helm repo add stable https://kubernetes-charts.storage.googleapis.com
-helm repo update
-```
-
-### ONOS Controller
-To use the charts for VOLTHA the following two Helm repositories should be
-added to your helm environment:
-```shell
-helm repo add onos https://charts.onosproject.org
-helm repo update
-```
-
-then to install ONOS:
-```shell script
-helm install --create-namespace --set image.pullPolicy=Always,image.repository=voltha/voltha-onos,image.tag=master,replicas=3,atomix.replicas=3 --set defaults.log_level=DEBUG --namespace default onos onos/onos-classic
-```
-
-### Deploy VOLTHA Manually
-
-Add the helm chart repository and build the chart dependencies as follows:
-```shell
helm repo add onf https://charts.opencord.org
helm repo update
```
-If you are developing and want to modify and use the charts from a local copy:
-```shell
-git clone https://github.com/opencord/voltha-helm-charts
-cd voltha-helm-charts
-helm dependency build ./voltha
+#### Temporary steps before the patch is merged
+
+These are a set of steps required to bring up the environment before this patch is merged and the charts are published
```
-#### Deploy ETCD Operator
-[ETCD](https://github.com/etcd-io/etcd) deployes an ETCD cluster using standard Kubernetes
-manifests. As the VOLTHA helm charts use ETCD, it must be installed before the VOLTHA helm chart.
-```shell
-helm install -f --create-namespace --set replicas=1 --namespace default etcd incubator/etcd
+helm repo add kokuwa https://kokuwaio.github.io/helm-charts
+helm repo add elastic https://helm.elastic.co
+helm dep update voltha-infra
+helm dep update voltha-stack
```
-#### Deploy VOLTHA Core Components
-At this point the VOLTHA Helm charts can be used to deploy the VOLTHA core
-components:
+#### Load the kubernetes config in the cluster
-```shell
-helm install -f values.yaml --create-namespace --set therecanbeonlyone=true --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --set 'services.controller[0].service=onos-onos-classic-0.onos-onos-classic-hs.default.svc' --set 'services.controller[0].port=6653' --set 'services.controller[0].address=onos-onos-classic-0.onos-onos-classic-hs.default.svc:6653' --namespace voltha voltha onf/voltha
+*This is only required if you will deploy `bbsim-sadis-server`*
+
```
-An example fo the [values.yaml](https://github.com/opencord/kind-voltha/blob/master/values.yaml)
-
-#### Adapters for OpenOLT and OpenONU
-The adapters for the OpenOLT and OpenONU are in separate helm charts.
-
-To install the OpenOLT adapter use:
-```shell
-helm install -f values.yaml --create-namespace --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --namespace voltha open-olt onf/voltha-adapter-openolt
-```
-To install the OpenONU adapter use:
-```shell
-helm install -f values.yaml --create-namespace --set services.etcd.service=etcd.default.svc --set services.etcd.port=2379 --set services.etcd.address=etcd.default.svc:2379 --set kafka_broker=kafka.default.svc:9092 --set services.kafka.adapter.service=kafka.default.svc --set services.kafka.adapter.port=9092 --set services.kafka.cluster.service=kafka.default.svc --set services.kafka.cluster.port=9092 --set services.kafka.adapter.address=kafka.default.svc:9092 --set services.kafka.cluster.address=kafka.default.svc:9092 --namespace voltha open-onu onf/voltha-adapter-openonu
-```
-An example fo the [values.yaml](https://github.com/opencord/kind-voltha/blob/master/values.yaml)
-
-### Deploying Tracing PoD
-Optionally, a Jaeger tracing stack based all-in-one PoD can be deployed in voltha
-setup to collect and analyze execution traces generated by various Voltha containers
-for execution time analysis and troubleshooting. Refer to below links for more details
-on Open Tracing approach:
-
-[Open Tracing](https://opentracing.io/)
-[Jaeger Distributed Tracing Stack](https://www.jaegertracing.io/)
-
-To install the Voltha Tracing PoD use:
-```shell
-helm install --namespace voltha --name voltha-tracing ./voltha-tracing
+kubectl create namespace infra
+kubectl create configmap -n infra kube-config "--from-file=kube_config=$KUBECONFIG"
```
-### Kafka and Etcd
+### Installing VOLTHA infrastructure
-VOLTHA relies on [Kafka](https://kafka.apache.org/) for inter-component
-communication and [Etcd](https://coreos.com/etcd/) for persistent storage.
-
-#### Using Kafka and Etcd instances
-
-Kafka or Etcd values **MUST** be overridden when
-deploying VOLTHA so that the VOLTHA components can locate the required
-services. These values **MUST** be overridden when installing both the `voltha`
-and the `voltha-adapter-simulated` chart. The relevant property keys are:
+VOLTHA relies to a set of infrastructure components (ONOS, Kafka, ETCD, ...) that
+can be installed via the `voltha-infra` helm chart:
```shell
-services:
- kafka:
- adapter:
- service: voltha-kafka.voltha.svc.cluster.local
- port: 9092
- cluster:
- service: voltha-kafka.voltha.svc.cluster.local
- port: 9092
-
- etcd:
- service: voltha-etcd-cluster-client.voltha.svc.cluster.local
- port: 2379
-
- controller:
- service: onos-openflow.default.svc.cluster.local
- port: 6653
+helm upgrade --install -n infra voltha-infra voltha-infra
```
-## Installing and Configuring `voltctl`
+
+By default the `voltha-infra` helm chart will install one instance of each component,
+but that can be customized via a custom value file or via flags, eg:
+
+```shell
+helm upgrade --install -n infra voltha-infra voltha-infra \
+ --set onos-classic.replicas=3,onos-classic.atomix.replicas=3 \
+ --set kafka.replicaCount=3,kafka.zookeeper.replicaCount=3 \
+ --set etcd.statefulset.replicaCount=3
+```
+
+#### Accessing the ONOS Cli and API
+
+In order to access the ONOS CLI you need to expose the ONOS SSH port:
+
+```shell
+kubectl -n infra port-forward --address 0.0.0.0 svc/voltha-infra-onos-classic-hs 8101:8101
+```
+
+Once that is done you can `ssh` into ONOS by:
+
+```shell
+ssh karaf@127.0.0.1 -p 8101
+```
+
+To access the ONOS Rest API and GUI you need to expose:
+
+```shell
+kubectl -n infra port-forward --address 0.0.0.0 svc/voltha-infra-onos-classic-hs 8181:8181
+```
+
+#### Customizing the ONOS configuration
+
+The ONOS configuration is defined in two separate variables in the value file:
+
+- `onos.netcfg`: multiline text (json)
+- `onos.componentConfig`: yaml list of component name and multiline text
+
+Being the content of the configuration multiline text is not possible to override the configuration via `--set` it's
+necessary to create a custom value file with your content and install the chart with:
+
+```shell
+helm upgrade --install -n infra voltha-infra voltha-infra -f myfile.yaml
+```
+
+#### Support for logging and tracing (optional)
+
+VOLTHA comes with support for Jaeger and EFK (Elastic, Fluentd, Kibana) integration.
+In order to deploy those components together with the infrastructure add these flags to the command to install
+the VOLTHA infrastructure:
+
+```shell
+helm upgrade --install -n infra voltha-infra voltha-infra \
+ --set voltha-tracing.enabled=true \
+ --set efk.enabled=true
+```
+
+Once `kibana` is running execute this command to properly configure it:
+
+```
+ curl -v -X POST -H Content-type:application/json -H kbn-xsrf:true http://localhost:5601/api/saved_objects/index-pattern/logst* -d '{"attributes":{"title":"logst*","timeFieldName":"@timestamp"}}'
+```
+
+> _NOTE In order to send a request to `kibana` you need to expose the port with
+ `kubectl port-forward -n infra --address 0.0.0.0 svc/voltha-infra-kibana 5601`_
+
+### Deploy VOLTHA
+
+VOLTHA encompass multiple components that work together to manage OLT devices.
+Such group of component is known as a `stack` and is composed by:
+
+- VOLTHA core
+- OfAgent (OpenFlow Agent)
+- OLT Adapter
+- ONU Adapter
+
+To deploy a VOLTHA stack with the opensource adapters (OpenOLT and OpenONU) you can use the `voltha-stack` chart:
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra
+```
+
+> _We suggest to keep VOLTHA separated by deploying them in different namespaces._
+> _For example to install a second VOLTHA stack do:_
+>
+> ```
+> helm upgrade --install --create-namespace \
+> -n voltha2 voltha2 voltha-stack \
+> --set global.stack_name=voltha2 \
+> --set voltha_infra_name=voltha-infra \
+> --set voltha_infra_namespace=infra
+> ```
+
+#### Enable tracing in VOLTHA (optional)
+
+To enable tracing across the VOLTHA components add `--set global.tracing.enabled=true` to the install command, for example:
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra \
+ --set global.tracing.enabled=true
+```
+
+> NOTE that the `Jaeger` pod must be up and running before the VOLTHA stack starts in order for the components to register.
+
+#### Enable log correlation in VOLTHA (optional)
+
+To enable log correlation across the VOLTHA components add `--set global.log_correlation.enabled=true` to the install command, for example:
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra \
+ --set global.log_correlation.enabled=true
+```
+
+## Use the OpenONU python adapter
+
+> NOTE that this adapter is now unsupported, so you're in uncharted territory from now on.
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra \
+ --set voltha-adapter-openonu.use_openonu_adapter_go=false
+```
+
+### Deploy BBSim
+
+BBSim is a broadband simulator tool that is used as an OpenOLT compatible device
+in emulated environments.
+
+In order to install a single BBSim instance to test VOLTHA,
+you can use the BBSim helm chart:
+
+```shell
+helm upgrade --install -n voltha1 bbsim0 onf/bbsim --set olt_id=10
+```
+
+> _While it's not mandatory to install BBSim in the same namespace as the VOLTHA stack it's advised to do so to make explicit which stack is controlling it._
+
+### Installing and Configuring `voltctl`
[`voltctl`](https://github.com/opencord/voltctl) is a replacement for the
`voltha-cli` container in VOLTHA that provides access to the VOLTHA CLI when a
@@ -149,23 +220,203 @@
installed separately onto the machine(s) on which it is to be run. The [Release
Page](https://github.com/opencord/voltctl/releases) for `voltctl` maintains of
pre-built binaries that can be installed. The following is an example of how,
-in the example environment, `voltctl` can be installed with bash completion and
-configured:
+in the example environment, `voltctl` can be installed with bash completion:
```shell
-sudo wget https://github.com/opencord/voltctl/releases/download/v1.3.0/voltctl-1.3.0-linux-amd64 -O /usr/bin/voltctl
-source <(voltctl completion bash | sudo tee /etc/bash_completion.d/voltctl)
-mkdir $HOME/.volt
-voltctl -a v2 -s voltha-api.voltha.svc.cluster.local:55555 config > $HOME/.volt/config
+HOSTOS="$(uname -s | tr "[:upper:]" "[:lower:"])"
+HOSTARCH="$(uname -m | tr "[:upper:]" "[:lower:"])"
+if [ "$HOSTARCH" == "x86_64" ]; then
+ HOSTARCH="amd64"
+fi
+sudo wget https://github.com/opencord/voltctl/releases/download/v1.3.1/voltctl-1.3.1-$HOSTOS-$HOSTARCH -O /usr/local/bin/voltctl
+source <(voltctl completion bash)
```
-## Delete VOLTHA charts
-
-To remove the VOLTHA and Simulated Adapter deployments standard Helm commands
-can be utilized:
+If you are exposing the `voltha-api` service on `127.0.0.1:55555` as per the examples in this guide there is no need to configure
+`voltctl`, if you are exposing the service on a different port/IP you configure `voltctl` with:
```shell
-helm delete --purge voltha voltha-adapter-simulated voltha-adapter-openolt voltha-adapter-openonu voltha-etcd-operator
+voltctl -s <voltha-api-ip>:<voltha-api-port> config > $HOME/.volt/config
+```
+
+### Deploying a different workflow
+
+If you want to deploy VOLTHA with the appropriate configuration for the `dt` or `tt` worflow two example files are provided in the `./examples` folder.
+
+For you convenience here are the commands to deploy those workflows:
+
+**DT**
+
+```shell
+helm upgrade --install -n infra voltha-infra voltha-infra -f examples/dt-values.yaml
+helm upgrade --install -n voltha1 bbsim0 onf/bbsim --set olt_id=10 -f examples/dt-values.yaml
+helm upgrade --install --create-namespace -n voltha1 voltha1 voltha-stack --set global.stack_name=voltha1 --set voltha_infra_name=voltha-infra --set voltha_infra_namespace=infra
+```
+
+**TT**
+
+```shell
+helm upgrade --install -n infra voltha-infra voltha-infra -f examples/tt-values.yaml
+helm upgrade --install -n voltha1 bbsim0 onf/bbsim --set olt_id=10 -f examples/tt-values.yaml
+helm upgrade --install --create-namespace -n voltha1 voltha1 voltha-stack --set global.stack_name=voltha1 --set voltha_infra_name=voltha-infra --set voltha_infra_namespace=infra
+```
+
+## Post installation
+
+Ok, now I have VOLTHA installed and everything is running.
+What can I do with it?
+
+### Sanity Checks
+
+As first make sure that all components are running correctly:
+
+```shell
+$ kubectl get pods --all-namespaces
+NAMESPACE NAME READY STATUS RESTARTS AGE
+infra bbsim-sadis-server-6fcbdf9bd8-s7srz 1/1 Running 0 14m
+infra elasticsearch-master-0 1/1 Running 0 14m
+infra voltha-infra-etcd-0 1/1 Running 0 14m
+infra voltha-infra-fluentd-elasticsearch-9df8b 1/1 Running 0 14m
+infra voltha-infra-fluentd-elasticsearch-rgbvb 1/1 Running 0 14m
+infra voltha-infra-fluentd-elasticsearch-vfrcg 1/1 Running 0 14m
+infra voltha-infra-freeradius-7cbcdc66f-fhlt6 1/1 Running 0 14m
+infra voltha-infra-kafka-0 1/1 Running 0 14m
+infra voltha-infra-kibana-6cc8b8f779-7tlvp 1/1 Running 0 14m
+infra voltha-infra-onos-classic-0 1/1 Running 0 14m
+infra voltha-infra-voltha-infra-onos-config-loader-whdtz 0/1 Completed 3 14m
+infra voltha-infra-voltha-tracing-jaeger-7fffb6cdf6-l5r8s 1/1 Running 0 14m
+infra voltha-infra-zookeeper-0 1/1 Running 0 14m
+voltha1 bbsim0-6f9584b4dd-txtj4 1/1 Running 0 66s
+voltha1 voltha1-voltha-adapter-openolt-5b5844b5b6-htlvp 1/1 Running 0 91s
+voltha1 voltha1-voltha-adapter-openonu-85749df5fc-n5kdd 1/1 Running 0 91s
+voltha1 voltha1-voltha-ofagent-5b5dc9b7b5-htxt6 1/1 Running 0 91s
+voltha1 voltha1-voltha-rw-core-7d69cb4567-9cn2n 1/1 Running 0 91s
+```
+> _Note that is completely fine if the `onos-config-loader` pod restarts a few times, it is a job that loads
+configuration into ONOS and will fail until ONOS is ready to accept the configuration._
+
+Once all the kubernetes pods are in `Ready` and `Running` state make sure the adapter registered with the core.
+
+In order to use `voltctl` you need to expose the `voltha-api` service:
+```shell
+kubectl -n voltha1 port-forward --address 0.0.0.0 svc/voltha1-voltha-api 55555
+```
+
+> _If you have deployed multiple stacks you need to change the `port-forward` command to connect to the stack you want to operate, eg:_
+>
+> ```
+> kubectl -n voltha2 port-forward --address 0.0.0.0 svc/voltha2-voltha-api 55555
+> ```
+
+Once that is done you can query `rw-core` for a list of adapters:
+
+```shell
+$ voltctl adapter list
+ID VENDOR TYPE ENDPOINT VERSION CURRENTREPLICA TOTALREPLICAS LASTCOMMUNICATION
+brcm_openomci_onu_1 VOLTHA OpenONUGo brcm_openomci_onu voltha1_brcm_openomci_onu unknown-version 1 1
+openolt_1 VOLTHA OpenOLT openolt voltha1_openolt 3.0.2 1 1
+```
+
+### Provisioning an OLT
+
+Once you completed the `Sanity Checks` you can provision an OLT.
+We suggest to start with `BBSim` (see above for installation instructions).
+
+To create and enable the OLT device in VOLTHA you can use these `voltctl` commands:
+
+```shell
+voltctl device create -t openolt -H bbsim0.voltha1.svc:50060
+voltctl device list --filter Type~openolt -q | xargs voltctl device enable
+```
+
+Once the OLT device is enabled you will see that an emulated ONU is reported to VOLTHA:
+
+```shell
+$ voltctl device list
+ID TYPE ROOT PARENTID SERIALNUMBER ADMINSTATE OPERSTATUS CONNECTSTATUS REASON
+42b04dfc-a253-46a0-8b96-da0551648fd5 brcm_openomci_onu false 92a67593-06fa-4fad-87cb-b8befab90a56 BBSM00000001 ENABLED ACTIVE REACHABLE initial-mib-downloaded
+92a67593-06fa-4fad-87cb-b8befab90a56 openolt true b367cec6-a771-417a-94a7-8b8922fac587 BBSIM_OLT_0 ENABLED ACTIVE REACHABLE
+```
+
+### Running the sanity test (optional)
+
+If you want to run the `sanity-test` you can:
+
+```shell
+git clone https://github.com/opencord/voltha-system-tests.git && cd voltha-system-tests
+
+export KUBECONFIG="$(k3d kubeconfig write voltha-dev)" # or you KUBECONFIG file
+mkdir -p ~/.volt
+voltctl config > ~/.volt/config
+export VOLTCONFIG="~/.volt/config"
+make sanity-kind
+```
+> This assumes that both the `onos-ssh`, `onos-rest` and `voltha-api` ports are forwarded on the host and bbsim was installed with ` helm install -n voltha1 bbsim0 onf/bbsim --set olt_id=10`.
+
+### Remove VOLTHA from your cluster
+
+> NOTE that this is not required as part of your development loop. In that case you should be able to simply upgrade the component you are working on (see next section).
+
+If you need to completely uninstall everything that you installed following this guide, you can simply remove the installed `helm` charts:
+```shell
+helm del -n voltha1 voltha1 bbsim0
+helm del -n infra voltha-infra
+```
+
+If you are using the `bbsim-sadis-server` component as well then remember to remove the `kube-config` configmap as well:
+
+```shell
+kubectl delete cm -n infra kube-config
+```
+
+### Upgrade a component
+
+> NOTE that this section is intended for development purposes, it's not a guide for in service software upgrade.
+
+If you want to upgrade a component within a VOLTHA stack you can use the same `helm upgrade` command as per the
+installation guide while providing a new image for one of the component, eg:
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra \
+ --set voltha-adapter-openonu.images.adapter_open_onu_go.repository=voltha/voltha-openonu-adapter-go \
+ --set voltha-adapter-openonu.images.adapter_open_onu_go.tag=test
+```
+
+If as part of your development process you have published a new image with the same tag you can force it's download simply
+by restarting the pod, for example:
+
+```shell
+kubectl delete pod -n voltha1 $(kubectl get pods -n voltha1 | grep openonu | awk '{print $1}')
+```
+
+> In order for this to work the `imagePullPolicy` has to be set to `Always`.
+
+### Test changes to a chart
+
+If you are working on an helm chart you can install a stack omitting that component,
+and then use the local copy of your chart to install it, eg:
+
+```shell
+helm upgrade --install --create-namespace \
+ -n voltha1 voltha1 voltha-stack \
+ --set global.stack_name=voltha1 \
+ --set voltha_infra_name=voltha-infra \
+ --set voltha_infra_namespace=infra \
+ --set voltha-adapter-openonu.enabled=false
+
+helm upgrade --install --create-namespace \
+ -n voltha1 opeonu-adapter voltha-adapter-openonu \
+ --set global.stack_name=voltha1 \
+ --set adapter_open_onu.kv_store_data_prefix=service/voltha/voltha1_voltha1 \
+ --set adapter_open_onu.topics.core_topic=voltha1_voltha1_rwcore \
+ --set adapter_open_onu.topics.adapter_open_onu_topic=voltha1_voltha1_brcm_openomci_onu \
+ --set services.kafka.adapter.service=voltha-infra-kafka.infra.svc \
+ --set services.kafka.cluster.service=voltha-infra-kafka.infra.svc \
+ --set services.etcd.service=voltha-infra-etcd.infra.svc
```
## Known issues
diff --git a/bbsim-sadis-server/Chart.yaml b/bbsim-sadis-server/Chart.yaml
index 7eebb7c..0fc8b9f 100644
--- a/bbsim-sadis-server/Chart.yaml
+++ b/bbsim-sadis-server/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "bbsim-sadis-server"
-version: "0.1.0-dev"
+version: "0.1.1"
description: "A Helm chart for Voltha BBSIM sadis server"
keywords:
- "onf"
diff --git a/bbsim-sadis-server/templates/deployment.yaml b/bbsim-sadis-server/templates/deployment.yaml
index b879c9c..69ef00b 100644
--- a/bbsim-sadis-server/templates/deployment.yaml
+++ b/bbsim-sadis-server/templates/deployment.yaml
@@ -43,8 +43,8 @@
imagePullPolicy: {{ tpl .Values.images.bbsim_sadis_server.pullPolicy . | quote }}
command: [ "/app/bbsim-sadis-server" ]
args:
- - "-log_level={{.Values.defaults.log_level}}"
- - "-log_format={{.Values.defaults.log_format}}"
+ - "-log_level={{.Values.global.log_level}}"
+ - "-log_format={{.Values.global.log_format}}"
- "-bbsim_sadis_port={{.Values.bbsim_sadis_port}}"
volumeMounts:
- name: kube-config-volume
diff --git a/bbsim-sadis-server/values.yaml b/bbsim-sadis-server/values.yaml
index bc2d5ef..a538604 100644
--- a/bbsim-sadis-server/values.yaml
+++ b/bbsim-sadis-server/values.yaml
@@ -13,7 +13,7 @@
# limitations under the License.
---
# Default overrides
-defaults:
+global:
log_level: "WARN"
log_format: "json"
image_registry: ""
@@ -29,7 +29,7 @@
images:
bbsim_sadis_server:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}bbsim-sadis-server'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}{{ .Chart.AppVersion }}{{- end }}{{- else }}{{ .Chart.AppVersion }}{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy | default "Always" }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}bbsim-sadis-server'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}{{ .Chart.AppVersion }}{{- end }}{{- else }}{{ .Chart.AppVersion }}{{- end }}'
+ pullPolicy: '{{ .Values.global.image_pullPolicy | default "Always" }}'
diff --git a/examples/dt-values.yaml b/examples/dt-values.yaml
new file mode 100644
index 0000000..d0f1243
--- /dev/null
+++ b/examples/dt-values.yaml
@@ -0,0 +1,40 @@
+---
+
+# Copyright 2020-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.
+
+# override ONOS config
+onos:
+ componentConfig:
+ "org.opencord.olt.impl.OltFlowService": >
+ {
+ "enableDhcpOnNni": "false",
+ "defaultTechProfileId": "64",
+ "enableIgmpOnNni": "false",
+ "enableEapol": "false",
+ "enableDhcpV6": "false",
+ "enableDhcpV4": "false"
+ }
+
+# override BBSim config
+servicesConfig:
+ workflow: dt
+ services:
+ - name: hsia
+ uni_tag_match: 4096
+ c_tag: 4096
+ c_tag_allocation: shared
+ s_tag: 900
+ s_tag_allocation: unique
+ tp_id: 64
diff --git a/examples/tt-values.yaml b/examples/tt-values.yaml
new file mode 100644
index 0000000..027ae14
--- /dev/null
+++ b/examples/tt-values.yaml
@@ -0,0 +1,77 @@
+---
+
+# Copyright 2020-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.
+
+# override ONOS config
+onos:
+ componentConfig:
+ "org.opencord.olt.impl.OltFlowService": >
+ {
+ "enableDhcpOnNni": "true",
+ "defaultTechProfileId": "64",
+ "enableIgmpOnNni": "true",
+ "enableEapol": "false",
+ "enableDhcpV6": "false",
+ "enableDhcpV4": "true"
+ }
+
+# override BBSim config
+servicesConfig:
+ workflow: tt
+ services:
+ - name: hsia
+ uni_tag_match: 35
+ c_tag: 900
+ c_tag_allocation: unique
+ s_tag: 900
+ s_tag_allocation: shared
+ tp_id: 64
+ - name: voip
+ uni_tag_match: 65
+ c_tag: 444
+ c_tag_allocation: shared
+ s_tag: 333
+ s_tag_allocation: shared
+ needs_dhcp: true
+ tp_id: 65
+ configure_mac_address: true
+ us_pon_c_tag_priority: 7
+ us_pon_s_tag_priority: 7
+ ds_pon_c_tag_priority: 7
+ ds_pon_s_tag_priority: 7
+ - name: vod
+ uni_tag_match: 55
+ c_tag: 55
+ c_tag_allocation: shared
+ s_tag: 555
+ s_tag_allocation: shared
+ needs_dhcp: true
+ needs_igmp: true
+ tp_id: 66
+ configure_mac_address: true
+ us_pon_c_tag_priority: 5
+ us_pon_s_tag_priority: 5
+ ds_pon_c_tag_priority: 5
+ ds_pon_s_tag_priority: 5
+ # NOTE: the multicast service must be called MC unless you set
+ # multicastServiceName to something else in org.opencord.olt.impl.Olt
+ - name: MC
+ c_tag: 55
+ c_tag_allocation: shared
+ s_tag: 550
+ s_tag_allocation: shared
+ tp_id: 66
+ ds_pon_c_tag_priority: 5
+ ds_pon_s_tag_priority: 5
diff --git a/voltha-adapter-openolt/Chart.yaml b/voltha-adapter-openolt/Chart.yaml
index a3d8ec5..d577730 100644
--- a/voltha-adapter-openolt/Chart.yaml
+++ b/voltha-adapter-openolt/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "voltha-adapter-openolt"
-version: "2.8.0"
+version: "2.8.1"
description: "A Helm chart for Voltha OpenOLT Adapter"
keywords:
- "onf"
diff --git a/voltha-adapter-openolt/templates/openolt-deploy.yaml b/voltha-adapter-openolt/templates/openolt-deploy.yaml
index 83da3e8..5533a6c 100644
--- a/voltha-adapter-openolt/templates/openolt-deploy.yaml
+++ b/voltha-adapter-openolt/templates/openolt-deploy.yaml
@@ -46,6 +46,7 @@
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
app.kubernetes.io/part-of: "voltha"
+ app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if hasKey .Values "extra_pod_labels" }}
@@ -86,23 +87,23 @@
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/name']
- name: KV_STORE_DATAPATH_PREFIX
- value: {{ .Values.defaults.kv_store_data_prefix }}
+ value: {{ tpl .Values.adapter_open_olt.kv_store_data_prefix . }}
args:
- "/app/openolt"
- - "--kafka_adapter_address={{ .Values.services.kafka.adapter.address }}"
- - "--kafka_cluster_address={{ .Values.services.kafka.cluster.address }}"
- - "--core_topic={{ .Values.defaults.topics.core_topic }}"
- - "--adapter_topic={{ .Values.defaults.topics.adapter_open_olt_topic }}"
- - "--kv_store_address={{ .Values.services.etcd.address }}"
+ - "--kafka_adapter_address={{ tpl .Values.services.kafka.adapter.address . }}"
+ - "--kafka_cluster_address={{ tpl .Values.services.kafka.cluster.address . }}"
+ - "--core_topic={{ tpl .Values.adapter_open_olt.topics.core_topic . }}"
+ - "--adapter_topic={{ tpl .Values.adapter_open_olt.topics.adapter_open_olt_topic . }}"
+ - "--kv_store_address={{ tpl .Values.services.etcd.address . }}"
- "--kv_store_request_timeout={{ tpl .Values.adapter_open_olt.kv_store_timeout . }}"
- "--log_level={{ $log_level }}"
- "--current_replica={{ .Values.replicas.current_replica }}"
- "--total_replica={{ .Values.replicas.total_replica }}"
- "--probe_address=:8080"
- - "--trace_enabled={{ .Values.tracing.enabled }}"
- - "--trace_agent_address={{ .Values.services.tracing_agent.address }}"
- - "--log_correlation_enabled={{ .Values.log_correlation.enabled }}"
- - "--omcc_encryption={{ .Values.defaults.omcc_encryption }}"
+ - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+ - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+ - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
+ - "--omcc_encryption={{ .Values.global.omcc_encryption }}"
{{- if .Values.securityContext.enabled }}
securityContext:
allowPrivilegeEscalation: false
diff --git a/voltha-adapter-openolt/values.yaml b/voltha-adapter-openolt/values.yaml
index d72e734..3eb051d 100644
--- a/voltha-adapter-openolt/values.yaml
+++ b/voltha-adapter-openolt/values.yaml
@@ -16,7 +16,8 @@
fullNameOverride: ~
# Default overrides
-defaults:
+global:
+ stack_name: voltha
log_level: "WARN"
image_registry: ""
image_tag: ~
@@ -24,17 +25,18 @@
image_pullPolicy: "Always"
adapter_open_olt:
timeout: "5s"
- topics:
- core_topic: "rwcore"
- adapter_open_olt_topic: "openolt"
- # Define prefix path for etcd
- # If you're running multiple voltha stacks the this value
- # should be unique across the stacks.
- kv_store_data_prefix: "service/voltha"
#enable OMCC encryption
omcc_encryption: false
+ # Configure Log Correlation
+ log_correlation:
+ enabled: true
+
+ # Configure Tracing
+ tracing:
+ enabled: true
+
# Default security context under which the containers run
securityContext:
enabled: true
@@ -68,26 +70,22 @@
profiler:
enabled: false
-# Configure Log Correlation
-log_correlation:
- enabled: true
-
-# Configure Tracing
-tracing:
- enabled: true
-
# Define the recplica count for everything
replicas:
current_replica: 1
total_replica: 1
adapter_open_olt:
- log_level: '{{ .Values.defaults.log_level }}'
- kv_store_timeout: '{{ .Values.defaults.adapter_open_olt.timeout }}'
+ log_level: '{{ .Values.global.log_level }}'
+ kv_store_timeout: '{{ .Values.global.adapter_open_olt.timeout }}'
+ kv_store_data_prefix: 'service/{{ .Values.global.stack_name }}_voltha'
+ topics:
+ core_topic: "{{ .Values.global.stack_name }}_rwcore"
+ adapter_open_olt_topic: "{{ .Values.global.stack_name }}_openolt"
images:
adapter_open_olt:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-openolt-adapter'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}{{ .Chart.AppVersion }}{{- end }}{{- else }}{{ .Chart.AppVersion }}{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy | default "Always" }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}voltha-openolt-adapter'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}{{ .Chart.AppVersion }}{{- end }}{{- else }}{{ .Chart.AppVersion }}{{- end }}'
+ pullPolicy: '{{ .Values.global.image_pullPolicy | default "Always" }}'
diff --git a/voltha-adapter-openonu/Chart.yaml b/voltha-adapter-openonu/Chart.yaml
index 3bddb1e..2b88f3f 100644
--- a/voltha-adapter-openonu/Chart.yaml
+++ b/voltha-adapter-openonu/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "voltha-adapter-openonu"
-version: "2.7.1"
+version: "2.7.2"
description: "A Helm chart for Voltha OpenONU Adapter"
keywords:
- "onf"
diff --git a/voltha-adapter-openonu/templates/openonu-go-deploy.yaml b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
index c04c5f6..84bb42b 100644
--- a/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
+++ b/voltha-adapter-openonu/templates/openonu-go-deploy.yaml
@@ -48,6 +48,7 @@
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
app.kubernetes.io/part-of: "voltha"
+ app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if hasKey .Values "extra_pod_labels" }}
@@ -77,24 +78,26 @@
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/name']
- name: KV_STORE_DATAPATH_PREFIX
- value: {{ .Values.defaults.kv_store_data_prefix }}
+ value: {{ tpl .Values.adapter_open_onu.kv_store_data_prefix . }}
args:
- "/app/openonu"
- "--banner=true"
- "--kafka_reconnect_retries=-1"
- - "--kafka_adapter_host={{ .Values.services.kafka.adapter.service }}"
+ - "--kafka_adapter_host={{ tpl .Values.services.kafka.adapter.service . }}"
- "--kafka_adapter_port={{ .Values.services.kafka.adapter.port }}"
- - "--kafka_cluster_host={{ .Values.services.kafka.cluster.service }}"
+ - "--kafka_cluster_host={{ tpl .Values.services.kafka.cluster.service . }}"
- "--kafka_cluster_port={{ .Values.services.kafka.cluster.port }}"
- - "--core_topic={{ .Values.defaults.topics.core_topic }}"
- - "--adapter_topic={{ .Values.defaults.topics.adapter_open_onu_topic }}"
- - "--kv_store_host={{ .Values.services.etcd.service }}"
+ - "--core_topic={{ tpl .Values.adapter_open_onu.topics.core_topic . }}"
+ - "--adapter_topic={{ tpl .Values.adapter_open_onu.topics.adapter_open_onu_topic . }}"
+ - "--kv_store_host={{ tpl .Values.services.etcd.service . }}"
- "--kv_store_port={{ .Values.services.etcd.port }}"
- "--kv_store_request_timeout={{ tpl .Values.adapter_open_onu.kv_store_timeout . }}"
- "--log_level={{ $log_level }}"
- "--probe_port=8080"
- "--accept_incr_evto={{ tpl .Values.adapter_open_onu.incremental_evto_update . }}"
- "--max_timeout_interadapter_comm={{ tpl .Values.adapter_open_onu.max_timeout_interadapter_comm . }}"
+ - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+ - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
{{- if .Values.securityContext.enabled }}
securityContext:
allowPrivilegeEscalation: false
diff --git a/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml b/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
index 15517b2..3a96220 100644
--- a/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
+++ b/voltha-adapter-openonu/templates/openonu-py-statefulset.yaml
@@ -49,6 +49,7 @@
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "adapter"
app.kubernetes.io/part-of: "voltha"
+ app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if hasKey .Values "extra_pod_labels" }}
@@ -75,13 +76,13 @@
command: [ "sh", "-c"]
args:
- "REPLICA_ID=$(echo $VOLTHA_POD_NAME | grep -o '.$') && REPLICA_ID=$((REPLICA_ID + 1)) && echo $REPLICA_ID && python /voltha/adapters/brcm_openomci_onu/main.py
- --kafka_adapter={{ .Values.services.kafka.adapter.service }}:{{ .Values.services.kafka.adapter.port }}
- --kafka_cluster={{ .Values.services.kafka.cluster.service }}:{{ .Values.services.kafka.cluster.port }}
- --core_topic={{ .Values.defaults.topics.core_topic }}
- --adapter_topic={{ .Values.defaults.topics.adapter_open_olt_topic }}
- --name={{ .Values.defaults.topics.adapter_open_onu_topic }}
+ --kafka_adapter={{ tpl .Values.services.kafka.adapter.service . }}:{{ .Values.services.kafka.adapter.port }}
+ --kafka_cluster={{ tpl .Values.services.kafka.cluster.service . }}:{{ .Values.services.kafka.cluster.port }}
+ --core_topic={{ tpl .Values.adapter_open_onu.topics.core_topic . }}
+ --adapter_topic={{ tpl .Values.adapter_open_onu.topics.adapter_open_olt_topic . }}
+ --name={{ tpl .Values.adapter_open_onu.topics.adapter_open_onu_topic . }}
--backend=etcd
- --etcd={{ .Values.services.etcd.service }}:{{ .Values.services.etcd.port }}
+ --etcd={{ tpl .Values.services.etcd.service . }}:{{ .Values.services.etcd.port }}
--probe=:8080
--log_level={{ tpl .Values.adapter_open_onu.log_level . | upper }}
--totalReplicas={{ .Values.replicas.adapter_open_onu }}
@@ -113,5 +114,5 @@
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/name']
- name: KV_STORE_DATAPATH_PREFIX
- value: {{ .Values.defaults.kv_store_data_prefix }}
+ value: {{ tpl .Values.adapter_open_onu.kv_store_data_prefix . }}
{{- end }}
diff --git a/voltha-adapter-openonu/values.yaml b/voltha-adapter-openonu/values.yaml
index de7ab4d..54dbca6 100644
--- a/voltha-adapter-openonu/values.yaml
+++ b/voltha-adapter-openonu/values.yaml
@@ -18,7 +18,8 @@
fullNameOverride: ~
# Default overrides
-defaults:
+global:
+ stack_name: voltha
log_level: "WARN"
image_registry: ""
image_tag: ~
@@ -31,14 +32,12 @@
# kv store timeout
adapter_open_onu:
timeout: "5s"
- topics:
- core_topic: "rwcore"
- adapter_open_onu_topic: "brcm_openomci_onu"
-
- # Define prefix path for etcd
- # If you're running multiple voltha stacks the this value
- # should be unique across the stacks.
- kv_store_data_prefix: "service/voltha"
+ # Configure Log Correlation
+ log_correlation:
+ enabled: true
+ # Configure Tracing
+ tracing:
+ enabled: true
# Default security context under which the containers run
securityContext:
@@ -62,24 +61,32 @@
service: etcd
port: 2379
+ # Define Tracing Agent connection details
+ tracing_agent:
+ address: jaeger-agent:6831
+
# Define the recplica count for everything
replicas:
adapter_open_onu: 1
adapter_open_onu:
- log_level: '{{ .Values.defaults.log_level }}'
- incremental_evto_update: '{{ .Values.defaults.incremental_evto_update }}'
- max_timeout_interadapter_comm: '{{ .Values.defaults.max_timeout_interadapter_comm }}'
- kv_store_timeout: '{{ .Values.defaults.adapter_open_onu.timeout }}'
+ log_level: '{{ .Values.global.log_level }}'
+ incremental_evto_update: '{{ .Values.global.incremental_evto_update }}'
+ max_timeout_interadapter_comm: '{{ .Values.global.max_timeout_interadapter_comm }}'
+ kv_store_timeout: '{{ .Values.global.adapter_open_onu.timeout }}'
+ kv_store_data_prefix: 'service/{{ .Values.global.stack_name }}_voltha'
+ topics:
+ core_topic: "{{ .Values.global.stack_name }}_rwcore"
+ adapter_open_onu_topic: "{{ .Values.global.stack_name }}_brcm_openomci_onu"
images:
adapter_open_onu:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-openonu-adapter'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}2.5.0{{- end }}{{- else }}2.5.0{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}voltha-openonu-adapter'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}2.5.0{{- end }}{{- else }}2.5.0{{- end }}'
+ pullPolicy: '{{ .Values.global.image_pullPolicy }}'
adapter_open_onu_go:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-openonu-adapter-go'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}0.1.15{{- end }}{{- else }}0.1.15{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}voltha-openonu-adapter-go'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}0.1.15{{- end }}{{- else }}0.1.15{{- end }}'
+ pullPolicy: '{{ .Values.global.image_pullPolicy }}'
diff --git a/voltha-infra/.helmignore b/voltha-infra/.helmignore
new file mode 100644
index 0000000..50af031
--- /dev/null
+++ b/voltha-infra/.helmignore
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/voltha-infra/Chart.yaml b/voltha-infra/Chart.yaml
new file mode 100644
index 0000000..1354d94
--- /dev/null
+++ b/voltha-infra/Chart.yaml
@@ -0,0 +1,74 @@
+# Copyright 2020-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: v2
+description: A Helm chart to install the required infrastructure for VOLTHA
+keywords:
+ - "onf"
+ - "voltha"
+ - "onos"
+ - "radius"
+ - "sadis-server"
+home: "https://www.opennetworking.org/voltha"
+icon: "https://guide.opencord.org/logos/voltha.svg"
+maintainers:
+ - name: "Open Networking Foundation"
+ email: "info@opennetworking.org"
+ url: "https://www.opennetworking.org"
+name: voltha-infra
+
+appVersion: "1.0"
+version: 0.1.0
+
+dependencies:
+ - name: onos-classic
+ repository: https://charts.onosproject.org
+ version: 0.1.10
+ condition: onos-classic.enabled
+ - name: bbsim-sadis-server
+ # repository: https://charts.opencord.org
+ repository: "file://../bbsim-sadis-server"
+ version: 0.1.1
+ condition: bbsim-sadis-server.enabled
+ - name: etcd
+ repository: https://charts.bitnami.com/bitnami
+ version: 5.4.2
+ condition: etcd.enabled
+ - name: kafka
+ repository: https://charts.bitnami.com/bitnami
+ version: 12.5.0
+ condition: kafka.enabled
+ - name: freeradius
+ repository: https://charts.opencord.org
+ version: 1.0.2
+ condition: radius.enabled
+ - name: voltha-tracing
+ repository: https://charts.opencord.org
+ version: 1.0.0
+ condition: voltha-tracing.enabled
+ - name: elasticsearch
+ repository: https://helm.elastic.co
+ version: 7.10.1
+ condition: efk.enabled
+ - name: kibana
+ repository: https://helm.elastic.co
+ version: 7.10.1
+ condition: efk.enabled
+ - name: fluentd-elasticsearch
+ repository: https://kiwigrid.github.io
+ version: 9.6.2
+ # TODO kiwigrid is deprecated, use: https://github.com/kokuwaio/helm-charts/tree/main/charts/fluentd-elasticsearch
+ # repository: https://kokuwaio.github.io/helm-charts
+ # version: 11.7.1
+ condition: efk.enabled
diff --git a/voltha-infra/templates/NOTES.txt b/voltha-infra/templates/NOTES.txt
new file mode 100644
index 0000000..d5db669
--- /dev/null
+++ b/voltha-infra/templates/NOTES.txt
@@ -0,0 +1,13 @@
+Congratulations!
+
+You successfully installed the infrastructure required to run VOLTHA.
+
+Here are some commands to expose services:
+
+ONOS SSH: kubectl port-forward -n {{ .Release.Namespace }} svc/{{ .Release.Name }}-onos-classic-hs 8101
+ONOS GUI: kubectl port-forward -n {{ .Release.Namespace }} svc/{{ .Release.Name }}-onos-classic-hs 8181
+ETCD: kubectl port-forward -n {{ .Release.Namespace }} svc/{{ .Release.Name }}-etcd {{ .Values.etcd.service.port }}
+KAFKA: kubectl port-forward -n {{ .Release.Namespace }} svc/{{ .Release.Name }}-kafka {{ .Values.kafka.service.port }}
+
+Jaeger: kubectl port-forward -n {{ .Release.Namespace }} --address 0.0.0.0 svc/{{ .Release.Name }}-voltha-tracing-jaeger-gui 16686
+Kibana: kubectl port-forward -n {{ .Release.Namespace }} --address 0.0.0.0 svc/{{ .Release.Name }}-kibana 5601
diff --git a/voltha-infra/templates/_helpers.tpl b/voltha-infra/templates/_helpers.tpl
new file mode 100644
index 0000000..bf89b45
--- /dev/null
+++ b/voltha-infra/templates/_helpers.tpl
@@ -0,0 +1,23 @@
+# Copyright 2020-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.
+{{/* Expand the name of the chart. */}}
+{{- define "name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{/* Create a default fully qualified app name. We truncate at 63 chars because . . . */}}
+{{- define "fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- $fullname := default (printf "%s-%s" .Release.Name $name) .Values.fullNameOverride -}}
+{{- $fullname | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/voltha-infra/templates/onos-config-loader-configmap.yaml b/voltha-infra/templates/onos-config-loader-configmap.yaml
new file mode 100644
index 0000000..612d3a1
--- /dev/null
+++ b/voltha-infra/templates/onos-config-loader-configmap.yaml
@@ -0,0 +1,24 @@
+---
+
+# Copyright 2018-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: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Release.Name }}-onos-configs-data
+data:
+ netcfg.json: {{ tpl .Values.onos.netcfg . | quote }}
+ {{- range $key, $val := .Values.onos.componentConfig }}
+ {{ $key }}: {{ $val | quote }}
+ {{- end }}
diff --git a/voltha-infra/templates/onos-config-loader-script.yaml b/voltha-infra/templates/onos-config-loader-script.yaml
new file mode 100644
index 0000000..9132c85
--- /dev/null
+++ b/voltha-infra/templates/onos-config-loader-script.yaml
@@ -0,0 +1,33 @@
+---
+
+# Copyright 2020-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: v1
+kind: ConfigMap
+metadata:
+ name: {{ .Release.Name }}-onos-configs-loader
+data:
+ loader.sh: >
+ set -euo pipefail
+
+ echo -e "Loading netcfg into ONOS\n";
+ curl --fail -sSL --user {{ .Values.onos.username }}:{{ .Values.onos.password }} -X POST "http://{{ .Release.Name }}-onos-classic-hs:8181/onos/v1/network/configuration/" -H Content-type:application/json -d @/opt/configs/netcfg.json;
+
+ echo -e "Loading component configs into ONOS\n";
+ CFGS=$(ls /opt/configs | grep -v netcfg.json);
+ for CFG in ${CFGS};
+ do
+ echo -e "Loading $CFG config"
+ curl --fail -sSL --user {{ .Values.onos.username }}:{{ .Values.onos.password }} -X POST "http://{{ .Release.Name }}-onos-classic-hs:8181/onos/v1/configuration/$CFG" -H Content-type:application/json -d @/opt/configs/$CFG;
+ done
diff --git a/voltha-infra/templates/onos-config-loader.yaml b/voltha-infra/templates/onos-config-loader.yaml
new file mode 100644
index 0000000..79fc6a1
--- /dev/null
+++ b/voltha-infra/templates/onos-config-loader.yaml
@@ -0,0 +1,55 @@
+---
+
+# Copyright 2018-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: batch/v1
+kind: Job
+metadata:
+ name: {{ template "fullname" . }}-onos-config-loader
+ labels:
+ app: onos-config-loader
+ chart: {{ .Chart.Name }}
+ release: {{ .Release.Name }}
+spec:
+ backoffLimit: 12
+ template:
+ metadata:
+ labels:
+ app: onos-config-loader
+ release: {{ .Release.Name }}
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/onos-config-loader-configmap.yaml") . | sha256sum }}
+ spec:
+ restartPolicy: OnFailure
+ containers:
+ - name: onos-config-loader
+ image: ellerbrock/alpine-bash-curl-ssl:latest
+ imagePullPolicy: IfNotPresent
+ command:
+ - "bash"
+ - "/opt/loader/loader.sh"
+ volumeMounts:
+ - name: onos-configs
+ mountPath: /opt/configs
+ - name: onos-loader
+ mountPath: /opt/loader
+ volumes:
+ - name: onos-configs
+ configMap:
+ name: {{ .Release.Name }}-onos-configs-data
+ - name: onos-loader
+ configMap:
+ name: {{ .Release.Name }}-onos-configs-loader
+ defaultMode: 0777
diff --git a/voltha-infra/values.yaml b/voltha-infra/values.yaml
new file mode 100644
index 0000000..6c6676c
--- /dev/null
+++ b/voltha-infra/values.yaml
@@ -0,0 +1,170 @@
+# Copyright 2020-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.
+
+# Default values for voltha-infra.
+# This is a YAML-formatted file.
+
+# components config
+onos-classic:
+ enabled: true
+ replicas: 1
+ atomix:
+ replicas: 0
+ image:
+ pullPolicy: Always
+ repository: voltha/voltha-onos
+ tag: master
+
+bbsim-sadis-server:
+ enabled: true
+ replicas: 1
+
+radius:
+ enabled: true
+
+etcd:
+ enabled: true
+ auth:
+ rbac:
+ enabled: false
+ persistence:
+ enabled: false
+ statefulset:
+ replicaCount: 1
+ service:
+ port: 2379
+
+kafka:
+ enabled: true
+ replicaCount: 1
+ persistence:
+ enabled: false
+ zookeeper:
+ replicaCount: 1
+ persistence:
+ enabled: false
+ service:
+ port: 9092
+
+voltha-tracing:
+ enabled: false
+ tracing:
+ maxTraces: 500000
+
+efk:
+ enabled: false
+
+# onos configuration
+# used in the job "onos-config-loader"
+onos:
+ # NOTE that these values won't change the configuration in the ONOS container, they are only used in the script that loads the config
+ username: karaf
+ password: karaf
+ netcfg: >
+ {
+ "apps" : {
+ "org.opencord.dhcpl2relay" : {
+ "dhcpl2relay" : {
+ "useOltUplinkForServerPktInOut" : true
+ }
+ },
+ "org.opencord.kafka": {
+ "kafka" : {
+ "bootstrapServers" : "{{ .Release.Name }}-kafka.{{ .Release.Namespace }}.svc:9092"
+ }
+ },
+ "org.opencord.aaa" : {
+ "AAA": {
+ "radiusConnectionType" : "socket",
+ "radiusHost": "{{ .Release.Name }}-freeradius.{{ .Release.Namespace }}.svc",
+ "radiusServerPort": "1812",
+ "radiusSecret": "SECRET"
+ }
+ },
+ "org.opencord.sadis": {
+ "sadis": {
+ "integration": {
+ "url": "http://bbsim-sadis-server.{{ .Release.Namespace }}.svc:58080/subscribers/%s",
+ "cache": {
+ "enabled": true,
+ "maxsize": 50,
+ "ttl": "PT1m"
+ }
+ }
+ },
+ "bandwidthprofile": {
+ "integration": {
+ "url": "http://bbsim-sadis-server.{{ .Release.Namespace }}.svc:58080/profiles/%s",
+ "cache": {
+ "enabled": true,
+ "maxsize": 50,
+ "ttl": "PT1m"
+ }
+ }
+ }
+ }
+ }
+ }
+ componentConfig:
+ "org.opencord.olt.impl.OltFlowService": >
+ {
+ "enableDhcpOnNni": "true",
+ "defaultTechProfileId": "64",
+ "enableIgmpOnNni": "false",
+ "enableEapol": "true",
+ "enableDhcpV6": "false",
+ "enableDhcpV4": "true"
+ }
+ "org.onosproject.provider.lldp.impl.LldpLinkProvider": >
+ {
+ "enabled": "false"
+ }
+
+# START EFK Setup to push voltha logs
+# elasticstack config
+# ref: https://github.com/elastic/helm-charts/tree/7.7.0/elasticsearch
+elasticsearch:
+ replicas: 1
+ minimumMasterNodes: 1
+ # set cpu and memory configuration
+ resources:
+ requests:
+ cpu: "400m"
+ memory: "1Gi"
+ limits:
+ cpu: "1000m"
+ memory: "2Gi"
+ # setup persistence volume.By default persistence volumeclaim is disabled
+ volumeClaimTemplate:
+ accessModes: ["ReadWriteOnce"]
+ resources:
+ requests:
+ storage: 5Gi
+ persistence:
+ enabled: false
+ # setup cluster health status as yellow
+ clusterHealthCheckParams: "wait_for_status=yellow&timeout=1s"
+
+# kibana config
+# ref: https://github.com/elastic/helm-charts/tree/7.7.0/kibana
+kibana:
+ elasticsearchHosts: "http://elasticsearch-master:9200"
+
+# fluentd-elasticsearch config
+# ref: https://github.com/kiwigrid/helm-charts/tree/master/charts/fluentd-elasticsearch
+fluentd-elasticsearch:
+ elasticsearch:
+ # set elasticsearch host
+ hosts: ["elasticsearch-master:9200"]
+ sslVerify: false
diff --git a/voltha-stack/.helmignore b/voltha-stack/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/voltha-stack/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/voltha-stack/Chart.yaml b/voltha-stack/Chart.yaml
new file mode 100644
index 0000000..0d3d4ee
--- /dev/null
+++ b/voltha-stack/Chart.yaml
@@ -0,0 +1,48 @@
+# Copyright 2020-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: v2
+description: A Helm chart to install a VOLTHA stack on existing infrastructure
+keywords:
+ - "onf"
+ - "voltha"
+ - "openolt-adapters"
+ - "openonu-adapters"
+home: "https://www.opennetworking.org/voltha"
+icon: "https://guide.opencord.org/logos/voltha.svg"
+maintainers:
+ - name: "Open Networking Foundation"
+ email: "info@opennetworking.org"
+ url: "https://www.opennetworking.org"
+name: voltha-stack
+
+appVersion: "1.0"
+version: 0.1.0
+
+dependencies:
+ - name: voltha
+ # repository: https://charts.opencord.org
+ version: 2.8.1
+ repository: "file://../voltha"
+ condition: voltha.enabled
+ - name: voltha-adapter-openonu
+ # repository: https://charts.opencord.org
+ version: 2.7.1
+ repository: "file://../voltha-adapter-openonu"
+ condition: voltha-adapter-openonu.enabled
+ - name: voltha-adapter-openolt
+ # repository: https://charts.opencord.org
+ version: 2.8.1
+ repository: "file://../voltha-adapter-openolt"
+ condition: voltha-adapter-openolt.enabled
diff --git a/voltha-stack/templates/NOTES.txt b/voltha-stack/templates/NOTES.txt
new file mode 100644
index 0000000..83cb85c
--- /dev/null
+++ b/voltha-stack/templates/NOTES.txt
@@ -0,0 +1,7 @@
+Thanks for installing VOLTHA!
+
+You installed a stack with name: {{ .Release.Name }}.
+
+In order to use "voltctl" to connect to this stack you need to expose the VOLTHA API service:
+
+ kubectl -n {{ .Release.Namespace }} port-forward svc/{{ .Release.Name }}-voltha-api 55555
diff --git a/voltha-stack/values.yaml b/voltha-stack/values.yaml
new file mode 100644
index 0000000..98ad5e9
--- /dev/null
+++ b/voltha-stack/values.yaml
@@ -0,0 +1,83 @@
+# Copyright 2020-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.
+---
+
+global:
+ stack_name: voltha
+ log_level: "WARN"
+ voltha_infra_name: "voltha-infra"
+ voltha_infra_namespace: "infra"
+ log_correlation:
+ enabled: false
+ tracing:
+ enabled: false
+
+voltha:
+ enabled: true
+ rw_core:
+ kv_store_data_prefix: 'service/voltha/{{ .Release.Name }}_{{ .Values.global.stack_name }}'
+ topics:
+ core_topic: "{{ .Release.Name }}_{{ .Values.global.stack_name }}_rwcore"
+ services:
+ kafka:
+ adapter:
+ address: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc:9092"
+ cluster:
+ address: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc:9092"
+ etcd:
+ address: "{{ .Values.global.voltha_infra_name }}-etcd.{{ .Values.global.voltha_infra_namespace }}.svc:2379"
+ tracing_agent:
+ address: "{{ .Values.global.voltha_infra_name }}-voltha-tracing-jaeger-agent.{{ .Values.global.voltha_infra_namespace }}.svc:6831"
+ controller:
+ # TODO need to customize for multiple instances
+ - address: "{{ .Values.global.voltha_infra_name }}-onos-classic-hs.{{ .Values.global.voltha_infra_namespace }}.svc:6653"
+
+voltha-adapter-openonu:
+ enabled: true
+ adapter_open_onu:
+ kv_store_data_prefix: 'service/voltha/{{ .Release.Name }}_{{ .Values.global.stack_name }}'
+ topics:
+ core_topic: "{{ .Release.Name }}_{{ .Values.global.stack_name }}_rwcore"
+ adapter_open_onu_topic: "{{ .Release.Name }}_{{ .Values.global.stack_name }}_brcm_openomci_onu"
+ services:
+ kafka:
+ adapter:
+ service: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc"
+ port: 9092
+ cluster:
+ service: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc"
+ port: 9092
+ etcd:
+ service: "{{ .Values.global.voltha_infra_name }}-etcd.{{ .Values.global.voltha_infra_namespace }}.svc"
+ port: 2379
+ tracing_agent:
+ address: "{{ .Values.global.voltha_infra_name }}-voltha-tracing-jaeger-agent.{{ .Values.global.voltha_infra_namespace }}.svc:6831"
+
+voltha-adapter-openolt:
+ enabled: true
+ adapter_open_olt:
+ kv_store_data_prefix: 'service/voltha/{{ .Release.Name }}_{{ .Values.global.stack_name }}'
+ topics:
+ core_topic: "{{ .Release.Name }}_{{ .Values.global.stack_name }}_rwcore"
+ adapter_open_olt_topic: "{{ .Release.Name }}_{{ .Values.global.stack_name }}_openolt"
+ services:
+ kafka:
+ adapter:
+ address: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc:9092"
+ cluster:
+ address: "{{ .Values.global.voltha_infra_name }}-kafka.{{ .Values.global.voltha_infra_namespace }}.svc:9092"
+ etcd:
+ address: "{{ .Values.global.voltha_infra_name }}-etcd.{{ .Values.global.voltha_infra_namespace }}.svc:2379"
+ tracing_agent:
+ address: "{{ .Values.global.voltha_infra_name }}-voltha-tracing-jaeger-agent.{{ .Values.global.voltha_infra_namespace }}.svc:6831"
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index f0e8676..f717ccd 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "voltha"
-version: "2.8.0"
+version: "2.8.1"
description: "A Helm chart for Voltha based on K8S resources in Voltha project"
keywords:
- "onf"
diff --git a/voltha/templates/core-deploy.yaml b/voltha/templates/core-deploy.yaml
index 1fc648f..f10d8b9 100644
--- a/voltha/templates/core-deploy.yaml
+++ b/voltha/templates/core-deploy.yaml
@@ -47,6 +47,7 @@
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "core"
app.kubernetes.io/part-of: "voltha"
+ app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if hasKey .Values "extra_pod_labels" }}
@@ -82,24 +83,24 @@
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/name']
- name: KV_STORE_DATAPATH_PREFIX
- value: {{ .Values.defaults.kv_store_data_prefix }}
+ value: {{ tpl .Values.rw_core.kv_store_data_prefix . }}
args:
- "/app/rw_core"
- "--kv_store_type=etcd"
- - "--kv_store_address={{ .Values.services.etcd.address }}"
+ - "--kv_store_address={{ tpl .Values.services.etcd.address . }}"
- "--grpc_address=0.0.0.0:50057"
- "--banner"
- - "--kafka_adapter_address={{ .Values.services.kafka.adapter.address }}"
- - "--kafka_cluster_address={{ .Values.services.kafka.cluster.address }}"
- - "--rw_core_topic={{ .Values.defaults.topics.core_topic }}"
+ - "--kafka_adapter_address={{ tpl .Values.services.kafka.adapter.address . }}"
+ - "--kafka_cluster_address={{ tpl .Values.services.kafka.cluster.address . }}"
+ - "--rw_core_topic={{ tpl .Values.rw_core.topics.core_topic . }}"
- "--core_timeout={{ tpl .Values.rw_core.core_timeout . }}"
- "--timeout_long_request={{ tpl .Values.rw_core.timeout_long_request . }}"
- "--timeout_request={{ tpl .Values.rw_core.timeout_request . }}"
- "--log_level={{ $log_level }}"
- "--probe_address=:8080"
- - "--trace_enabled={{ .Values.tracing.enabled }}"
- - "--trace_agent_address={{ .Values.services.tracing_agent.address }}"
- - "--log_correlation_enabled={{ .Values.log_correlation.enabled }}"
+ - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+ - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+ - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
ports:
- containerPort: 50057
name: grpc
diff --git a/voltha/templates/ofagent-deploy.yaml b/voltha/templates/ofagent-deploy.yaml
index 234e965..87f76f3 100644
--- a/voltha/templates/ofagent-deploy.yaml
+++ b/voltha/templates/ofagent-deploy.yaml
@@ -47,6 +47,7 @@
app.kubernetes.io/version: {{ quote .Chart.AppVersion }}
app.kubernetes.io/component: "integration"
app.kubernetes.io/part-of: "voltha"
+ app.kubernetes.io/stack: "{{ .Values.global.stack_name }}"
app.kubernetes.io/managed-by: {{ quote .Release.Service }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- if hasKey .Values "extra_pod_labels" }}
@@ -77,11 +78,11 @@
fieldRef:
fieldPath: metadata.labels['app.kubernetes.io/name']
- name: KV_STORE_DATAPATH_PREFIX
- value: {{ .Values.defaults.kv_store_data_prefix }}
+ value: {{ .Values.global.kv_store_data_prefix }}
args:
- "/app/ofagent"
{{- range .Values.services.controller }}
- - "--controller={{ .address }}"
+ - "--controller={{ tpl .address $ }}"
{{- end }}
- "--voltha={{ template "fullname" . }}-api.{{ .Release.Namespace }}.svc:55555"
- "--kv_store_address={{ .Values.services.etcd.address }}"
@@ -89,9 +90,9 @@
- "--kv_store_request_timeout=60s"
- "--log_level={{ $log_level }}"
- "--probe=:8080"
- - "--trace_enabled={{ .Values.tracing.enabled }}"
- - "--trace_agent_address={{ .Values.services.tracing_agent.address }}"
- - "--log_correlation_enabled={{ .Values.log_correlation.enabled }}"
+ - "--trace_enabled={{ .Values.global.tracing.enabled }}"
+ - "--trace_agent_address={{ tpl .Values.services.tracing_agent.address . }}"
+ - "--log_correlation_enabled={{ .Values.global.log_correlation.enabled }}"
{{- if .Values.securityContext.enabled }}
securityContext:
allowPrivilegeEscalation: false
diff --git a/voltha/values.yaml b/voltha/values.yaml
index 9dac911..644bba3 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -18,7 +18,8 @@
# Default Values
# The following are the default values used for every container in the
# template.
-defaults:
+global:
+ stack_name: voltha
log_level: "WARN"
image_registry: ''
image_org: "voltha/"
@@ -26,13 +27,12 @@
image_pullPolicy: "Always"
rw_core:
timeout: "10s"
- topics:
- core_topic: "rwcore"
-
- # Define prefix path for etcd
- # If you're running multiple voltha stacks the this value
- # should be unique across the stacks.
- kv_store_data_prefix: "service/voltha"
+ # Configure Log Correlation
+ log_correlation:
+ enabled: true
+ # Configure Tracing
+ tracing:
+ enabled: true
# Default security context under which the containers run
securityContext:
@@ -65,14 +65,6 @@
profiler:
enabled: false
-# Configure Log Correlation
-log_correlation:
- enabled: true
-
-# Configure Tracing
-tracing:
- enabled: false
-
# Define the replica count for everything
replicas:
# For R/W cores the templates translate the number of replicas
@@ -83,24 +75,27 @@
ofagent: 1
rw_core:
- log_level: '{{ .Values.defaults.log_level }}'
- core_timeout: '{{ .Values.defaults.rw_core.timeout }}'
- timeout_long_request: '{{ .Values.defaults.rw_core.timeout }}'
- timeout_request: '{{ .Values.defaults.rw_core.timeout }}'
+ log_level: '{{ .Values.global.log_level }}'
+ core_timeout: '{{ .Values.global.rw_core.timeout }}'
+ timeout_long_request: '{{ .Values.global.rw_core.timeout }}'
+ timeout_request: '{{ .Values.global.rw_core.timeout }}'
+ kv_store_data_prefix: 'service/{{ .Values.global.stack_name }}_voltha'
+ topics:
+ core_topic: "{{ .Values.global.stack_name }}_rwcore"
ofagent:
- log_level: '{{ .Values.defaults.log_level }}'
+ log_level: '{{ .Values.global.log_level }}'
# Define Docker images to be used
images:
ofagent:
- registry: '{{ .Values.defaults.image_registry }}'
- repository: '{{ .Values.defaults.image_org }}voltha-ofagent-go'
- tag: '{{- if hasKey .Values.defaults "image_tag" }}{{- if .Values.defaults.image_tag }}{{ .Values.defaults.image_tag }}{{- else }}1.4.2{{- end }}{{- else }}1.4.2{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}voltha-ofagent-go'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}1.4.2{{- end }}{{- else }}1.4.2{{- end }}'
+ pullPolicy: '{{ .Values.global.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.6.3{{- end }}{{- else }}2.6.3{{- end }}'
- pullPolicy: '{{ .Values.defaults.image_pullPolicy }}'
+ registry: '{{ .Values.global.image_registry }}'
+ repository: '{{ .Values.global.image_org }}voltha-rw-core'
+ tag: '{{- if hasKey .Values.global "image_tag" }}{{- if .Values.global.image_tag }}{{ .Values.global.image_tag }}{{- else }}2.6.3{{- end }}{{- else }}2.6.3{{- end }}'
+ pullPolicy: '{{ .Values.global.image_pullPolicy }}'