Fix seba charts 02/1402/1
authorxinhuili <lxinhui@vmware.com>
Wed, 14 Aug 2019 06:25:38 +0000 (14:25 +0800)
committerxinhuili <lxinhui@vmware.com>
Wed, 14 Aug 2019 06:25:38 +0000 (14:25 +0800)
This patch is to fix seba charts.

Signed-off-by: XINHUI LI <lxinhui@vmware.com>
Change-Id: I60e5bf5cd7c64207c2b09b1db4791e8bfa7ef3b5

372 files changed:
src/seba_charts/.gitignore [new file with mode: 0644]
src/seba_charts/LICENSE [new file with mode: 0644]
src/seba_charts/README.md [new file with mode: 0644]
src/seba_charts/att-workflow/Chart.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/.helmignore [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/Chart.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_helpers.tpl [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_tosca.tpl [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/templates/configmap.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/templates/deployment.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/charts/att-workflow-driver/values.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/requirements.lock [new file with mode: 0755]
src/seba_charts/att-workflow/requirements.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/templates/_helpers.tpl [new file with mode: 0755]
src/seba_charts/att-workflow/templates/_tosca.tpl [new file with mode: 0755]
src/seba_charts/att-workflow/templates/tosca-configmap.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/templates/tosca-job.yaml [new file with mode: 0755]
src/seba_charts/att-workflow/values.yaml [new file with mode: 0755]
src/seba_charts/bbsim/Chart.yaml [new file with mode: 0644]
src/seba_charts/bbsim/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/bbsim/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/bbsim/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/bbsim/templates/service.yaml [new file with mode: 0644]
src/seba_charts/bbsim/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-etcd-crd.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-clusterrole-binding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-service-account.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/etcd-cluster-crd.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-cluster-role.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-clusterrole-binding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-service-account.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-etcd-crd.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-clusterrole-binding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service-account.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/etcd-operator/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/config-jmx-exporter.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/job-chroots.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service-headless.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/statefulset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/requirements.lock [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/requirements.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/configmap-config.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/configmap-jmx.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/deployment-kafka-exporter.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/job-config.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/rbac.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/service-brokers-external.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/service-brokers.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/service-headless.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/servicemonitors.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/statefulset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/templates/tests/test_topic_create_consume_produce.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/kafka/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/ci/extrainitcontainers-values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-pdb.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-svc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-pdb.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-statefulset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-pdb.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-statefulset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-svc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrole.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrolebinding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/daemonset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service-account.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap-dashboardimport.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/kibana/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/patterns-config.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/pipeline-config.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/poddisruptionbudget.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/statefulset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/charts/logstash/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/requirements.lock [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/requirements.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/logging/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrole.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrolebinding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap-dashboard-provider.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/dashboards-json-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/podsecuritypolicy.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/pvc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/role.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/rolebinding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/secret.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/OWNERS [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/README.md [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-networkpolicy.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-pvc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-svc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-daemonset.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrole.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrolebinding.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-ingress.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-networkpolicy.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-pvc.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-serviceaccount.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/examples/nem-monitoring-minikube.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/kb8s-app-metrics.json [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/onos-kpi.json [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/voltha-kpi.json [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/xos.json [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/requirements.lock [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/requirements.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-kb8s-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-onos-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-voltha-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-xos-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/nem-monitoring/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/debugger-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/log-agent-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/openflow-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/ovsdb-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/ssh-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/templates/ui-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/onos/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_persist.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-secrets.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/.helmignore [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/Chart.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_ws.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/pki/xos-CA.pem [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.key [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.pem [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/requirements.lock [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/requirements.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/50-rbac.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/NOTES.txt [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/_core.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/core-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/core-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/core-grpc-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/core-prometheus-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/core-secrets.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/coreapi-cert-secret.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/tests/test-xos-core-api.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/tosca-configmap.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/tosca-deployment.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/templates/tosca-service.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/charts/xos-core/values.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/requirements.lock [new file with mode: 0644]
src/seba_charts/cord-platform/requirements.yaml [new file with mode: 0644]
src/seba_charts/cord-platform/values.yaml [new file with mode: 0644]
src/seba_charts/replace_images.sh [new file with mode: 0644]
src/seba_charts/scripts/calico.yaml [new file with mode: 0644]
src/seba_charts/scripts/etcd.yaml [new file with mode: 0644]
src/seba_charts/scripts/fabric.yaml [new file with mode: 0644]
src/seba_charts/scripts/installK8.sh [new file with mode: 0644]
src/seba_charts/scripts/installSEBA.sh [new file with mode: 0644]
src/seba_charts/scripts/k8init.sh [new file with mode: 0644]
src/seba_charts/scripts/mini_test.sh [new file with mode: 0644]
src/seba_charts/scripts/olt.yaml [new file with mode: 0644]
src/seba_charts/scripts/subscriber.yaml [new file with mode: 0644]
src/seba_charts/seba/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/.helmignore [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/requirements.lock [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/requirements.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/templates/tosca-configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/templates/tosca-job.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/base-kubernetes/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/.helmignore [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/fabric/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/.helmignore [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/onos-service/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/rcord/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/sadis-server/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-service.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/sadis-server/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/.helmignore [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/templates/configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/templates/deployment.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/charts/volt/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/requirements.lock [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/requirements.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/templates/_tosca.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/templates/tests/test-att-workflow.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/templates/tosca-configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/templates/tosca-job.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/seba-services/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/charts/etcd-cluster/.helmignore [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/charts/etcd-cluster/Chart.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/charts/etcd-cluster/templates/etcd-cluster.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/charts/etcd-cluster/values.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/requirements.lock [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/requirements.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/05-namespace.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/10-default-backend.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/20-configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/30-tcp-services-configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/40-udp-services-configmap.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/50-rbac.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/54-namespace.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/55-rbac.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/60-cluster-ingress-nginx.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/70-service-ingress-nginx.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/80-ingress.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/_helpers.tpl [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/alarm-generator.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/envoy_for_etcd.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/freeradius-config.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/freeradius.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/logconfigmaps.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/netconf.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/ofagent.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/vcli.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/templates/vcore_for_etcd.yaml [new file with mode: 0644]
src/seba_charts/seba/charts/voltha/values.yaml [new file with mode: 0644]
src/seba_charts/seba/requirements.lock [new file with mode: 0644]
src/seba_charts/seba/requirements.yaml [new file with mode: 0644]
src/seba_charts/seba/values.yaml [new file with mode: 0644]

diff --git a/src/seba_charts/.gitignore b/src/seba_charts/.gitignore
new file mode 100644 (file)
index 0000000..610b0d5
--- /dev/null
@@ -0,0 +1,2 @@
+#IDE files\r
+.remote-sync.json\r
diff --git a/src/seba_charts/LICENSE b/src/seba_charts/LICENSE
new file mode 100644 (file)
index 0000000..261eeb9
--- /dev/null
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.
diff --git a/src/seba_charts/README.md b/src/seba_charts/README.md
new file mode 100644 (file)
index 0000000..bc39185
--- /dev/null
@@ -0,0 +1,2 @@
+# seba_charts
+Helm charts for bringing up SEBA
diff --git a/src/seba_charts/att-workflow/Chart.yaml b/src/seba_charts/att-workflow/Chart.yaml
new file mode 100755 (executable)
index 0000000..6c2b4f4
--- /dev/null
@@ -0,0 +1,6 @@
+apiVersion: v1
+appVersion: 1.1.5
+description: A Helm chart for XOS's "att-workflow"
+icon: https://guide.opencord.org/logos/cord.svg
+name: att-workflow
+version: 1.0.2
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/.helmignore b/src/seba_charts/att-workflow/charts/att-workflow-driver/.helmignore
new file mode 100755 (executable)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/Chart.yaml b/src/seba_charts/att-workflow/charts/att-workflow-driver/Chart.yaml
new file mode 100755 (executable)
index 0000000..9ade1fb
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.0.12
+description: A Helm chart for XOS's "att-workflow-driver" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: att-workflow-driver
+version: 1.0.12
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_helpers.tpl b/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_helpers.tpl
new file mode 100755 (executable)
index 0000000..86daf56
--- /dev/null
@@ -0,0 +1,80 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "att-workflow-driver.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "att-workflow-driver.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "att-workflow-driver.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "att-workflow-driver.serviceConfig" -}}
+name: att-workflow-driver
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.att-workflow-driver
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_tosca.tpl b/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/_tosca.tpl
new file mode 100755 (executable)
index 0000000..1e92a0c
--- /dev/null
@@ -0,0 +1,30 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "att-workflow-driver.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up att-workflow-driver service
+imports:
+  - custom_types/attworkflowdriverservice.yaml
+
+topology_template:
+  node_templates:
+    service#att-workflow-driver:
+      type: tosca.nodes.AttWorkflowDriverService
+      properties:
+        name: att-workflow-driver
+        kind: oss
+{{- end -}}
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/configmap.yaml b/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/configmap.yaml
new file mode 100755 (executable)
index 0000000..ce09cb5
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: att-workflow-driver
+data:
+  serviceConfig: |
+{{ include "att-workflow-driver.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/deployment.yaml b/src/seba_charts/att-workflow/charts/att-workflow-driver/templates/deployment.yaml
new file mode 100755 (executable)
index 0000000..2b7b439
--- /dev/null
@@ -0,0 +1,77 @@
+---
+
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "att-workflow-driver.fullname" . }}
+  labels:
+    app: {{ template "att-workflow-driver.name" . }}
+    chart: {{ template "att-workflow-driver.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "att-workflow-driver.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "att-workflow-driver.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: att-workflow-driver-config
+              mountPath: /opt/xos/synchronizers/att-workflow-driver/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: att-workflow-driver-config
+          configMap:
+            name: att-workflow-driver
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/att-workflow/charts/att-workflow-driver/values.yaml b/src/seba_charts/att-workflow/charts/att-workflow-driver/values.yaml
new file mode 100755 (executable)
index 0000000..9d8273f
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# 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.
+
+# Default values for vOLT
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'akrainoenea/att-workflow-driver-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/att-workflow/requirements.lock b/src/seba_charts/att-workflow/requirements.lock
new file mode 100755 (executable)
index 0000000..aab6c39
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: att-workflow-driver
+  repository: file://../../xos-services/att-workflow-driver
+  version: 1.0.12
+digest: sha256:f1b42952bde477f7eec3072d853fb9d98aa791ccba85def30b0392d8f24a02fe
+generated: 2018-12-17T10:31:05.340526782-07:00
diff --git a/src/seba_charts/att-workflow/requirements.yaml b/src/seba_charts/att-workflow/requirements.yaml
new file mode 100755 (executable)
index 0000000..f871494
--- /dev/null
@@ -0,0 +1,19 @@
+---
+# 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.
+
+dependencies:
+- name: att-workflow-driver
+  version: 1.0.12
+  repository: file://../../xos-services/att-workflow-driver
diff --git a/src/seba_charts/att-workflow/templates/_helpers.tpl b/src/seba_charts/att-workflow/templates/_helpers.tpl
new file mode 100755 (executable)
index 0000000..6f83543
--- /dev/null
@@ -0,0 +1,47 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "att-workflow.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "att-workflow.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "att-workflow.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/src/seba_charts/att-workflow/templates/_tosca.tpl b/src/seba_charts/att-workflow/templates/_tosca.tpl
new file mode 100755 (executable)
index 0000000..b919834
--- /dev/null
@@ -0,0 +1,53 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+
+{{- define "att-workflow.serviceGraphTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/attworkflowdriverservice.yaml
+  - custom_types/voltservice.yaml
+  - custom_types/servicedependency.yaml
+description: att-workflow-driver service graph
+topology_template:
+  node_templates:
+
+# These services must be defined before loading the graph
+
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        name: volt
+        must-exist: true
+
+    service#att-workflow-driver:
+      type: tosca.nodes.AttWorkflowDriverService
+      properties:
+        name: att-workflow-driver
+        must-exist: true
+
+    service_dependency#workflow_volt:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#att-workflow-driver
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
diff --git a/src/seba_charts/att-workflow/templates/tosca-configmap.yaml b/src/seba_charts/att-workflow/templates/tosca-configmap.yaml
new file mode 100755 (executable)
index 0000000..9fc6add
--- /dev/null
@@ -0,0 +1,25 @@
+---
+
+# 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: att-workflow-tosca
+data:
+  010-fixtures.yaml: |
+{{ include "att-workflow-driver.serviceTosca"  (index .Values "att-workflow-driver") | indent 4 }}
+  300-service-graph.yaml: |
+{{ include "att-workflow.serviceGraphTosca" . | indent 4 }}
diff --git a/src/seba_charts/att-workflow/templates/tosca-job.yaml b/src/seba_charts/att-workflow/templates/tosca-job.yaml
new file mode 100755 (executable)
index 0000000..a51aaf7
--- /dev/null
@@ -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 "att-workflow.fullname" . }}-tosca-loader
+  labels:
+    app: {{ template "att-workflow.name" . }}
+    chart: {{ template "att-workflow.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  backoffLimit: 12
+  template:
+    metadata:
+      labels:
+        app: {{ template "att-workflow.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
+    spec:
+      restartPolicy: OnFailure
+      containers:
+        - name: {{ .Chart.Name }}-tosca-loader
+          image: {{ .Values.global.registry }}{{ .Values.images.tosca_loader.repository }}:{{ tpl .Values.images.tosca_loader.tag . }}
+          imagePullPolicy: {{ .Values.images.tosca_loader.pullPolicy }}
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
+          volumeMounts:
+            - name: att-workflow-tosca
+              mountPath: /opt/tosca
+      volumes:
+        - name: att-workflow-tosca
+          configMap:
+            name: att-workflow-tosca
diff --git a/src/seba_charts/att-workflow/values.yaml b/src/seba_charts/att-workflow/values.yaml
new file mode 100755 (executable)
index 0000000..55bee5e
--- /dev/null
@@ -0,0 +1,37 @@
+---
+# 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.
+
+# Default values for the att-workflow profile.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+
+nameOverride: ""
+fullnameOverride: ""
+
+images:
+  tosca_loader:
+    repository: 'cachengo/tosca-loader'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+att-workflow-driver:
+  kafkaService: "cord-platform-kafka"
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
diff --git a/src/seba_charts/bbsim/Chart.yaml b/src/seba_charts/bbsim/Chart.yaml
new file mode 100644 (file)
index 0000000..1361845
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.0.0
+description: Broadband Simulator
+icon: https://guide.opencord.org/logos/cord.svg
+name: bbsim
+version: 1.0.0
diff --git a/src/seba_charts/bbsim/templates/NOTES.txt b/src/seba_charts/bbsim/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..1359652
--- /dev/null
@@ -0,0 +1,5 @@
+BBSim deployed with release name: {{ .Release.Name }}
+
+OLT ID: {{ .Values.olt_id }}, on TCP port: {{ .Values.olt_tcp_port }}
+# of PON Ports: {{ .Values.pon_ports }}
+ONUs per PON Port: {{ .Values.onus_per_pon_port }} (total: {{ mul .Values.pon_ports .Values.onus_per_pon_port}})
diff --git a/src/seba_charts/bbsim/templates/_helpers.tpl b/src/seba_charts/bbsim/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..af6ac67
--- /dev/null
@@ -0,0 +1,48 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "bbsim.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "bbsim.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "bbsim.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
diff --git a/src/seba_charts/bbsim/templates/deployment.yaml b/src/seba_charts/bbsim/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..8156ed2
--- /dev/null
@@ -0,0 +1,84 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ template "bbsim.fullname" . }}
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "bbsim.name" . }}
+    chart: {{ template "bbsim.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "bbsim.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "bbsim.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      serviceAccount: {{ .Values.serviceAccountName }}
+      serviceAccountName: {{ .Values.serviceAccountName }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.images.bbsim.repository }}:{{ tpl .Values.images.bbsim.tag . }}
+          imagePullPolicy: {{ .Values.images.bbsim.pullPolicy }}
+          securityContext:
+            privileged: true
+          command: [
+            "/app/bbsim",
+            "-n", "{{ .Values.onus_per_pon_port }}",
+            "-m", "{{ .Values.emulation_mode }}",
+            "-H", ":{{ .Values.olt_tcp_port }}",
+            "-id", "{{ .Values.olt_id }}",
+            "-i", "{{ .Values.pon_ports }}",
+            "-aw", "{{ .Values.wpa_wait }}",
+            "-dw", "{{ .Values.dhcp_wait }}",
+            "-k", "{{ .Values.kafka_broker }}",
+          ]
+          ports:
+            - name: "bbsim-olt-id-{{ .Values.olt_id }}"
+              containerPort: {{ .Values.olt_tcp_port }}
+              port: {{ .Values.olt_tcp_port }}
+              protocol: TCP
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/bbsim/templates/service.yaml b/src/seba_charts/bbsim/templates/service.yaml
new file mode 100644 (file)
index 0000000..d63c129
--- /dev/null
@@ -0,0 +1,34 @@
+---
+# 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: Service
+metadata:
+  name: {{ template "bbsim.fullname" . }}
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "bbsim.name" . }}
+    chart: {{ template "bbsim.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - name: "bbsim-olt-id-{{ .Values.olt_id }}"
+      port: {{ .Values.olt_tcp_port }}
+      protocol: TCP
+  selector:
+    app: {{ template "bbsim.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/bbsim/values.yaml b/src/seba_charts/bbsim/values.yaml
new file mode 100644 (file)
index 0000000..513d14d
--- /dev/null
@@ -0,0 +1,66 @@
+# 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.
+
+# bbsim values
+
+# CLI switches passed to bbsim
+
+# -id option
+olt_id: 0
+
+# -H option, port number portion
+olt_tcp_port: 50060
+
+# -i option
+pon_ports: 1
+
+# -n option
+onus_per_pon_port: 16
+
+# -m option
+emulation_mode: 'both'
+
+# -a option
+wpa_wait: 60
+
+# -d option
+dhcp_wait: 120
+
+# -k option
+kafka_broker: ''
+
+images:
+  bbsim:
+    repository: 'akrainoenea/voltha-bbsim'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+namespace: voltha
+serviceAccountName: default
+
+nameOverride: ""
+fullnameOverride: ""
+
+replicaCount: 1
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/cord-platform/Chart.yaml b/src/seba_charts/cord-platform/Chart.yaml
new file mode 100644 (file)
index 0000000..f08d7b1
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 6.1.0
+description: A Helm chart to install the CORD platform
+icon: https://guide.opencord.org/logos/cord.svg
+name: cord-platform
+version: 6.1.0
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/.helmignore b/src/seba_charts/cord-platform/charts/etcd-operator/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/Chart.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/Chart.yaml
new file mode 100644 (file)
index 0000000..36f8924
--- /dev/null
@@ -0,0 +1,16 @@
+apiVersion: v1
+appVersion: 0.9.2
+description: CoreOS etcd-operator Helm chart for Kubernetes
+home: https://github.com/coreos/etcd-operator
+icon: https://raw.githubusercontent.com/coreos/etcd/master/logos/etcd-horizontal-color.png
+maintainers:
+- email: chance.zibolski@coreos.com
+  name: chancez
+- email: lachlan@deis.com
+  name: lachie83
+- email: jaescobar.cell@gmail.com
+  name: alejandroEsc
+name: etcd-operator
+sources:
+- https://github.com/coreos/etcd-operator
+version: 0.8.0
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/OWNERS b/src/seba_charts/cord-platform/charts/etcd-operator/OWNERS
new file mode 100644 (file)
index 0000000..e7cf870
--- /dev/null
@@ -0,0 +1,8 @@
+approvers:
+- lachie83
+- chancez
+- alejandroEsc
+reviewers:
+- lachie83
+- chancez
+- alejandroEsc
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/README.md b/src/seba_charts/cord-platform/charts/etcd-operator/README.md
new file mode 100644 (file)
index 0000000..746d73d
--- /dev/null
@@ -0,0 +1,158 @@
+# CoreOS etcd-operator
+
+[etcd-operator](https://coreos.com/blog/introducing-the-etcd-operator.html) Simplify etcd cluster
+configuration and management.
+
+__DISCLAIMER:__ While this chart has been well-tested, the etcd-operator is still currently in beta.
+Current project status is available [here](https://github.com/coreos/etcd-operator).
+
+## Introduction
+
+This chart bootstraps an etcd-operator and allows the deployment of etcd-cluster(s).
+
+## Official Documentation
+
+Official project documentation found [here](https://github.com/coreos/etcd-operator)
+
+## Prerequisites
+
+- Kubernetes 1.4+ with Beta APIs enabled
+- __Suggested:__ PV provisioner support in the underlying infrastructure to support backups
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```bash
+$ helm install stable/etcd-operator --name my-release
+```
+
+__Note__: If you set `cluster.enabled` on install, it will have no effect.
+Before you create an etcd cluster, the TPR must be installed by the operator, so this option is ignored during helm installs, but can be used in upgrades.
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` deployment:
+
+```bash
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components EXCEPT the persistent volume.
+
+## Updating
+Updating the TPR resource will not result in the cluster being update until `kubectl apply` for
+TPRs is fixed see [kubernetes/issues/29542](https://github.com/kubernetes/kubernetes/issues/29542)
+Work around options are documented [here](https://github.com/coreos/etcd-operator#resize-an-etcd-cluster)
+
+## Configuration
+
+The following table lists the configurable parameters of the etcd-operator chart and their default values.
+
+| Parameter                                         | Description                                                          | Default                                        |
+| ------------------------------------------------- | -------------------------------------------------------------------- | ---------------------------------------------- |
+| `rbac.create`                                     | install required RBAC service account, roles and rolebindings        | `true`                                         |
+| `rbac.apiVersion`                                 | RBAC api version `v1alpha1|v1beta1`                                  | `v1beta1`                                      |
+| `rbac.etcdOperatorServiceAccountName`             | Name of the service account resource when RBAC is enabled            | `etcd-operator-sa`                                      |
+| `rbac.backupOperatorServiceAccountName`           | Name of the service account resource when RBAC is enabled            | `etcd-backup-operator-sa`                                      |
+| `rbac.restoreOperatorServiceAccountName`          | Name of the service account resource when RBAC is enabled            | `etcd-restore-operator-sa`                                      |
+| `deployments.etcdOperator`                        | Deploy the etcd cluster operator                                     | `true`                                         |
+| `deployments.backupOperator`                      | Deploy the etcd backup operator                                      | `true`                                         |
+| `deployments.restoreOperator`                     | Deploy the etcd restore operator                                     | `true`                                         |
+| `customResources.createEtcdClusterCRD`            | Create a custom resource: EtcdCluster                                | `false`                                        |
+| `customResources.createBackupCRD`                 | Create an a custom resource: EtcdBackup                              | `false`                                        |
+| `customResources.createRestoreCRD`                | Create an a custom resource: EtcdRestore                             | `false`                                        |
+| `etcdOperator.name`                               | Etcd Operator name                                                   | `etcd-operator`                                |
+| `etcdOperator.replicaCount`                       | Number of operator replicas to create (only 1 is supported)          | `1`                                            |
+| `etcdOperator.image.repository`                   | etcd-operator container image                                        | `quay.io/coreos/etcd-operator`                 |
+| `etcdOperator.image.tag`                          | etcd-operator container image tag                                    | `v0.7.0`                                       |
+| `etcdOperator.image.pullpolicy`                   | etcd-operator container image pull policy                            | `Always`                                       |
+| `etcdOperator.resources.cpu`                      | CPU limit per etcd-operator pod                                      | `100m`                                         |
+| `etcdOperator.resources.memory`                   | Memory limit per etcd-operator pod                                   | `128Mi`                                        |
+| `etcdOperator.nodeSelector`                       | Node labels for etcd operator pod assignment                         | `{}`                                           |
+| `etcdOperator.commandArgs`                        | Additional command arguments                                         | `{}`                                           |
+| `backupOperator.name`                             | Backup operator name                                                 | `etcd-backup-operator`                         |
+| `backupOperator.replicaCount`                     | Number of operator replicas to create (only 1 is supported)          | `1`                                            |
+| `backupOperator.image.repository`                 | Operator container image                                             | `quay.io/coreos/etcd-operator`                 |
+| `backupOperator.image.tag`                        | Operator container image tag                                         | `v0.7.0`                                       |
+| `backupOperator.image.pullpolicy`                 | Operator container image pull policy                                 | `Always`                                       |
+| `backupOperator.resources.cpu`                    | CPU limit per etcd-operator pod                                      | `100m`                                         |
+| `backupOperator.resources.memory`                 | Memory limit per etcd-operator pod                                   | `128Mi`                                        |
+| `backupOperator.spec.storageType`                 | Storage to use for backup file, currently only S3 supported          | `S3`                                           |
+| `backupOperator.spec.s3.s3Bucket`                 | Bucket in S3 to store backup file                                    |                                                |
+| `backupOperator.spec.s3.awsSecret`                | Name of kubernetes secret containing aws credentials                |                                                |
+| `backupOperator.nodeSelector`                     | Node labels for etcd operator pod assignment                         | `{}`                                           |
+| `backupOperator.commandArgs`                      | Additional command arguments                                         | `{}`                                           |
+| `restoreOperator.name`                            | Restore operator name                                                | `etcd-backup-operator`                         |
+| `restoreOperator.replicaCount`                    | Number of operator replicas to create (only 1 is supported)          | `1`                                            |
+| `restoreOperator.image.repository`                | Operator container image                                             | `quay.io/coreos/etcd-operator`                 |
+| `restoreOperator.image.tag`                       | Operator container image tag                                         | `v0.7.0`                                       |
+| `restoreOperator.image.pullpolicy`                | Operator container image pull policy                                 | `Always`                                       |
+| `restoreOperator.resources.cpu`                   | CPU limit per etcd-operator pod                                      | `100m`                                         |
+| `restoreOperator.resources.memory`                | Memory limit per etcd-operator pod                                   | `128Mi`                                        |
+| `restoreOperator.spec.s3.path`                    | Path in S3 bucket containing the backup file                         |                                                |
+| `restoreOperator.spec.s3.awsSecret`               | Name of kubernetes secret containing aws credentials                |                                                |
+| `restoreOperator.nodeSelector`                    | Node labels for etcd operator pod assignment                         | `{}`                                           |
+| `restoreOperator.commandArgs`                     | Additional command arguments                                         | `{}`                                           |
+| `etcdCluster.name`                                | etcd cluster name                                                    | `etcd-cluster`                                 |
+| `etcdCluster.size`                                | etcd cluster size                                                    | `3`                                            |
+| `etcdCluster.version`                             | etcd cluster version                                                 | `3.2.10`                                       |
+| `etcdCluster.image.repository`                    | etcd container image                                                 | `quay.io/coreos/etcd-operator`                 |
+| `etcdCluster.image.tag`                           | etcd container image tag                                             | `v3.2.10`                                      |
+| `etcdCluster.image.pullPolicy`                    | etcd container image pull policy                                     | `Always`                                       |
+| `etcdCluster.enableTLS`                           | Enable use of TLS                                                    | `false`                                        |
+| `etcdCluster.tls.static.member.peerSecret`        | Kubernetes secret containing TLS peer certs                          | `etcd-peer-tls`                                |
+| `etcdCluster.tls.static.member.serverSecret`      | Kubernetes secret containing TLS server certs                        | `etcd-server-tls`                              |
+| `etcdCluster.tls.static.operatorSecret`           | Kubernetes secret containing TLS client certs                        | `etcd-client-tls`                              |
+| `etcdCluster.pod.antiAffinity`                    | Whether etcd cluster pods should have an antiAffinity                | `false`                                        |
+| `etcdCluster.pod.resources.limits.cpu`            | CPU limit per etcd cluster pod                                       | `100m`                                         |
+| `etcdCluster.pod.resources.limits.memory`         | Memory limit per etcd cluster pod                                    | `128Mi`                                        |
+| `etcdCluster.pod.resources.requests.cpu`          | CPU request per etcd cluster pod                                     | `100m`                                         |
+| `etcdCluster.pod.resources.requests.memory`       | Memory request per etcd cluster pod                                  | `128Mi`                                        |
+| `etcdCluster.pod.nodeSelector`                    | node labels for etcd cluster pod assignment                          | `{}`                                           |
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
+
+```bash
+$ helm install --name my-release --set image.tag=v0.2.1 stable/etcd-operator
+```
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while
+installing the chart. For example:
+
+```bash
+$ helm install --name my-release --values values.yaml stable/etcd-operator
+```
+
+## RBAC
+By default the chart will install the recommended RBAC roles and rolebindings.
+
+To determine if your cluster supports this running the following:
+
+```console
+$ kubectl api-versions | grep rbac
+```
+
+You also need to have the following parameter on the api server. See the following document for how to enable [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/)
+
+```
+--authorization-mode=RBAC
+```
+
+If the output contains "beta" or both "alpha" and "beta" you can may install rbac by default, if not, you may turn RBAC off as described below.
+
+### RBAC role/rolebinding creation
+
+RBAC resources are enabled by default. To disable RBAC do the following:
+
+```console
+$ helm install --name my-release stable/etcd-operator --set rbac.create=false
+```
+
+### Changing RBAC manifest apiVersion
+
+By default the RBAC resources are generated with the "v1beta1" apiVersion. To use "v1alpha1" do the following:
+
+```console
+$ helm install --name my-release stable/etcd-operator --set rbac.install=true,rbac.apiVersion=v1alpha1
+```
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/etcd-operator/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c33ee01
--- /dev/null
@@ -0,0 +1,33 @@
+{{- $clusterEnabled := (and (not .Release.IsInstall) .Values.customResources.createEtcdClusterCRD) -}}
+{{- if and .Release.IsInstall .Values.customResources.createEtcdClusterCRD -}}
+Not enabling cluster, the ThirdPartResource must be installed before you can create a Cluster. Continuing rest of normal deployment.
+
+{{ end -}}
+
+{{- if $clusterEnabled -}}
+1. Watch etcd cluster start
+  kubectl get pods -l etcd_cluster={{ .Values.etcdCluster.name }} --namespace {{ .Release.Namespace }} -w
+
+2. Confirm etcd cluster is healthy
+  $ kubectl run --rm -i --tty --env="ETCDCTL_API=3" --env="ETCDCTL_ENDPOINTS=http://{{ .Values.etcdCluster.name }}-client:2379" --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh -c 'watch -n1 "etcdctl  member list"'
+
+3. Interact with the cluster!
+  $ kubectl run --rm -i --tty --env ETCDCTL_API=3 --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh
+  / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 put foo bar
+  / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 get foo
+  OK
+  (ctrl-D to exit)
+  
+4. Optional
+  Check the etcd-operator logs
+  export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
+  kubectl logs $POD --namespace={{ .Release.Namespace }}
+
+{{- else -}}
+1. etcd-operator deployed.
+  If you would like to deploy an etcd-cluster set cluster.enabled to true in values.yaml
+  Check the etcd-operator logs
+    export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
+    kubectl logs $POD --namespace={{ .Release.Namespace }}
+
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/etcd-operator/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..03f9a26
--- /dev/null
@@ -0,0 +1,75 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "etcd-operator.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "etcd-operator.fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.etcdOperator.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "etcd-backup-operator.name" -}}
+{{- default .Chart.Name .Values.backupOperator.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "etcd-backup-operator.fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.backupOperator.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "etcd-restore-operator.name" -}}
+{{- default .Chart.Name .Values.restoreOperator.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "etcd-restore-operator.fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.restoreOperator.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create the name of the etcd-operator service account to use
+*/}}
+{{- define "etcd-operator.serviceAccountName" -}}
+{{- if .Values.serviceAccount.etcdOperatorServiceAccount.create -}}
+    {{ default (include "etcd-operator.fullname" .) .Values.serviceAccount.etcdOperatorServiceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.etcdOperatorServiceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the backup-operator service account to use 
+*/}}
+{{- define "etcd-backup-operator.serviceAccountName" -}}
+{{- if .Values.serviceAccount.backupOperatorServiceAccount.create -}}
+    {{ default (include "etcd-backup-operator.fullname" .) .Values.serviceAccount.backupOperatorServiceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.backupOperatorServiceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the restore-operator service account to use 
+*/}}
+{{- define "etcd-restore-operator.serviceAccountName" -}}
+{{- if .Values.serviceAccount.restoreOperatorServiceAccount.create -}}
+    {{ default (include "etcd-restore-operator.fullname" .) .Values.serviceAccount.restoreOperatorServiceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.restoreOperatorServiceAccount.name }}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-etcd-crd.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-etcd-crd.yaml
new file mode 100644 (file)
index 0000000..5528f76
--- /dev/null
@@ -0,0 +1,18 @@
+{{- if .Values.customResources.createBackupCRD }}
+---
+apiVersion: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdBackup"
+metadata:
+  name: {{ template "etcd-backup-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-backup-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  annotations:
+    "helm.sh/hook": "post-install"
+    "helm.sh/hook-delete-policy": "before-hook-creation"
+spec:
+  clusterName: {{ .Values.etcdCluster.name }}
+{{ toYaml .Values.backupOperator.spec | indent 2 }}
+{{- end}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-clusterrole-binding.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-clusterrole-binding.yaml
new file mode 100644 (file)
index 0000000..526b245
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if and .Values.rbac.create .Values.deployments.backupOperator }}
+---
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
+metadata:
+  name: {{ template "etcd-backup-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+subjects:
+- kind: ServiceAccount
+  name: {{ template "etcd-backup-operator.serviceAccountName" . }}
+  namespace: {{ .Release.Namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ template "etcd-operator.fullname" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-deployment.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-deployment.yaml
new file mode 100644 (file)
index 0000000..d5c421c
--- /dev/null
@@ -0,0 +1,59 @@
+{{- if .Values.deployments.backupOperator }}
+---
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "etcd-backup-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-backup-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "etcd-backup-operator.fullname" . }}
+      release: {{ .Release.Name }}
+  replicas: {{ .Values.backupOperator.replicaCount }}
+  template:
+    metadata:
+      name: {{ template "etcd-backup-operator.fullname" . }}
+      labels:
+        app: {{ template "etcd-backup-operator.fullname" . }}
+        release: {{ .Release.Name }}
+    spec:
+      serviceAccountName: {{ template "etcd-backup-operator.serviceAccountName" . }}
+      containers:
+      - name: {{ .Values.backupOperator.name }}
+        image: "{{ .Values.backupOperator.image.repository }}:{{ .Values.backupOperator.image.tag }}"
+        imagePullPolicy: {{ .Values.backupOperator.image.pullPolicy }}
+        command:
+        - etcd-backup-operator
+{{- range $key, $value := .Values.backupOperator.commandArgs }}
+        - "--{{ $key }}={{ $value }}"
+{{- end }}
+        env:
+        - name: MY_POD_NAMESPACE
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.namespace
+        - name: MY_POD_NAME
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+        resources:
+          limits:
+            cpu: {{ .Values.backupOperator.resources.cpu }}
+            memory: {{ .Values.backupOperator.resources.memory }}
+          requests:
+            cpu: {{ .Values.backupOperator.resources.cpu }}
+            memory: {{ .Values.backupOperator.resources.memory }}
+    {{- if .Values.backupOperator.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.backupOperator.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.backupOperator.tolerations }}
+      tolerations:
+{{ toYaml .Values.backupOperator.tolerations | indent 8 }}
+    {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-service-account.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/backup-operator-service-account.yaml
new file mode 100644 (file)
index 0000000..06aec3d
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if and .Values.serviceAccount.backupOperatorServiceAccount.create .Values.deployments.backupOperator }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "etcd-backup-operator.serviceAccountName" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-backup-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- end }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/etcd-cluster-crd.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/etcd-cluster-crd.yaml
new file mode 100644 (file)
index 0000000..0d385d8
--- /dev/null
@@ -0,0 +1,25 @@
+{{- if .Values.customResources.createEtcdClusterCRD }}
+---
+apiVersion: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdCluster"
+metadata:
+  name: {{ .Values.etcdCluster.name }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  annotations:
+    "helm.sh/hook": "post-install"
+    "helm.sh/hook-delete-policy": "before-hook-creation"
+spec:
+  size: {{ .Values.etcdCluster.size }}
+  version: "{{ .Values.etcdCluster.version }}"
+  pod:
+{{ toYaml .Values.etcdCluster.pod | indent 4 }}
+  {{- if .Values.etcdCluster.enableTLS }}
+  TLS:
+{{ toYaml .Values.etcdCluster.tls | indent 4 }}
+  {{- end }}
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-cluster-role.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-cluster-role.yaml
new file mode 100644 (file)
index 0000000..6208597
--- /dev/null
@@ -0,0 +1,49 @@
+{{- if .Values.rbac.create }}
+---
+apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
+kind: ClusterRole
+metadata:
+  name: {{ template "etcd-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+rules:
+- apiGroups:
+  - etcd.database.coreos.com
+  resources:
+  - etcdclusters
+  - etcdbackups
+  - etcdrestores
+  verbs:
+  - "*"
+- apiGroups:
+  - apiextensions.k8s.io
+  resources:
+  - customresourcedefinitions
+  verbs:
+  - "*"
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  - services
+  - endpoints
+  - persistentvolumeclaims
+  - events
+  verbs:
+  - "*"
+- apiGroups:
+  - apps
+  resources:
+  - deployments
+  verbs:
+  - "*"
+- apiGroups:
+  - ""
+  resources:
+  - secrets
+  verbs:
+  - get
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-clusterrole-binding.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-clusterrole-binding.yaml
new file mode 100644 (file)
index 0000000..09594cc
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if and .Values.rbac.create .Values.deployments.etcdOperator }}
+---
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
+metadata:
+  name: {{ template "etcd-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+subjects:
+- kind: ServiceAccount
+  name: {{ template "etcd-operator.serviceAccountName" . }}
+  namespace: {{ .Release.Namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ template "etcd-operator.fullname" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-deployment.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-deployment.yaml
new file mode 100644 (file)
index 0000000..bb6b1a7
--- /dev/null
@@ -0,0 +1,81 @@
+{{- if .Values.deployments.etcdOperator }}
+---
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "etcd-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "etcd-operator.fullname" . }}
+      release: {{ .Release.Name }}
+  replicas: {{ .Values.etcdOperator.replicaCount }}
+  template:
+    metadata:
+      name: {{ template "etcd-operator.fullname" . }}
+      labels:
+        app: {{ template "etcd-operator.fullname" . }}
+        release: {{ .Release.Name }}
+    spec:
+      serviceAccountName: {{ template "etcd-operator.serviceAccountName" . }}
+      containers:
+      - name: {{ template "etcd-operator.fullname" . }}
+        image: "{{ .Values.etcdOperator.image.repository }}:{{ .Values.etcdOperator.image.tag }}"
+        imagePullPolicy: {{ .Values.etcdOperator.image.pullPolicy }}
+        command:
+        - etcd-operator
+{{- range $key, $value := .Values.etcdOperator.commandArgs }}
+        - "--{{ $key }}={{ $value }}"
+{{- end }}
+        env:
+        - name: MY_POD_NAMESPACE
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.namespace
+        - name: MY_POD_NAME
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+        resources:
+          limits:
+            cpu: {{ .Values.etcdOperator.resources.cpu }}
+            memory: {{ .Values.etcdOperator.resources.memory }}
+          requests:
+            cpu: {{ .Values.etcdOperator.resources.cpu }}
+            memory: {{ .Values.etcdOperator.resources.memory }}
+        {{- if .Values.etcdOperator.livenessProbe.enabled }}
+        livenessProbe:
+          httpGet:
+            path: /readyz
+            port: 8080
+          initialDelaySeconds: {{ .Values.etcdOperator.livenessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.etcdOperator.livenessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.etcdOperator.livenessProbe.timeoutSeconds }}
+          successThreshold: {{ .Values.etcdOperator.livenessProbe.successThreshold }}
+          failureThreshold: {{ .Values.etcdOperator.livenessProbe.failureThreshold }}
+        {{- end}}
+        {{- if .Values.etcdOperator.readinessProbe.enabled }}
+        readinessProbe:
+          httpGet:
+            path: /readyz
+            port: 8080
+          initialDelaySeconds: {{ .Values.etcdOperator.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.etcdOperator.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.etcdOperator.readinessProbe.timeoutSeconds }}
+          successThreshold: {{ .Values.etcdOperator.readinessProbe.successThreshold }}
+          failureThreshold: {{ .Values.etcdOperator.readinessProbe.failureThreshold }}
+        {{- end }}
+    {{- if .Values.etcdOperator.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.etcdOperator.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.etcdOperator.tolerations }}
+      tolerations:
+{{ toYaml .Values.etcdOperator.tolerations | indent 8 }}
+    {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-service-account.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/operator-service-account.yaml
new file mode 100644 (file)
index 0000000..2faba8a
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if and .Values.serviceAccount.etcdOperatorServiceAccount.create .Values.deployments.etcdOperator }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "etcd-operator.serviceAccountName" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- end }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-etcd-crd.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-etcd-crd.yaml
new file mode 100644 (file)
index 0000000..73faaab
--- /dev/null
@@ -0,0 +1,28 @@
+{{- if .Values.customResources.createRestoreCRD }}
+---
+apiVersion: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdRestore"
+metadata:
+  # An EtcdCluster with the same name will be created
+  name: {{ .Values.etcdCluster.name }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-restore-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  annotations:
+    "helm.sh/hook": "post-install"
+    "helm.sh/hook-delete-policy": "before-hook-creation"
+spec:
+  clusterSpec:
+    size: {{ .Values.etcdCluster.size }}
+    baseImage: "{{ .Values.etcdCluster.image.repository }}"
+    version: {{ .Values.etcdCluster.image.tag }}
+    pod:
+{{ toYaml .Values.etcdCluster.pod | indent 6 }}
+    {{- if .Values.etcdCluster.enableTLS }}
+    TLS:
+{{ toYaml .Values.etcdCluster.tls | indent 6 }}
+    {{- end }}
+{{ toYaml .Values.restoreOperator.spec | indent 2 }}
+{{- end}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-clusterrole-binding.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-clusterrole-binding.yaml
new file mode 100644 (file)
index 0000000..9a6696e
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if and .Values.rbac.create .Values.deployments.restoreOperator }}
+---
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
+metadata:
+  name: {{ template "etcd-restore-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-restore-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+subjects:
+- kind: ServiceAccount
+  name: {{ template "etcd-restore-operator.serviceAccountName" . }}
+  namespace: {{ .Release.Namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ template "etcd-operator.fullname" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-deployment.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-deployment.yaml
new file mode 100644 (file)
index 0000000..5c4784d
--- /dev/null
@@ -0,0 +1,63 @@
+{{- if .Values.deployments.restoreOperator }}
+---
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "etcd-restore-operator.fullname" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-restore-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "etcd-restore-operator.name" . }}
+      release: {{ .Release.Name }}
+  replicas: {{ .Values.restoreOperator.replicaCount }}
+  template:
+    metadata:
+      name: {{ template "etcd-restore-operator.fullname" . }}
+      labels:
+        app: {{ template "etcd-restore-operator.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      serviceAccountName: {{ template "etcd-restore-operator.serviceAccountName" . }}
+      containers:
+      - name: {{ .Values.restoreOperator.name }}
+        image: "{{ .Values.restoreOperator.image.repository }}:{{ .Values.restoreOperator.image.tag }}"
+        imagePullPolicy: {{ .Values.restoreOperator.image.pullPolicy }}
+        ports:
+        - containerPort: {{ .Values.restoreOperator.port }}
+        command:
+        - etcd-restore-operator
+{{- range $key, $value := .Values.restoreOperator.commandArgs }}
+        - "--{{ $key }}={{ $value }}"
+{{- end }}
+        env:
+        - name: MY_POD_NAMESPACE
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.namespace
+        - name: MY_POD_NAME
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+        - name: SERVICE_ADDR
+          value: "{{ .Values.restoreOperator.name }}:{{ .Values.restoreOperator.port }}"
+        resources:
+          limits:
+            cpu: {{ .Values.restoreOperator.resources.cpu }}
+            memory: {{ .Values.restoreOperator.resources.memory }}
+          requests:
+            cpu: {{ .Values.restoreOperator.resources.cpu }}
+            memory: {{ .Values.restoreOperator.resources.memory }}
+    {{- if .Values.restoreOperator.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.restoreOperator.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.restoreOperator.tolerations }}
+      tolerations:
+{{ toYaml .Values.restoreOperator.tolerations | indent 8 }}
+    {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service-account.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service-account.yaml
new file mode 100644 (file)
index 0000000..595cee9
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if and .Values.serviceAccount.restoreOperatorServiceAccount.create .Values.deployments.restoreOperator }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "etcd-restore-operator.serviceAccountName" . }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-restore-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- end }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/templates/restore-operator-service.yaml
new file mode 100644 (file)
index 0000000..052be36
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if .Values.deployments.restoreOperator }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Values.restoreOperator.name }}
+  labels:
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    app: {{ template "etcd-restore-operator.name" . }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  ports:
+  - protocol: TCP
+    name: http-etcd-restore-port
+    port: {{ .Values.restoreOperator.port }}
+  selector:
+    app: {{ template "etcd-restore-operator.name" . }}
+    release: {{ .Release.Name }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/etcd-operator/values.yaml b/src/seba_charts/cord-platform/charts/etcd-operator/values.yaml
new file mode 100644 (file)
index 0000000..2eaac85
--- /dev/null
@@ -0,0 +1,152 @@
+# Default values for etcd-operator.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+## Install Default RBAC roles and bindings
+rbac:
+  create: true
+  apiVersion: v1beta1
+
+## Service account names and whether to create them
+serviceAccount:
+  etcdOperatorServiceAccount:
+    create: true
+    name:
+  backupOperatorServiceAccount:
+    create: true
+    name:
+  restoreOperatorServiceAccount:
+    create: true
+    name:
+
+# Select what to deploy
+deployments:
+  etcdOperator: true
+  # one time deployment, delete once completed,
+  # Ref: https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/backup-operator.md
+  backupOperator: true
+  # one time deployment, delete once completed
+  # Ref: https://github.com/coreos/etcd-operator/blob/master/doc/user/walkthrough/restore-operator.md
+  restoreOperator: true
+
+# creates custom resources, not all required,
+# you could use `helm template --values <values.yaml> --name release_name ... `
+# and create the resources yourself to deploy on your cluster later
+customResources:
+  createEtcdClusterCRD: false
+  createBackupCRD: false
+  createRestoreCRD: false
+
+# etcdOperator
+etcdOperator:
+  name: etcd-operator
+  replicaCount: 1
+  image:
+    repository: cachengo/etcd-operator
+    tag: v0.9.2
+    pullPolicy: Always
+  resources:
+    cpu: 100m
+    memory: 128Mi
+  ## Node labels for etcd-operator pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  nodeSelector: {}
+  ## additional command arguments go here; will be translated to `--key=value` form
+  ## e.g., analytics: true
+  commandArgs: {}
+  ## Configurable health checks against the /readyz endpoint that etcd-operator exposes
+  readinessProbe:
+    enabled: false
+    initialDelaySeconds: 0
+    periodSeconds: 10
+    timeoutSeconds: 1
+    successThreshold: 1
+    failureThreshold: 3
+  livenessProbe:
+    enabled: false
+    initialDelaySeconds: 0
+    periodSeconds: 10
+    timeoutSeconds: 1
+    successThreshold: 1
+    failureThreshold: 3
+# backup spec
+backupOperator:
+  name: etcd-backup-operator
+  replicaCount: 1
+  image:
+    repository: cachengo/etcd-operator
+    tag: v0.9.2
+    pullPolicy: Always
+  resources:
+    cpu: 100m
+    memory: 128Mi
+  spec:
+    storageType: S3
+    s3:
+      s3Bucket:
+      awsSecret:
+  ## Node labels for etcd pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  nodeSelector: {}
+  ## additional command arguments go here; will be translated to `--key=value` form
+  ## e.g., analytics: true
+  commandArgs: {}
+
+# restore spec
+restoreOperator:
+  name: etcd-restore-operator
+  replicaCount: 1
+  image:
+    repository: cachengo/etcd-operator
+    tag: v0.9.2
+    pullPolicy: Always
+  port: 19999
+  resources:
+    cpu: 100m
+    memory: 128Mi
+  spec:
+    s3:
+      # The format of "path" must be: "<s3-bucket-name>/<path-to-backup-file>"
+      # e.g: "etcd-snapshot-bucket/v1/default/example-etcd-cluster/3.2.10_0000000000000001_etcd.backup"
+      path:
+      awsSecret:
+  ## Node labels for etcd pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  nodeSelector: {}
+  ## additional command arguments go here; will be translated to `--key=value` form
+  ## e.g., analytics: true
+  commandArgs: {}
+
+## etcd-cluster specific values
+etcdCluster:
+  name: etcd-cluster
+  size: 3
+  version: 3.2.13
+  image:
+    repository: cachengo/etcd
+    tag: v3.2.13
+    pullPolicy: Always
+  enableTLS: false
+  # TLS configs
+  tls:
+    static:
+      member:
+        peerSecret: etcd-peer-tls
+        serverSecret: etcd-server-tls
+      operatorSecret: etcd-client-tls
+  ## etcd cluster pod specific values
+  ## Ref: https://github.com/coreos/etcd-operator/blob/master/doc/user/spec_examples.md#three-members-cluster-with-resource-requirement
+  pod:
+    ## Antiaffinity for etcd pod assignment
+    ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+    antiAffinity: false
+    resources:
+      limits:
+        cpu: 100m
+        memory: 128Mi
+      requests:
+        cpu: 100m
+        memory: 128Mi
+    ## Node labels for etcd pod assignment
+    ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+    nodeSelector: {}
diff --git a/src/seba_charts/cord-platform/charts/kafka/.helmignore b/src/seba_charts/cord-platform/charts/kafka/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/kafka/Chart.yaml b/src/seba_charts/cord-platform/charts/kafka/Chart.yaml
new file mode 100644 (file)
index 0000000..a34098b
--- /dev/null
@@ -0,0 +1,24 @@
+apiVersion: v1
+appVersion: 4.1.2
+description: Apache Kafka is publish-subscribe messaging rethought as a distributed
+  commit log.
+home: https://kafka.apache.org/
+icon: https://kafka.apache.org/images/logo.png
+keywords:
+- kafka
+- zookeeper
+- kafka statefulset
+maintainers:
+- email: faraaz@rationalizeit.us
+  name: faraazkhan
+- email: marc.villacorta@gmail.com
+  name: h0tbird
+- email: ben@spothero.com
+  name: benjigoldberg
+name: kafka
+sources:
+- https://github.com/kubernetes/charts/tree/master/incubator/zookeeper
+- https://github.com/Yolean/kubernetes-kafka
+- https://github.com/confluentinc/cp-docker-images
+- https://github.com/apache/kafka
+version: 0.8.8
diff --git a/src/seba_charts/cord-platform/charts/kafka/OWNERS b/src/seba_charts/cord-platform/charts/kafka/OWNERS
new file mode 100644 (file)
index 0000000..0ed92ba
--- /dev/null
@@ -0,0 +1,4 @@
+approvers:
+- benjigoldberg
+reviewers:
+- benjigoldberg
diff --git a/src/seba_charts/cord-platform/charts/kafka/README.md b/src/seba_charts/cord-platform/charts/kafka/README.md
new file mode 100644 (file)
index 0000000..0c31807
--- /dev/null
@@ -0,0 +1,235 @@
+# Apache Kafka Helm Chart
+
+This is an implementation of Kafka StatefulSet found here:
+
+ * https://github.com/Yolean/kubernetes-kafka
+
+## Pre Requisites:
+
+* Kubernetes 1.3 with alpha APIs enabled and support for storage classes
+
+* PV support on underlying infrastructure
+
+* Requires at least `v2.0.0-beta.1` version of helm to support
+  dependency management with requirements.yaml
+
+## StatefulSet Details
+
+* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
+
+## StatefulSet Caveats
+
+* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#limitations
+
+## Chart Details
+
+This chart will do the following:
+
+* Implement a dynamically scalable kafka cluster using Kubernetes StatefulSets
+
+* Implement a dynamically scalable zookeeper cluster as another Kubernetes StatefulSet required for the Kafka cluster above
+
+* Expose Kafka protocol endpoints via NodePort services (optional)
+
+### Installing the Chart
+
+To install the chart with the release name `my-kafka` in the default
+namespace:
+
+```
+$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
+$ helm install --name my-kafka incubator/kafka
+```
+
+If using a dedicated namespace(recommended) then make sure the namespace
+exists with:
+
+```
+$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
+$ kubectl create ns kafka
+$ helm install --name my-kafka --namespace kafka incubator/kafka
+```
+
+This chart includes a ZooKeeper chart as a dependency to the Kafka
+cluster in its `requirement.yaml` by default. The chart can be customized using the
+following configurable parameters:
+
+| Parameter                                      | Description                                                                                                                                                              | Default                                                            |
+|------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
+| `image`                                        | Kafka Container image name                                                                                                                                               | `confluentinc/cp-kafka`                                            |
+| `imageTag`                                     | Kafka Container image tag                                                                                                                                                | `4.1.2-2`                                                            |
+| `imagePullPolicy`                              | Kafka Container pull policy                                                                                                                                              | `IfNotPresent`                                                     |
+| `replicas`                                     | Kafka Brokers                                                                                                                                                            | `3`                                                                |
+| `component`                                    | Kafka k8s selector key                                                                                                                                                   | `kafka`                                                            |
+| `resources`                                    | Kafka resource requests and limits                                                                                                                                       | `{}`                                                               |
+| `kafkaHeapOptions`                             | Kafka broker JVM heap options                                                                                                                                            | `-Xmx1G-Xms1G`                                                     |
+| `logSubPath`                                   | Subpath under `persistence.mountPath` where kafka logs will be placed.                                                                                                   | `logs`                                                             |
+| `schedulerName`                                | Name of Kubernetes scheduler (other than the default)                                                                                                                    | `nil`                                                              |
+| `affinity`                                     | Defines affinities and anti-affinities for pods as defined in: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity preferences | `{}`                                                               |
+| `tolerations`                                  | List of node tolerations for the pods. https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/                                                           | `[]`                                                               |
+| `headless.annotations`                                  | List of annotations for the headless service. https://kubernetes.io/docs/concepts/services-networking/service/#headless-services                                                            | `[]`                                                               |
+| `headless.targetPort`                                  | Target port to be used for the headless service. This is not a required value.                                                            | `nil`                                                               |
+| `headless.port`                                  | Port to be used for the headless service. https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/                                                           | `9092`                                                               |
+| `external.enabled`                             | If True, exposes Kafka brokers via NodePort (PLAINTEXT by default)                                                                                                       | `false`                                                            |
+| `external.servicePort`                         | TCP port configured at external services (one per pod) to relay from NodePort to the external listener port.                                                             | '19092'                                                            |
+| `external.firstListenerPort`                   | TCP port which is added pod index number to arrive at the port used for NodePort and external listener port.                                                             | '31090'                                                            |
+| `external.domain`                              | Domain in which to advertise Kafka external listeners.                                                                                                                   | `cluster.local`                                                    |
+| `external.init`                                | External init container settings.                                                                                                                                        | (see `values.yaml`)                                                |
+| `external.type`                                | Service Type.                                                                                                                                                            | `NodePort`                                                         |
+| `external.distinct`                            | Distinct DNS entries for each created A record.                                                                                                                          | `false`                                                            |
+| `external.annotations`                         | Additional annotations for the external service.                                                                                                                         | `{}`                                                               |
+| `rbac.enabled`                                 | Enable a service account and role for the init container to use in an RBAC enabled cluster                                                                               | `false`                                                            |
+| `configurationOverrides`                       | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format                                                                                       | `{ offsets.topic.replication.factor: 3 }`                          |
+| `additionalPorts`                              | Additional ports to expose on brokers.  Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar                           | `{}`                                                               |
+| `readinessProbe.initialDelaySeconds`           | Number of seconds before probe is initiated.                                                                                                                             | `30`                                                               |
+| `readinessProbe.periodSeconds`                 | How often (in seconds) to perform the probe.                                                                                                                             | `10`                                                               |
+| `readinessProbe.timeoutSeconds`                | Number of seconds after which the probe times out.                                                                                                                       | `5`                                                                |
+| `readinessProbe.successThreshold`              | Minimum consecutive successes for the probe to be considered successful after having failed.                                                                             | `1`                                                                |
+| `readinessProbe.failureThreshold`              | After the probe fails this many times, pod will be marked Unready.                                                                                                       | `3`                                                                |
+| `terminationGracePeriodSeconds`                | Wait up to this many seconds for a broker to shut down gracefully, after which it is killed                                                                              | `60`                                                               |
+| `updateStrategy`                               | StatefulSet update strategy to use.                                                                                                                                      | `{ type: "OnDelete" }`                                             |
+| `podManagementPolicy`                          | Start and stop pods in Parallel or OrderedReady (one-by-one.)  Can not change after first release.                                                                       | `OrderedReady`                                                     |
+| `persistence.enabled`                          | Use a PVC to persist data                                                                                                                                                | `true`                                                             |
+| `persistence.size`                             | Size of data volume                                                                                                                                                      | `1Gi`                                                              |
+| `persistence.mountPath`                        | Mount path of data volume                                                                                                                                                | `/opt/kafka/data`                                                  |
+| `persistence.storageClass`                     | Storage class of backing PVC                                                                                                                                             | `nil`                                                              |
+| `jmx.configMap.enabled`                        | Enable the default ConfigMap for JMX                                                                                                                                     | `true`                                                             |
+| `jmx.configMap.overrideConfig`                 | Allows config file to be generated by passing values to ConfigMap                                                                                                        | `{}`                                                               |
+| `jmx.configMap.overrideName`                   | Allows setting the name of the ConfigMap to be used                                                                                                                      | `""`                                                               |
+| `jmx.port`                                     | The jmx port which JMX style metrics are exposed (note: these are not scrapeable by Prometheus)                                                                          | `5555`                                                             |
+| `jmx.whitelistObjectNames`                     | Allows setting which JMX objects you want to expose to via JMX stats to JMX Exporter                                                                                     | (see `values.yaml`)                                                |
+| `prometheus.jmx.resources`                     | Allows setting resource limits for jmx sidecar container                                                                                                                 | `{}`                                                               |
+| `prometheus.jmx.enabled`                       | Whether or not to expose JMX metrics to Prometheus                                                                                                                       | `false`                                                            |
+| `prometheus.jmx.image`                         | JMX Exporter container image                                                                                                                                             | `solsson/kafka-prometheus-jmx-exporter@sha256`                     |
+| `prometheus.jmx.imageTag`                      | JMX Exporter container image tag                                                                                                                                         | `a23062396cd5af1acdf76512632c20ea6be76885dfc20cd9ff40fb23846557e8` |
+| `prometheus.jmx.interval`                      | Interval that Prometheus scrapes JMX metrics when using Prometheus Operator                                                                                              | `10s`                                                              |
+| `prometheus.jmx.port`                          | JMX Exporter Port which exposes metrics in Prometheus format for scraping                                                                                                | `5556`                                                             |
+| `prometheus.kafka.enabled`                     | Whether or not to create a separate Kafka exporter                                                                                                                       | `false`                                                            |
+| `prometheus.kafka.image`                       | Kafka Exporter container image                                                                                                                                           | `danielqsj/kafka-exporter`                                         |
+| `prometheus.kafka.imageTag`                    | Kafka Exporter container image tag                                                                                                                                       | `v1.2.0`                                                           |
+| `prometheus.kafka.interval`                    | Interval that Prometheus scrapes Kafka metrics when using Prometheus Operator                                                                                            | `10s`                                                              |
+| `prometheus.kafka.port`                        | Kafka Exporter Port which exposes metrics in Prometheus format for scraping                                                                                              | `9308`                                                             |
+| `prometheus.kafka.resources`                   | Allows setting resource limits for kafka-exporter pod                                                                                                                    | `{}`                                                               |
+| `prometheus.operator.enabled`                  | True if using the Prometheus Operator, False if not                                                                                                                      | `false`                                                            |
+| `prometheus.operator.serviceMonitor.namespace` | Namespace which Prometheus is running in.  Default to kube-prometheus install.                                                                                           | `monitoring`                                                       |
+| `prometheus.operator.serviceMonitor.selector`  | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install                                                               | `{ prometheus: kube-prometheus }`                                  |
+| `topics`                                       | List of topics to create & configure. Can specify name, partitions, replicationFactor, config. See values.yaml                                                           | `[]` (Empty list)                                                  |
+| `zookeeper.enabled`                            | If True, installs Zookeeper Chart                                                                                                                                        | `true`                                                             |
+| `zookeeper.resources`                          | Zookeeper resource requests and limits                                                                                                                                   | `{}`                                                               |
+| `zookeeper.env`                                | Environmental variables provided to Zookeeper Zookeeper                                                                                                                  | `{ZK_HEAP_SIZE: "1G"}`                                             |
+| `zookeeper.storage`                            | Zookeeper Persistent volume size                                                                                                                                         | `2Gi`                                                              |
+| `zookeeper.image.PullPolicy`                   | Zookeeper Container pull policy                                                                                                                                          | `IfNotPresent`                                                     |
+| `zookeeper.url`                                | URL of Zookeeper Cluster (unneeded if installing Zookeeper Chart)                                                                                                        | `""`                                                               |
+| `zookeeper.port`                               | Port of Zookeeper Cluster                                                                                                                                                | `2181`                                                             |
+| `zookeeper.affinity`                           | Defines affinities and anti-affinities for pods as defined in: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity preferences | `{}`                                                               |
+
+
+Specify parameters using `--set key=value[,key=value]` argument to `helm install`
+
+Alternatively a YAML file that specifies the values for the parameters can be provided like this:
+
+```bash
+$ helm install --name my-kafka -f values.yaml incubator/kafka
+```
+
+### Connecting to Kafka from inside Kubernetes
+
+You can connect to Kafka by running a simple pod in the K8s cluster like this with a configuration like this:
+
+```yaml
+apiVersion: v1
+kind: Pod
+metadata:
+  name: testclient
+  namespace: kafka
+spec:
+  containers:
+  - name: kafka
+    image: solsson/kafka:0.11.0.0
+    command:
+      - sh
+      - -c
+      - "exec tail -f /dev/null"
+```
+
+Once you have the testclient pod above running, you can list all kafka
+topics with:
+
+` kubectl -n kafka exec -ti testclient -- ./bin/kafka-topics.sh --zookeeper
+my-release-zookeeper:2181 --list`
+
+Where `my-release` is the name of your helm release.
+
+## Extensions
+
+Kafka has a rich ecosystem, with lots of tools. This sections is intended to compile all of those tools for which a corresponding Helm chart has already been created.
+
+- [Schema-registry](https://github.com/kubernetes/charts/tree/master/incubator/schema-registry) -  A confluent project that provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving Avro schemas.
+
+### Connecting to Kafka from outside Kubernetes
+
+#### Node Port External Service Type
+
+Review and optionally override to enable the example text concerned with external access in `values.yaml`.
+
+Once configured, you should be able to reach Kafka via NodePorts, one per replica. In kops where private,
+topology is enabled, this feature publishes an internal round-robin DNS record using the following naming
+scheme. The external access feature of this chart was tested with kops on AWS using flannel networking.
+If you wish to enable external access to Kafka running in kops, your security groups will likely need to
+be adjusted to allow non-Kubernetes nodes (e.g. bastion) to access the Kafka external listener port range.
+
+```
+{{ .Release.Name }}.{{ .Values.external.domain }}
+```
+
+If `external.distinct` is set theses entries will be prefixed with the replica number or broker id.
+
+```
+{{ .Release.Name }}-<BROKER_ID>.{{ .Values.external.domain }}
+```
+
+Port numbers for external access used at container and NodePort are unique to each container in the StatefulSet.
+Using the default `external.firstListenerPort` number with a `replicas` value of `3`, the following
+container and NodePorts will be opened for external access: `31090`, `31091`, `31092`. All of these ports should
+be reachable from any host to NodePorts are exposed because Kubernetes routes each NodePort from entry node
+to pod/container listening on the same port (e.g. `31091`).
+
+The `external.servicePort` at each external access service (one such service per pod) is a relay toward
+the a `containerPort` with a number matching its respective `NodePort`. The range of NodePorts is set, but
+should not actually listen, on all Kafka pods in the StatefulSet. As any given pod will listen only one
+such port at a time, setting the range at every Kafka pod is a reasonably safe configuration.
+
+#### Load Balancer External Service Type
+
+The load balancer external service type differs from the node port type by routing to the `port` specified in the service for each statefulset container.  Because of this `external.servicePort` is unused and will be set to the sum of `external.firstListenerPort` and the replica number.  It is important to note that `external.firstListenerPort` does not have to be within the configured node port range for the cluster, however a node port will be allocated.
+
+## Known Limitations
+
+* Only supports storage options that have backends for persistent volume claims (tested mostly on AWS)
+* KAFKA_PORT will be created as an envvar and brokers will fail to start when there is a service named `kafka` in the same namespace. We work around this be unsetting that envvar `unset KAFKA_PORT`.
+
+[brokerconfigs]: https://kafka.apache.org/documentation/#brokerconfigs
+
+## Prometheus Stats
+
+### Prometheus vs Prometheus Operator
+
+Standard Prometheus is the default monitoring option for this chart. This chart also supports the CoreOS Prometheus Operator,
+which can provide additional functionality like automatically updating Prometheus and Alert Manager configuration. If you are
+interested in installing the Prometheus Operator please see the [CoreOS repository](https://github.com/coreos/prometheus-operator/tree/master/helm) for more information or
+read through the [CoreOS blog post introducing the Prometheus Operator](https://coreos.com/blog/the-prometheus-operator.html)
+
+### JMX Exporter
+
+The majority of Kafka statistics are provided via JMX and are exposed via the [Prometheus JMX Exporter](https://github.com/prometheus/jmx_exporter).
+
+The JMX Exporter is a general purpose prometheus provider which is intended for use with any Java application. Because of this, it produces a number of statistics which
+may not be of interest. To help in reducing these statistics to their relevant components we have created a curated whitelist `whitelistObjectNames` for the JMX exporter.
+This whitelist may be modified or removed via the values configuration.
+
+To accommodate compatibility with the Prometheus metrics, this chart performs transformations of raw JMX metrics. For example, broker names and topics names are incorporated
+into the metric name instead of becoming a label. If you are curious to learn more about any default transformations to the chart metrics, please have reference the [configmap template](https://github.com/kubernetes/charts/blob/master/incubator/kafka/templates/jmx-configmap.yaml).
+
+### Kafka Exporter
+
+The [Kafka Exporter](https://github.com/danielqsj/kafka_exporter) is a complimentary metrics exporter to the JMX Exporter. The Kafka Exporter provides additional statistics on Kafka Consumer Groups.
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/.helmignore b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/Chart.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/Chart.yaml
new file mode 100644 (file)
index 0000000..b7a0222
--- /dev/null
@@ -0,0 +1,15 @@
+appVersion: 3.4.10
+description: Centralized service for maintaining configuration information, naming,
+  providing distributed synchronization, and providing group services.
+home: https://zookeeper.apache.org/
+icon: https://zookeeper.apache.org/images/zookeeper_small.gif
+maintainers:
+- email: lachlan.evenson@microsoft.com
+  name: lachie83
+- email: owensk@google.com
+  name: kow3ns
+name: zookeeper
+sources:
+- https://github.com/apache/zookeeper
+- https://github.com/kubernetes/contrib/tree/master/statefulsets/zookeeper
+version: 1.0.2
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/OWNERS b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/OWNERS
new file mode 100644 (file)
index 0000000..dd9facd
--- /dev/null
@@ -0,0 +1,6 @@
+approvers:
+- lachie83
+- kow3ns
+reviewers:
+- lachie83
+- kow3ns
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/README.md b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/README.md
new file mode 100644 (file)
index 0000000..22bbac4
--- /dev/null
@@ -0,0 +1,140 @@
+# incubator/zookeeper
+
+This helm chart provides an implementation of the ZooKeeper [StatefulSet](http://kubernetes.io/docs/concepts/abstractions/controllers/statefulsets/) found in Kubernetes Contrib [Zookeeper StatefulSet](https://github.com/kubernetes/contrib/tree/master/statefulsets/zookeeper).
+
+## Prerequisites
+* Kubernetes 1.6+
+* PersistentVolume support on the underlying infrastructure
+* A dynamic provisioner for the PersistentVolumes
+* A familiarity with [Apache ZooKeeper 3.4.x](https://zookeeper.apache.org/doc/current/)
+
+## Chart Components
+This chart will do the following:
+
+* Create a fixed size ZooKeeper ensemble using a [StatefulSet](http://kubernetes.io/docs/concepts/abstractions/controllers/statefulsets/).
+* Create a [PodDisruptionBudget](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-disruption-budget/) so kubectl drain will respect the Quorum size of the ensemble.
+* Create a [Headless Service](https://kubernetes.io/docs/concepts/services-networking/service/) to control the domain of the ZooKeeper ensemble.
+* Create a Service configured to connect to the available ZooKeeper instance on the configured client port.
+* Optionally apply a [Pod Anti-Affinity](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#inter-pod-affinity-and-anti-affinity-beta-feature) to spread the ZooKeeper ensemble across nodes.
+* Optionally start JMX Exporter and Zookeeper Exporter containers inside Zookeeper pods.
+* Optionally create a job which creates Zookeeper chroots (e.g. `/kafka1`).
+
+## Installing the Chart
+You can install the chart with the release name `zookeeper` as below.
+
+```console
+$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
+$ helm install --name zookeeper incubator/zookeeper
+```
+
+If you do not specify a name, helm will select a name for you.
+
+### Installed Components
+You can use `kubectl get` to view all of the installed components.
+
+```console{%raw}
+$ kubectl get all -l app=zookeeper
+NAME:   zookeeper
+LAST DEPLOYED: Wed Apr 11 17:09:48 2018
+NAMESPACE: default
+STATUS: DEPLOYED
+
+RESOURCES:
+==> v1beta1/PodDisruptionBudget
+NAME       MIN AVAILABLE  MAX UNAVAILABLE  ALLOWED DISRUPTIONS  AGE
+zookeeper  N/A            1                1                    2m
+
+==> v1/Service
+NAME                TYPE       CLUSTER-IP     EXTERNAL-IP  PORT(S)                     AGE
+zookeeper-headless  ClusterIP  None           <none>       2181/TCP,3888/TCP,2888/TCP  2m
+zookeeper           ClusterIP  10.98.179.165  <none>       2181/TCP                    2m
+
+==> v1beta1/StatefulSet
+NAME       DESIRED  CURRENT  AGE
+zookeeper  3        3        2m
+```
+
+1. `statefulsets/zookeeper` is the StatefulSet created by the chart.
+1. `po/zookeeper-<0|1|2>` are the Pods created by the StatefulSet. Each Pod has a single container running a ZooKeeper server.
+1. `svc/zookeeper-headless` is the Headless Service used to control the network domain of the ZooKeeper ensemble.
+1. `svc/zookeeper` is a Service that can be used by clients to connect to an available ZooKeeper server.
+
+## Configuration
+You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install --name my-release -f values.yaml incubator/zookeeper
+```
+
+## Default Values
+
+- You can find all user-configurable settings, their defaults and commentary about them in [values.yaml](values.yaml).
+
+## Deep Dive
+
+## Image Details
+The image used for this chart is based on Ubuntu 16.04 LTS. This image is larger than Alpine or BusyBox, but it provides glibc, rather than ulibc or mucl, and a JVM release that is built against it. You can easily convert this chart to run against a smaller image with a JVM that is built against that image's libc. However, as far as we know, no Hadoop vendor supports, or has verified, ZooKeeper running on such a JVM.
+
+## JVM Details
+The Java Virtual Machine used for this chart is the OpenJDK JVM 8u111 JRE (headless).
+
+## ZooKeeper Details
+The ZooKeeper version is the latest stable version (3.4.10). The distribution is installed into /opt/zookeeper-3.4.10. This directory is symbolically linked to /opt/zookeeper. Symlinks are created to simulate a rpm installation into /usr.
+
+## Failover
+You can test failover by killing the leader. Insert a key:
+```console
+$ kubectl exec zookeeper-0 -- /opt/zookeeper/bin/zkCli.sh create /foo bar;
+$ kubectl exec zookeeper-2 -- /opt/zookeeper/bin/zkCli.sh get /foo;
+```
+
+Watch existing members:
+```console
+$ kubectl run --attach bbox --image=busybox --restart=Never -- sh -c 'while true; do for i in 0 1 2; do echo zk-${i} $(echo stats | nc <pod-name>-${i}.<headless-service-name>:2181 | grep Mode); sleep 1; done; done';
+
+zk-2 Mode: follower
+zk-0 Mode: follower
+zk-1 Mode: leader
+zk-2 Mode: follower
+```
+
+Delete Pods and wait for the StatefulSet controller to bring them back up:
+```console
+$ kubectl delete po -l app=zookeeper
+$ kubectl get po --watch-only
+NAME          READY     STATUS    RESTARTS   AGE
+zookeeper-0   0/1       Running   0          35s
+zookeeper-0   1/1       Running   0         50s
+zookeeper-1   0/1       Pending   0         0s
+zookeeper-1   0/1       Pending   0         0s
+zookeeper-1   0/1       ContainerCreating   0         0s
+zookeeper-1   0/1       Running   0         19s
+zookeeper-1   1/1       Running   0         40s
+zookeeper-2   0/1       Pending   0         0s
+zookeeper-2   0/1       Pending   0         0s
+zookeeper-2   0/1       ContainerCreating   0         0s
+zookeeper-2   0/1       Running   0         19s
+zookeeper-2   1/1       Running   0         41s
+```
+
+Check the previously inserted key:
+```console
+$ kubectl exec zookeeper-1 -- /opt/zookeeper/bin/zkCli.sh get /foo
+ionid = 0x354887858e80035, negotiated timeout = 30000
+
+WATCHER::
+
+WatchedEvent state:SyncConnected type:None path:null
+bar
+```
+
+## Scaling
+ZooKeeper can not be safely scaled in versions prior to 3.5.x. This chart currently uses 3.4.x. There are manual procedures for scaling a 3.4.x ensemble, but as noted in the [ZooKeeper 3.5.2 documentation](https://zookeeper.apache.org/doc/r3.5.2-alpha/zookeeperReconfig.html) these procedures require a rolling restart, are known to be error prone, and often result in a data loss.
+
+While ZooKeeper 3.5.x does allow for dynamic ensemble reconfiguration (including scaling membership), the current status of the release is still alpha, and 3.5.x is therefore not recommended for production use.
+
+## Limitations
+* StatefulSet and PodDisruptionBudget are beta resources.
+* Only supports storage options that have backends for persistent volume claims.
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..6c5da85
--- /dev/null
@@ -0,0 +1,7 @@
+Thank you for installing ZooKeeper on your Kubernetes cluster. More information
+about ZooKeeper can be found at https://zookeeper.apache.org/doc/current/
+
+Your connection string should look like:
+  {{ template "zookeeper.fullname" . }}-0.{{ template "zookeeper.fullname" . }}-headless:{{ .Values.service.ports.client.port }},{{ template "zookeeper.fullname" . }}-1.{{ template "zookeeper.fullname" . }}-headless:{{ .Values.service.ports.client.port }},...
+
+You can also use the client service {{ template "zookeeper.fullname" . }}:{{ .Values.service.ports.client.port }} to connect to an available ZooKeeper server.
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..ae36115
--- /dev/null
@@ -0,0 +1,32 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "zookeeper.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "zookeeper.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "zookeeper.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/config-jmx-exporter.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/config-jmx-exporter.yaml
new file mode 100644 (file)
index 0000000..79905e5
--- /dev/null
@@ -0,0 +1,19 @@
+{{- if .Values.exporters.jmx.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ .Release.Name }}-jmx-exporter
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  config.yml: |-
+    hostPort: 127.0.0.1:{{ .Values.env.JMXPORT }}
+    lowercaseOutputName: {{ .Values.exporters.jmx.config.lowercaseOutputName }}
+    rules:
+{{ .Values.exporters.jmx.config.rules | toYaml | indent 6 }}
+    ssl: false
+    startDelaySeconds: {{ .Values.exporters.jmx.config.startDelaySeconds }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/job-chroots.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/job-chroots.yaml
new file mode 100644 (file)
index 0000000..6663ddb
--- /dev/null
@@ -0,0 +1,62 @@
+{{- if .Values.jobs.chroots.enabled }}
+{{- $root := . }}
+{{- $job := .Values.jobs.chroots }}
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: {{ template "zookeeper.fullname" . }}-chroots
+  annotations:
+    "helm.sh/hook": post-install,post-upgrade
+    "helm.sh/hook-weight": "-5"
+    "helm.sh/hook-delete-policy": hook-succeeded
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    component: jobs
+    job: chroots
+spec:
+  activeDeadlineSeconds: {{ $job.activeDeadlineSeconds }}
+  backoffLimit: {{ $job.backoffLimit }}
+  completions: {{ $job.completions }}
+  parallelism: {{ $job.parallelism }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "zookeeper.name" . }}
+        release: {{ .Release.Name }}
+        component: jobs
+        job: chroots
+    spec:
+      restartPolicy: {{ $job.restartPolicy }}
+      containers:
+        - name: main
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          command:
+            - /bin/bash
+            - -o
+            - pipefail
+            - -euc
+  {{- $port := .Values.service.ports.client.port }}
+            - >
+              sleep 15;
+              export SERVER={{ template "zookeeper.fullname" $root }}:{{ $port }};
+  {{- range $job.config.create }}
+              echo '==> {{ . }}';
+              echo '====> Create chroot if does not exist.';
+              zkCli.sh -server {{ template "zookeeper.fullname" $root }}:{{ $port }} get {{ . }} 2>&1 >/dev/null | grep 'cZxid'
+              || zkCli.sh -server {{ template "zookeeper.fullname" $root }}:{{ $port }} create {{ . }} "";
+              echo '====> Confirm chroot exists.';
+              zkCli.sh -server {{ template "zookeeper.fullname" $root }}:{{ $port }} get {{ . }} 2>&1 >/dev/null | grep 'cZxid';
+              echo '====> Chroot exists.';
+  {{- end }}
+          env:
+          {{- range $key, $value := $job.env }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+          {{- end }}
+          resources:
+{{ toYaml $job.resources | indent 12 }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/poddisruptionbudget.yaml
new file mode 100644 (file)
index 0000000..15ee008
--- /dev/null
@@ -0,0 +1,17 @@
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ template "zookeeper.fullname" . }}
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    component: server
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "zookeeper.name" . }}
+      release: {{ .Release.Name }}
+      component: server
+{{ toYaml .Values.podDisruptionBudget | indent 2 }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service-headless.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service-headless.yaml
new file mode 100644 (file)
index 0000000..8822867
--- /dev/null
@@ -0,0 +1,21 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "zookeeper.fullname" . }}-headless
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  clusterIP: None
+  ports:
+{{- range $key, $port := .Values.ports }}
+    - name: {{ $key }}
+      port: {{ $port.containerPort }}
+      targetPort: {{ $port.name }}
+      protocol: {{ $port.protocol }}
+{{- end }}
+  selector:
+    app: {{ template "zookeeper.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/service.yaml
new file mode 100644 (file)
index 0000000..5f10861
--- /dev/null
@@ -0,0 +1,23 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "zookeeper.fullname" . }}
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+{{- with .Values.service.annotations }}
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{- range $key, $value := .Values.service.ports }}
+    - name: {{ $key }}
+{{ toYaml $value | indent 6 }}
+  {{- end }}
+  selector:
+    app: {{ template "zookeeper.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/statefulset.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..bc2d160
--- /dev/null
@@ -0,0 +1,177 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ template "zookeeper.fullname" . }}
+  labels:
+    app: {{ template "zookeeper.name" . }}
+    chart: {{ template "zookeeper.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    component: server
+spec:
+  serviceName: {{ template "zookeeper.fullname" . }}-headless
+  replicas: {{ .Values.replicaCount }}
+  terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
+  selector:
+    matchLabels:
+      app: {{ template "zookeeper.name" . }}
+      release: {{ .Release.Name }}
+      component: server
+  updateStrategy:
+{{ toYaml .Values.updateStrategy | indent 4 }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "zookeeper.name" . }}
+        release: {{ .Release.Name }}
+        component: server
+      {{- if .Values.podLabels }}
+        ## Custom pod labels
+        {{- range $key, $value := .Values.podLabels }}
+        {{ $key }}: {{ $value | quote }}
+        {{- end }}
+      {{- end }}
+      annotations:
+      {{- if .Values.podAnnotations }}
+        ## Custom pod annotations
+        {{- range $key, $value := .Values.podAnnotations }}
+        {{ $key }}: {{ $value | quote }}
+        {{- end }}
+      {{- end }}
+    spec:
+{{- if .Values.schedulerName }}
+      schedulerName: "{{ .Values.schedulerName }}"
+{{- end }}
+      securityContext:
+{{ toYaml .Values.securityContext | indent 8 }}
+      containers:
+
+        - name: zookeeper
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          command:
+            - /bin/bash
+            - -xec
+            - zkGenConfig.sh && exec zkServer.sh start-foreground
+          ports:
+{{- range $key, $port := .Values.ports }}
+            - name: {{ $key }}
+{{ toYaml $port | indent 14 }}
+{{- end }}
+          livenessProbe:
+{{ toYaml .Values.livenessProbe | indent 12 }}
+          readinessProbe:
+{{ toYaml .Values.readinessProbe | indent 12 }}
+          env:
+            - name: ZK_REPLICAS
+              value: {{ .Values.replicaCount | quote }}
+          {{- range $key, $value := .Values.env }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: data
+              mountPath: /var/lib/zookeeper
+
+{{- if .Values.exporters.jmx.enabled }}
+        - name: jmx-exporter
+          image: "{{ .Values.exporters.jmx.image.repository }}:{{ .Values.exporters.jmx.image.tag }}"
+          imagePullPolicy: {{ .Values.exporters.jmx.image.pullPolicy }}
+          ports:
+  {{- range $key, $port := .Values.exporters.jmx.ports }}
+            - name: {{ $key }}
+{{ toYaml $port | indent 14 }}
+  {{- end }}
+          livenessProbe:
+{{ toYaml .Values.exporters.jmx.livenessProbe | indent 12 }}
+          readinessProbe:
+{{ toYaml .Values.exporters.jmx.readinessProbe | indent 12 }}
+          env:
+            - name: SERVICE_PORT
+              value: {{ .Values.exporters.jmx.ports.jmxxp.containerPort | quote }}
+          {{- with .Values.exporters.jmx.env }}
+            {{- range $key, $value := . }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+            {{- end }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.exporters.jmx.resources | indent 12 }}
+          volumeMounts:
+            - name: config-jmx-exporter
+              mountPath: /opt/jmx_exporter/config.yml
+              subPath: config.yml
+{{- end }}
+
+{{- if .Values.exporters.zookeeper.enabled }}
+        - name: zookeeper-exporter
+          image: "{{ .Values.exporters.zookeeper.image.repository }}:{{ .Values.exporters.zookeeper.image.tag }}"
+          imagePullPolicy: {{ .Values.exporters.zookeeper.image.pullPolicy }}
+          args:
+            - -bind-addr=:{{ .Values.exporters.zookeeper.ports.zookeeperxp.containerPort }}
+            - -metrics-path={{ .Values.exporters.zookeeper.path }}
+            - -zookeeper=localhost:{{ .Values.ports.client.containerPort }}
+            - -log-level={{ .Values.exporters.zookeeper.config.logLevel }}
+            - -reset-on-scrape={{ .Values.exporters.zookeeper.config.resetOnScrape }}
+          ports:
+  {{- range $key, $port := .Values.exporters.zookeeper.ports }}
+            - name: {{ $key }}
+{{ toYaml $port | indent 14 }}
+  {{- end }}
+          livenessProbe:
+{{ toYaml .Values.exporters.zookeeper.livenessProbe | indent 12 }}
+          readinessProbe:
+{{ toYaml .Values.exporters.zookeeper.readinessProbe | indent 12 }}
+          env:
+          {{- range $key, $value := .Values.exporters.zookeeper.env }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.exporters.zookeeper.resources | indent 12 }}
+{{- end }}
+
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+      {{- if (or .Values.exporters.jmx.enabled (not .Values.persistence.enabled)) }}
+      volumes:
+        {{- if .Values.exporters.jmx.enabled }}
+        - name: config-jmx-exporter
+          configMap:
+            name: {{ .Release.Name }}-jmx-exporter
+        {{- end }}
+        {{- if not .Values.persistence.enabled }}
+        - name: data
+          emptyDir: {}
+        {{- end }}
+      {{- end }}
+  {{- if .Values.persistence.enabled }}
+  volumeClaimTemplates:
+    - metadata:
+        name: data
+      spec:
+        accessModes:
+          - {{ .Values.persistence.accessMode | quote }}
+        resources:
+          requests:
+            storage: {{ .Values.persistence.size | quote }}
+      {{- if .Values.persistence.storageClass }}
+        {{- if (eq "-" .Values.persistence.storageClass) }}
+        storageClassName: ""
+        {{- else }}
+        storageClassName: "{{ .Values.persistence.storageClass }}"
+        {{- end }}
+      {{- end }}
+  {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/values.yaml b/src/seba_charts/cord-platform/charts/kafka/charts/zookeeper/values.yaml
new file mode 100644 (file)
index 0000000..f92a12b
--- /dev/null
@@ -0,0 +1,294 @@
+## As weighted quorums are not supported, it is imperative that an odd number of replicas
+## be chosen. Moreover, the number of replicas should be either 1, 3, 5, or 7.
+##
+## ref: https://github.com/kubernetes/contrib/tree/master/statefulsets/zookeeper#stateful-set
+replicaCount: 3  # Desired quantity of ZooKeeper pods. This should always be (1,3,5, or 7)
+
+podDisruptionBudget:
+  maxUnavailable: 1  # Limits how many Zokeeper pods may be unavailable due to voluntary disruptions.
+
+terminationGracePeriodSeconds: 1800  # Duration in seconds a Zokeeper pod needs to terminate gracefully.
+
+## OnDelete requires you to manually delete each pod when making updates.
+## This approach is at the moment safer than RollingUpdate because replication
+## may be incomplete when replication source pod is killed.
+##
+## ref: http://blog.kubernetes.io/2017/09/kubernetes-statefulsets-daemonsets.html
+updateStrategy:
+  type: OnDelete  # Pods will only be created when you manually delete old pods.
+
+## refs:
+## - https://github.com/kubernetes/contrib/tree/master/statefulsets/zookeeper
+## - https://github.com/kubernetes/contrib/blob/master/statefulsets/zookeeper/Makefile#L1
+image:
+  repository: iecedge/k8szk_arm64  # Container image repository for zookeeper container.
+  tag: v3  # Container image tag for zookeeper container.
+  pullPolicy: IfNotPresent  # Image pull criteria for zookeeper container.
+
+service:
+  type: ClusterIP  # Exposes zookeeper on a cluster-internal IP.
+  annotations: {}  # Arbitrary non-identifying metadata for zookeeper service.
+    ## AWS example for use with LoadBalancer service type.
+    # external-dns.alpha.kubernetes.io/hostname: zookeeper.cluster.local
+    # service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
+    # service.beta.kubernetes.io/aws-load-balancer-internal: "true"
+  ports:
+    client:
+      port: 2181  # Service port number for client port.
+      targetPort: client  # Service target port for client port.
+      protocol: TCP  # Service port protocol for client port.
+
+
+ports:
+  client:
+    containerPort: 2181  # Port number for zookeeper container client port.
+    protocol: TCP  # Protocol for zookeeper container client port.
+  election:
+    containerPort: 3888  # Port number for zookeeper container election port.
+    protocol: TCP  # Protocol for zookeeper container election port.
+  server:
+    containerPort: 2888  # Port number for zookeeper container server port.
+    protocol: TCP  # Protocol for zookeeper container server port.
+
+resources: {}  # Optionally specify how much CPU and memory (RAM) each zookeeper container needs.
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #  cpu: 100m
+  #  memory: 128Mi
+  # requests:
+  #  cpu: 100m
+  #  memory: 128Mi
+
+nodeSelector: {}  # Node label-values required to run zookeeper pods.
+
+tolerations: []  # Node taint overrides for zookeeper pods.
+
+affinity: {}  # Criteria by which pod label-values influence scheduling for zookeeper pods.
+  # podAntiAffinity:
+  #   requiredDuringSchedulingIgnoredDuringExecution:
+  #     - topologyKey: "kubernetes.io/hostname"
+  #       labelSelector:
+  #         matchLabels:
+  #           release: zookeeper
+
+podAnnotations: {}  # Arbitrary non-identifying metadata for zookeeper pods.
+  # prometheus.io/scrape: "true"
+  # prometheus.io/path: "/metrics"
+  # prometheus.io/port: "9141"
+
+podLabels: {}  # Key/value pairs that are attached to zookeeper pods.
+  # team: "developers"
+  # service: "zookeeper"
+
+livenessProbe:
+  exec:
+    command:
+      - zkOk.sh
+  initialDelaySeconds: 20
+  # periodSeconds: 30
+  # timeoutSeconds: 30
+  # failureThreshold: 6
+  # successThreshold: 1
+
+readinessProbe:
+  exec:
+    command:
+      - zkOk.sh
+  initialDelaySeconds: 20
+  # periodSeconds: 30
+  # timeoutSeconds: 30
+  # failureThreshold: 6
+  # successThreshold: 1
+
+securityContext:
+  fsGroup: 1000
+  runAsUser: 1000
+
+persistence:
+  enabled: true
+  ## zookeeper data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteOnce
+  size: 5Gi
+
+## Exporters query apps for metrics and make those metrics available for
+## Prometheus to scrape.
+exporters:
+
+  jmx:
+    enabled: false
+    image:
+      repository: cachengo/jmx-prometheus-exporter
+      tag: 0.3.0
+      pullPolicy: IfNotPresent
+    config:
+      lowercaseOutputName: false
+      ## ref: https://github.com/prometheus/jmx_exporter/blob/master/example_configs/zookeeper.yaml
+      rules:
+        - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+)><>(\\w+)"
+          name: "zookeeper_$2"
+        - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+)><>(\\w+)"
+          name: "zookeeper_$3"
+          labels:
+            replicaId: "$2"
+        - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+), name2=(\\w+)><>(\\w+)"
+          name: "zookeeper_$4"
+          labels:
+            replicaId: "$2"
+            memberType: "$3"
+        - pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+), name2=(\\w+), name3=(\\w+)><>(\\w+)"
+          name: "zookeeper_$4_$5"
+          labels:
+            replicaId: "$2"
+            memberType: "$3"
+      startDelaySeconds: 30
+    env: {}
+    resources: {}
+    path: /metrics
+    ports:
+      jmxxp:
+        containerPort: 9404
+        protocol: TCP
+    livenessProbe:
+      httpGet:
+        path: /metrics
+        port: jmxxp
+      initialDelaySeconds: 30
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+    readinessProbe:
+      httpGet:
+        path: /metrics
+        port: jmxxp
+      initialDelaySeconds: 30
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+
+  zookeeper:
+  ## refs:
+  ## - https://github.com/carlpett/zookeeper_exporter
+  ## - https://hub.docker.com/r/akrainoenea/zookeeper_exporter/
+  ## - https://www.datadoghq.com/blog/monitoring-kafka-performance-metrics/#zookeeper-metrics
+    enabled: false
+    image:
+      repository: akrainoenea/zookeeper_exporter
+      tag: v1.1.2
+      pullPolicy: IfNotPresent
+    config:
+      logLevel: info
+      resetOnScrape: "true"
+    env: {}
+    resources: {}
+    path: /metrics
+    ports:
+      zookeeperxp:
+        containerPort: 9141
+        protocol: TCP
+    livenessProbe:
+      httpGet:
+        path: /metrics
+        port: zookeeperxp
+      initialDelaySeconds: 30
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+    readinessProbe:
+      httpGet:
+        path: /metrics
+        port: zookeeperxp
+      initialDelaySeconds: 30
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+
+## Use an alternate scheduler, e.g. "stork".
+## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+##
+# schedulerName:
+
+## ref: https://github.com/kubernetes/contrib/tree/master/statefulsets/zookeeper
+env:
+
+  ## Options related to JMX exporter.
+  ## ref: https://github.com/apache/zookeeper/blob/master/bin/zkServer.sh#L36
+  JMXAUTH: "false"
+  JMXDISABLE: "false"
+  JMXPORT: 1099
+  JMXSSL: "false"
+
+  ## The port on which the server will accept client requests.
+  ZK_CLIENT_PORT: 2181
+
+  ## The port on which the ensemble performs leader election.
+  ZK_ELECTION_PORT: 3888
+
+  ## The JVM heap size.
+  ZK_HEAP_SIZE: 2G
+
+  ## The number of Ticks that an ensemble member is allowed to perform leader
+  ## election.
+  ZK_INIT_LIMIT: 5
+
+  ## The Log Level that for the ZooKeeper processes logger.
+  ## Choices are `TRACE,DEBUG,INFO,WARN,ERROR,FATAL`.
+  ZK_LOG_LEVEL: INFO
+
+  ## The maximum number of concurrent client connections that
+  ## a server in the ensemble will accept.
+  ZK_MAX_CLIENT_CNXNS: 60
+
+  ## The maximum session timeout that the ensemble will allow a client to request.
+  ## Upstream default is `20 * ZK_TICK_TIME`
+  ZK_MAX_SESSION_TIMEOUT: 40000
+
+  ## The minimum session timeout that the ensemble will allow a client to request.
+  ## Upstream default is `2 * ZK_TICK_TIME`.
+  ZK_MIN_SESSION_TIMEOUT: 4000
+
+  ## The delay, in hours, between ZooKeeper log and snapshot cleanups.
+  ZK_PURGE_INTERVAL: 0
+
+  ## The port on which the leader will send events to followers.
+  ZK_SERVER_PORT: 2888
+
+  ## The number of snapshots that the ZooKeeper process will retain if
+  ## `ZK_PURGE_INTERVAL` is set to a value greater than `0`.
+  ZK_SNAP_RETAIN_COUNT: 3
+
+  ## The number of Tick by which a follower may lag behind the ensembles leader.
+  ZK_SYNC_LIMIT: 10
+
+  ## The number of wall clock ms that corresponds to a Tick for the ensembles
+  ## internal time.
+  ZK_TICK_TIME: 2000
+
+jobs:
+  ## ref: http://zookeeper.apache.org/doc/r3.4.10/zookeeperProgrammers.html#ch_zkSessions
+  chroots:
+    enabled: false
+    activeDeadlineSeconds: 300
+    backoffLimit: 5
+    completions: 1
+    config:
+      create: []
+        # - /kafka
+        # - /ureplicator
+    env: []
+    parallelism: 1
+    resources: {}
+    restartPolicy: Never
diff --git a/src/seba_charts/cord-platform/charts/kafka/requirements.lock b/src/seba_charts/cord-platform/charts/kafka/requirements.lock
new file mode 100644 (file)
index 0000000..802e6a9
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: zookeeper
+  repository: https://kubernetes-charts-incubator.storage.googleapis.com/
+  version: 1.0.2
+digest: sha256:0ea890c77e32aee10c564b732c9fa27b17fa5c398bc50a6bf342ecbb79094cdc
+generated: 2018-07-09T20:04:07.73379146+03:00
diff --git a/src/seba_charts/cord-platform/charts/kafka/requirements.yaml b/src/seba_charts/cord-platform/charts/kafka/requirements.yaml
new file mode 100644 (file)
index 0000000..3468ece
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: zookeeper
+  version: 1.0.2
+  repository: https://kubernetes-charts-incubator.storage.googleapis.com/
+  condition: zookeeper.enabled
+
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/kafka/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..11eade7
--- /dev/null
@@ -0,0 +1,73 @@
+### Connecting to Kafka from inside Kubernetes
+
+You can connect to Kafka by running a simple pod in the K8s cluster like this with a configuration like this:
+
+  apiVersion: v1
+  kind: Pod
+  metadata:
+    name: testclient
+    namespace: {{ .Release.Namespace }}
+  spec:
+    containers:
+    - name: kafka
+      image: {{ .Values.image }}:{{ .Values.imageTag }}
+      command:
+        - sh
+        - -c
+        - "exec tail -f /dev/null"
+
+Once you have the testclient pod above running, you can list all kafka
+topics with:
+
+  kubectl -n {{ .Release.Namespace }} exec testclient -- /usr/bin/kafka-topics --zookeeper {{ .Release.Name }}-zookeeper:2181 --list
+
+To create a new topic:
+
+  kubectl -n {{ .Release.Namespace }} exec testclient -- /usr/bin/kafka-topics --zookeeper {{ .Release.Name }}-zookeeper:2181 --topic test1 --create --partitions 1 --replication-factor 1
+
+To listen for messages on a topic:
+
+  kubectl -n {{ .Release.Namespace }} exec -ti testclient -- /usr/bin/kafka-console-consumer --bootstrap-server {{ .Release.Name }}-kafka:9092 --topic test1 --from-beginning
+
+To stop the listener session above press: Ctrl+C
+
+To start an interactive message producer session:
+  kubectl -n {{ .Release.Namespace }} exec -ti testclient -- /usr/bin/kafka-console-producer --broker-list {{ .Release.Name }}-kafka-headless:9092 --topic test1
+
+To create a message in the above session, simply type the message and press "enter"
+To end the producer session try: Ctrl+C
+{{ if .Values.external.enabled }}
+### Connecting to Kafka from outside Kubernetes
+
+You have enabled the external access feature of this chart.
+
+**WARNING:** By default this feature allows Kafka clients outside Kubernetes to
+connect to Kafka via NodePort(s) in `PLAINTEXT`.
+
+Please see this chart's README.md for more details and guidance.
+
+If you wish to connect to Kafka from outside please configure your external Kafka
+clients to point at the following brokers. Please allow a few minutes for all
+associated resources to become healthy.
+  {{  $fullName := include "kafka.fullname" . }}
+  {{- $replicas := .Values.replicas | int }}
+  {{- $servicePort := .Values.external.servicePort }}
+  {{- $root := . }}
+  {{- range $i, $e := until $replicas }}
+    {{- $externalListenerPort := add $root.Values.external.firstListenerPort $i }}
+    {{- if $root.Values.external.distinct }}
+{{ printf "%s-%d.%s:%d" $root.Release.Name $i $root.Values.external.domain  $externalListenerPort | indent 2 }}
+    {{- else }}
+{{ printf "%s.%s:%d" $root.Release.Name $root.Values.external.domain $externalListenerPort | indent 2 }}
+    {{- end }}
+  {{- end }}
+{{- end }}
+
+{{ if .Values.prometheus.jmx.enabled }}
+To view JMX configuration (pull request/updates to improve defaults are encouraged):
+  {{ if .Values.jmx.configMap.overrideName }}
+  kubectl -n {{ .Release.Namespace }} describe configmap {{ .Values.jmx.configMap.overrideName }}
+  {{ else }}
+  kubectl -n {{ .Release.Namespace }} describe configmap {{ include "kafka.fullname" . }}-metrics
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/kafka/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..cb0d300
--- /dev/null
@@ -0,0 +1,56 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "kafka.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "kafka.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified zookeeper name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "kafka.zookeeper.fullname" -}}
+{{- $name := default "zookeeper" .Values.zookeeper.nameOverride -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Form the Zookeeper URL. If zookeeper is installed as part of this chart, use k8s service discovery,
+else use user-provided URL
+*/}}
+{{- define "zookeeper.url" }}
+{{- $port := .Values.zookeeper.port | toString }}
+{{- if .Values.zookeeper.enabled -}}
+{{- printf "%s:%s" (include "kafka.zookeeper.fullname" .) $port }}
+{{- else -}}
+{{- $zookeeperConnect := printf "%s:%s" .Values.zookeeper.url $port }}
+{{- $zookeeperConnectOverride := index .Values "configurationOverrides" "zookeeper.connect" }}
+{{- default $zookeeperConnect $zookeeperConnectOverride }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "kafka.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/configmap-config.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/configmap-config.yaml
new file mode 100644 (file)
index 0000000..454faf0
--- /dev/null
@@ -0,0 +1,37 @@
+{{- if .Values.topics -}}
+{{- $zk := include "zookeeper.url" . -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: {{ template "kafka.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: "{{ .Release.Service }}"
+    release: "{{ .Release.Name }}"
+  name: {{ template "kafka.fullname" . }}-config
+data:
+  runtimeConfig.sh: |
+    #!/bin/sh
+    set -e
+    cd /usr/bin
+    until kafka-configs --zookeeper {{ $zk }} --entity-type topics --describe || (( count++ >= 6 ))
+    do
+      echo "Waiting for Zookeeper..."
+      sleep 20
+    done
+    echo "Applying runtime configuration using {{ .Values.image }}:{{ .Values.imageTag }}"
+    {{- range $n, $topic := .Values.topics }}
+    {{- if and $topic.partitions $topic.replicationFactor }}
+    kafka-topics --zookeeper {{ $zk }} --create --if-not-exists --force --topic {{ $topic.name }} --partitions {{ $topic.partitions }} --replication-factor {{ $topic.replicationFactor }}
+    {{- else if $topic.partitions }}
+    kafka-topics --zookeeper {{ $zk }} --alter --force --topic {{ $topic.name }} --partitions {{ $topic.partitions }} || true
+    {{- end }}
+    {{- if $topic.defaultConfig }}
+    kafka-configs --zookeeper {{ $zk }} --entity-type topics --entity-name {{ $topic.name }} --alter --force --delete-config {{ nospace $topic.defaultConfig }} || true
+    {{- end }}
+    {{- if $topic.config }}
+    kafka-configs --zookeeper {{ $zk }} --entity-type topics --entity-name {{ $topic.name }} --alter --force --add-config {{ nospace $topic.config }}
+    {{- end }}
+    kafka-configs --zookeeper {{ $zk }} --entity-type topics --entity-name {{ $topic.name }} --describe
+    {{- end }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/configmap-jmx.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/configmap-jmx.yaml
new file mode 100644 (file)
index 0000000..24a25c7
--- /dev/null
@@ -0,0 +1,67 @@
+{{- if and .Values.prometheus.jmx.enabled .Values.jmx.configMap.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "kafka.fullname" . }}-metrics
+  labels:
+    app: {{ include "kafka.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  jmx-kafka-prometheus.yml: |+
+{{- if .Values.jmx.configMap.overrideConfig }}
+{{ toYaml .Values.jmx.configMap.overrideConfig | indent 4 }}
+{{- else }}
+    jmxUrl: service:jmx:rmi:///jndi/rmi://127.0.0.1:{{ .Values.jmx.port }}/jmxrmi
+    lowercaseOutputName: true
+    lowercaseOutputLabelNames: true
+    ssl: false
+    {{ if .Values.jmx.whitelistObjectNames }}
+    whitelistObjectNames: ["{{ join "\",\"" .Values.jmx.whitelistObjectNames }}"]
+    {{ end }}
+    rules:
+    - pattern: kafka.controller<type=(ControllerChannelManager), name=(QueueSize), broker-id=(\d+)><>(Value)
+      name: kafka_controller_$1_$2_$4
+      labels:
+        broker_id: "$3"
+    - pattern: kafka.controller<type=(ControllerChannelManager), name=(TotalQueueSize)><>(Value)
+      name: kafka_controller_$1_$2_$3
+    - pattern: kafka.controller<type=(KafkaController), name=(.+)><>(Value)
+      name: kafka_controller_$1_$2_$3
+    - pattern: kafka.controller<type=(ControllerStats), name=(.+)><>(Count)
+      name: kafka_controller_$1_$2_$3
+    - pattern: kafka.server<type=(ReplicaFetcherManager), name=(.+), clientId=(.+)><>(Value)
+      name: kafka_server_$1_$2_$4
+      labels:
+        client_id: "$3"
+    - pattern : kafka.network<type=(Processor), name=(IdlePercent), networkProcessor=(.+)><>(Value)
+      name: kafka_network_$1_$2_$4
+      labels:
+        network_processor: $3
+    - pattern : kafka.network<type=(RequestMetrics), name=(RequestsPerSec), request=(.+)><>(Count)
+      name: kafka_network_$1_$2_$4
+      labels:
+        request: $3
+    - pattern: kafka.server<type=(.+), name=(.+), topic=(.+)><>(Count|OneMinuteRate)
+      name: kafka_server_$1_$2_$4
+      labels:
+        topic: $3
+    - pattern: kafka.server<type=(DelayedOperationPurgatory), name=(.+), delayedOperation=(.+)><>(Value)
+      name: kafka_server_$1_$2_$3_$4
+    - pattern: kafka.server<type=(.+), name=(.+)><>(Count|Value|OneMinuteRate)
+      name: kafka_server_$1_total_$2_$3
+    - pattern: kafka.server<type=(.+)><>(queue-size)
+      name: kafka_server_$1_$2
+    - pattern: java.lang<type=(.+), name=(.+)><(.+)>(\w+)
+      name: java_lang_$1_$4_$3_$2
+    - pattern: java.lang<type=(.+), name=(.+)><>(\w+)
+      name: java_lang_$1_$3_$2
+    - pattern : java.lang<type=(.*)>
+    - pattern: kafka.log<type=(.+), name=(.+), topic=(.+), partition=(.+)><>Value
+      name: kafka_log_$1_$2
+      labels:
+        topic: $3
+        partition: $4
+{{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/deployment-kafka-exporter.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/deployment-kafka-exporter.yaml
new file mode 100644 (file)
index 0000000..d43aab1
--- /dev/null
@@ -0,0 +1,38 @@
+{{- if .Values.prometheus.kafka.enabled }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ template "kafka.fullname" . }}-exporter
+  labels:
+    app: "{{ template "kafka.name" . }}"
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: {{ template "kafka.name" . }}-exporter
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      annotations:
+{{- if and .Values.prometheus.kafka.enabled  (not .Values.prometheus.operator.enabled) }}
+        prometheus.io/scrape: "true"
+        prometheus.io/port: {{ .Values.prometheus.kafka.port | quote }}
+{{- end }}
+      labels:
+        app: {{ template "kafka.name" . }}-exporter
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+      - image: "{{ .Values.prometheus.kafka.image }}:{{ .Values.prometheus.kafka.imageTag }}"
+        name: kafka-exporter
+        args:
+          - --kafka.server={{ template "kafka.fullname" . }}:9092
+          - --web.listen-address=:{{ .Values.prometheus.kafka.port }}
+        ports:
+          - containerPort: {{ .Values.prometheus.kafka.port }}
+        resources:
+{{ toYaml .Values.prometheus.kafka.resources | indent 10 }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/job-config.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/job-config.yaml
new file mode 100644 (file)
index 0000000..1bd747f
--- /dev/null
@@ -0,0 +1,32 @@
+{{- if .Values.topics -}}
+{{- $scriptHash := include (print $.Template.BasePath "/configmap-config.yaml") . | sha256sum | trunc 8 -}}
+apiVersion: batch/v1
+kind: Job
+metadata:
+  name: "{{ template "kafka.fullname" . }}-config-{{ $scriptHash }}"
+  labels:
+    app: {{ template "kafka.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: "{{ .Release.Service }}"
+    release: "{{ .Release.Name }}"
+spec:
+  template:
+    metadata:
+      labels:
+        app: {{ template "kafka.fullname" . }}
+        release: "{{ .Release.Name }}"
+    spec:
+      restartPolicy: Never
+      volumes:
+        - name: config-volume
+          configMap:
+            name: {{ template "kafka.fullname" . }}-config
+            defaultMode: 0744
+      containers:
+        - name: {{ template "kafka.fullname" . }}-config
+          image: "{{ .Values.image }}:{{ .Values.imageTag }}"
+          command: ["/usr/local/script/runtimeConfig.sh"]
+          volumeMounts:
+            - name: config-volume
+              mountPath: "/usr/local/script"
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/rbac.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/rbac.yaml
new file mode 100644 (file)
index 0000000..0173ab6
--- /dev/null
@@ -0,0 +1,36 @@
+{{- if  .Values.rbac.enabled  }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ .Release.Name }}
+  namespace: {{ .Release.Namespace }}
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+  name: {{ .Release.Name }}
+  namespace: {{ .Release.Namespace }}
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - pods
+  verbs:
+  - get
+  - list
+  - patch
+---
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+  name: {{ .Release.Name }}
+roleRef:
+  kind: Role
+  name: {{ .Release.Name }}
+  apiGroup: rbac.authorization.k8s.io
+subjects:
+- kind: ServiceAccount
+  name: {{ .Release.Name }}
+  namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/service-brokers-external.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/service-brokers-external.yaml
new file mode 100644 (file)
index 0000000..e8084f8
--- /dev/null
@@ -0,0 +1,52 @@
+{{- if .Values.external.enabled }}
+  {{- $fullName := include "kafka.fullname" . }}
+  {{- $replicas := .Values.replicas | int }}
+  {{- $servicePort := .Values.external.servicePort }}
+  {{- $dnsPrefix := printf "%s" .Release.Name }}
+  {{- $root := . }}
+  {{- range $i, $e := until $replicas }}
+    {{- $externalListenerPort := add $root.Values.external.firstListenerPort $i }}
+    {{- $responsiblePod := printf "%s-%d" (printf "%s" $fullName) $i }}
+    {{- $distinctPrefix := printf "%s-%d" $dnsPrefix $i }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  annotations:
+    {{- if $root.Values.external.distinct }}
+    dns.alpha.kubernetes.io/internal: "{{ $distinctPrefix }}.{{ $root.Values.external.domain }}"
+    external-dns.alpha.kubernetes.io/hostname: "{{ $distinctPrefix }}.{{ $root.Values.external.domain }}"
+    {{- else }}
+    dns.alpha.kubernetes.io/internal: "{{ $dnsPrefix }}.{{ $root.Values.external.domain }}"
+    external-dns.alpha.kubernetes.io/hostname: "{{ $dnsPrefix }}.{{ $root.Values.external.domain }}"
+    {{- end }}
+    {{- if $root.Values.external.annotations }}
+{{ toYaml $root.Values.external.annotations | indent 4 }}
+    {{- end }}
+  name: {{ $root.Release.Name }}-{{ $i }}-external
+  labels:
+    app: {{ include "kafka.name" $root }}
+    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version }}
+    release: {{ $root.Release.Name }}
+    heritage: {{ $root.Release.Service }}
+    pod: {{ $responsiblePod | quote }}
+spec:
+  type: {{ $root.Values.external.type }}
+  ports:
+    - name: external-broker
+      {{- if eq $root.Values.external.type "LoadBalancer" }}
+      port: {{ $externalListenerPort }}
+      {{- else }}
+      port: {{ $servicePort }}
+      {{- end }}
+      targetPort: {{ $externalListenerPort }}
+      {{- if eq $root.Values.external.type "NodePort" }}
+      nodePort: {{ $externalListenerPort }}
+      {{- end }}
+      protocol: TCP
+  selector:
+    app: {{ include "kafka.name" $root }}
+    release: {{ $root.Release.Name }}
+    pod: {{ $responsiblePod | quote }}
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/service-brokers.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/service-brokers.yaml
new file mode 100644 (file)
index 0000000..6748b45
--- /dev/null
@@ -0,0 +1,44 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "kafka.fullname" . }}
+  labels:
+    app: {{ include "kafka.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+  - name: broker
+    port: 9092
+    targetPort: kafka
+{{- if and .Values.prometheus.jmx.enabled .Values.prometheus.operator.enabled }}
+  - name: jmx-exporter
+    protocol: TCP
+    port: {{ .Values.jmx.port }}
+    targetPort: prometheus
+{{- end }}
+  selector:
+    app: {{ include "kafka.name" . }}
+    release: {{ .Release.Name }}
+---
+{{- if and .Values.prometheus.kafka.enabled .Values.prometheus.operator.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "kafka.fullname" . }}-exporter
+  labels:
+    app: {{ include "kafka.name" . }}-exporter
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+  - name: kafka-exporter
+    protocol: TCP
+    port: {{ .Values.prometheus.kafka.port }}
+    targetPort: {{ .Values.prometheus.kafka.port }}
+  selector:
+    app: {{ include "kafka.name" . }}-exporter
+    release: {{ .Release.Name }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/service-headless.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/service-headless.yaml
new file mode 100644 (file)
index 0000000..483f5b0
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "kafka.fullname" . }}-headless
+  labels:
+    app: {{ include "kafka.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+{{- if .Values.headless.annotations }}
+{{ .Values.headless.annotations | toYaml | trimSuffix "\n" | indent 4 }}
+{{- end }}
+spec:
+  ports:
+  - name: broker
+    port: {{ .Values.headless.port }}
+{{- if .Values.headless.targetPort }}
+    targetPort: {{ .Values.headless.targetPort }}
+{{- end }}
+  clusterIP: None
+  selector:
+    app: {{ include "kafka.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/servicemonitors.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/servicemonitors.yaml
new file mode 100644 (file)
index 0000000..92eb125
--- /dev/null
@@ -0,0 +1,39 @@
+{{ if and .Values.prometheus.jmx.enabled .Values.prometheus.operator.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+  name: {{ include "kafka.fullname" . }}
+  namespace: {{ .Values.prometheus.operator.serviceMonitor.namespace }}
+  labels:
+{{ toYaml .Values.prometheus.operator.serviceMonitor.selector | indent 4 }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ include "kafka.name" . }}
+      release: {{ .Release.Name }}
+  endpoints:
+  - port: jmx-exporter
+    interval: {{ .Values.prometheus.jmx.interval }}
+  namespaceSelector:
+    any: true
+{{ end }}
+---
+{{ if and .Values.prometheus.kafka.enabled .Values.prometheus.operator.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+  name: {{ include "kafka.fullname" . }}-exporter
+  namespace: {{ .Values.prometheus.operator.serviceMonitor.namespace }}
+  labels:
+{{ toYaml .Values.prometheus.operator.serviceMonitor.selector | indent 4 }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ include "kafka.name" . }}-exporter
+      release: {{ .Release.Name }}
+  endpoints:
+  - port: kafka-exporter
+    interval: {{ .Values.prometheus.kafka.interval }}
+  namespaceSelector:
+    any: true
+{{ end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/statefulset.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..e8c988d
--- /dev/null
@@ -0,0 +1,222 @@
+{{- $advertisedListenersOverride := first (pluck "advertised.listeners" .Values.configurationOverrides) }}
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ include "kafka.fullname" . }}
+  labels:
+    app: {{ include "kafka.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  serviceName: {{ include "kafka.fullname" . }}-headless
+  podManagementPolicy: {{ .Values.podManagementPolicy }}
+  updateStrategy:
+{{ toYaml .Values.updateStrategy | indent 4 }}
+  replicas: {{ default 3 .Values.replicas }}
+  template:
+    metadata:
+{{- if and .Values.prometheus.jmx.enabled  (not .Values.prometheus.operator.enabled) }}
+      annotations:
+        prometheus.io/scrape: "true"
+        prometheus.io/port: {{ .Values.prometheus.jmx.port | quote }}
+{{- end }}
+      labels:
+        app: {{ include "kafka.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+{{- if .Values.schedulerName }}
+      schedulerName: "{{ .Values.schedulerName }}"
+{{- end }}
+{{- if .Values.rbac.enabled }}
+      serviceAccountName: {{ .Release.Name }}
+{{- end }}
+    {{- if .Values.external.enabled }}
+      ## ref: https://github.com/Yolean/kubernetes-kafka/blob/master/kafka/50kafka.yml
+      initContainers:
+      - name: init-ext
+        image: "{{ .Values.external.init.image }}:{{ .Values.external.init.imageTag }}"
+        imagePullPolicy: "{{ .Values.external.init.imagePullPolicy }}"
+        command:
+          - sh
+          - -euxc
+          - "kubectl label pods ${POD_NAME} --namespace ${POD_NAMESPACE} pod=${POD_NAME} --overwrite"
+        env:
+          - name: POD_NAME
+            valueFrom:
+              fieldRef:
+                fieldPath: metadata.name
+          - name: POD_NAMESPACE
+            valueFrom:
+              fieldRef:
+                fieldPath: metadata.namespace
+    {{- end }}
+{{- if .Values.tolerations }}
+      tolerations:
+{{ toYaml .Values.tolerations | indent 8 }}
+{{- end }}
+{{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+{{- end }}
+{{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+{{- end }}
+      containers:
+      {{- if .Values.prometheus.jmx.enabled }}
+      - name: metrics
+        image: "{{ .Values.prometheus.jmx.image }}:{{ .Values.prometheus.jmx.imageTag }}"
+        command:
+        - sh
+        - -exc
+        - |
+          trap "exit 0" TERM; \
+          while :; do \
+          java \
+          -XX:+UnlockExperimentalVMOptions \
+          -XX:+UseCGroupMemoryLimitForHeap \
+          -XX:MaxRAMFraction=1 \
+          -XshowSettings:vm \
+          -jar \
+          jmx_prometheus_httpserver.jar \
+          {{ .Values.prometheus.jmx.port | quote }} \
+          /etc/jmx-kafka/jmx-kafka-prometheus.yml & \
+          wait $! || sleep 3; \
+          done
+        ports:
+        - containerPort: {{ .Values.prometheus.jmx.port }}
+          name: prometheus
+        resources:
+{{ toYaml .Values.prometheus.jmx.resources | indent 10 }}
+        volumeMounts:
+        - name: jmx-config
+          mountPath: /etc/jmx-kafka
+      {{- end }}
+      - name: {{ include "kafka.name" . }}-broker
+        image: "{{ .Values.image }}:{{ .Values.imageTag }}"
+        imagePullPolicy: "{{ .Values.imagePullPolicy }}"
+        livenessProbe:
+          exec:
+            command:
+              - sh
+              - -ec
+              - /usr/bin/jps | /bin/grep -q SupportedKafka
+          {{- if not .Values.livenessProbe }}
+          initialDelaySeconds: 30
+          timeoutSeconds: 5
+          {{- else }}
+          initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30}}
+          {{- if .Values.livenessProbe.periodSeconds }}
+          periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
+          {{- end }}
+          timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 5}}
+          {{- if .Values.livenessProbe.successThreshold }}
+          successThreshold: {{ .Values.livenessProbe.successThreshold }}
+          {{- end }}
+          {{- if .Values.livenessProbe.failureThreshold }}
+          failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
+          {{- end }}
+          {{- end }}
+        readinessProbe:
+          tcpSocket:
+            port: kafka
+          initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
+          timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
+          successThreshold: {{ .Values.readinessProbe.successThreshold }}
+          failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
+        ports:
+        - containerPort: 9092
+          name: kafka
+        {{- if .Values.external.enabled }}
+          {{- $replicas := .Values.replicas | int }}
+          {{- $root := . }}
+          {{- range $i, $e := until $replicas }}
+        - containerPort: {{ add $root.Values.external.firstListenerPort $i }}
+          name: external-{{ $i }}
+          {{- end }}
+        {{- end }}
+        {{- if .Values.prometheus.jmx.enabled }}
+        - containerPort: {{ .Values.jmx.port }}
+          name: jmx
+        {{- end }}
+        {{- if .Values.additionalPorts }}
+{{ toYaml .Values.additionalPorts | indent 8 }}
+        {{- end }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+        env:
+        {{- if .Values.prometheus.jmx.enabled }}
+        - name: JMX_PORT
+          value: "{{ .Values.jmx.port }}"
+        {{- end }}
+        - name: POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+        - name: KAFKA_HEAP_OPTS
+          value: {{ .Values.kafkaHeapOptions }}
+        {{- if not (hasKey .Values.configurationOverrides "zookeeper.connect") }}
+        - name: KAFKA_ZOOKEEPER_CONNECT
+          value: {{ include "zookeeper.url" . | quote }}
+        {{- end }}
+        {{- if not (hasKey .Values.configurationOverrides "log.dirs") }}
+        - name: KAFKA_LOG_DIRS
+          value: {{ printf "%s/%s" .Values.persistence.mountPath .Values.logSubPath | quote }}
+        {{- end }}
+        {{- range $key, $value := .Values.configurationOverrides }}
+        - name: {{ printf "KAFKA_%s" $key | replace "." "_" | upper | quote }}
+          value: {{ $value | quote }}
+        {{- end }}
+        {{- if .Values.jmx.port }}
+        - name: KAFKA_JMX_PORT
+          value: "{{ .Values.jmx.port }}"
+        {{- end }}
+        # This is required because the Downward API does not yet support identification of
+        # pod numbering in statefulsets. Thus, we are required to specify a command which
+        # allows us to extract the pod ID for usage as the Kafka Broker ID.
+        # See: https://github.com/kubernetes/kubernetes/issues/31218
+        command:
+        - sh
+        - -exc
+        - |
+          unset KAFKA_PORT && \
+          export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
+          export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://${POD_IP}:9092{{ if kindIs "string" $advertisedListenersOverride }}{{ printf ",%s" $advertisedListenersOverride }}{{ end }} && \
+          exec /etc/confluent/docker/run
+        volumeMounts:
+        - name: datadir
+          mountPath: {{ .Values.persistence.mountPath | quote }}
+      volumes:
+      {{- if not .Values.persistence.enabled }}
+      - name: datadir
+        emptyDir: {}
+      {{- end }}
+      {{- if .Values.prometheus.jmx.enabled }}
+      - name: jmx-config
+        configMap:
+          {{- if .Values.jmx.configMap.overrideName }}
+          name: {{ .Values.jmx.configMap.overrideName }}
+          {{- else }}
+          name: {{ include "kafka.fullname" . }}-metrics
+          {{- end }}
+      {{- end }}
+      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
+  {{- if .Values.persistence.enabled }}
+  volumeClaimTemplates:
+  - metadata:
+      name: datadir
+    spec:
+      accessModes: [ "ReadWriteOnce" ]
+      resources:
+        requests:
+          storage: {{ .Values.persistence.size }}
+      {{- if .Values.persistence.storageClass }}
+      {{- if (eq "-" .Values.persistence.storageClass) }}
+      storageClassName: ""
+      {{- else }}
+      storageClassName: "{{ .Values.persistence.storageClass }}"
+      {{- end }}
+      {{- end }}
+  {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/kafka/templates/tests/test_topic_create_consume_produce.yaml b/src/seba_charts/cord-platform/charts/kafka/templates/tests/test_topic_create_consume_produce.yaml
new file mode 100644 (file)
index 0000000..5e7a7ea
--- /dev/null
@@ -0,0 +1,23 @@
+apiVersion: v1
+kind: Pod
+metadata:
+  name: "{{ .Release.Name }}-test-topic-create-consume-produce"
+  annotations:
+    "helm.sh/hook": test-success
+spec:
+  containers:
+  - name: {{ .Release.Name }}-test-consume
+    image: {{ .Values.image }}:{{ .Values.imageTag }}
+    command:
+    - sh
+    - -c
+    - |
+      # Create the topic
+      kafka-topics --zookeeper {{ include "zookeeper.url" . }} --topic helm-test-topic-create-consume-produce --create --partitions 1 --replication-factor 1 --if-not-exists && \
+      # Create a message
+      MESSAGE="`date -u`" && \
+      # Produce a test message to the topic
+      echo "$MESSAGE" | kafka-console-producer --broker-list {{ include "kafka.fullname" . }}:9092 --topic helm-test-topic-create-consume-produce && \
+      # Consume a test message from the topic
+      kafka-console-consumer --bootstrap-server {{ include "kafka.fullname" . }}-headless:9092 --topic helm-test-topic-create-consume-produce --from-beginning --timeout-ms 2000 --max-messages 1 | grep "$MESSAGE"
+  restartPolicy: Never
diff --git a/src/seba_charts/cord-platform/charts/kafka/values.yaml b/src/seba_charts/cord-platform/charts/kafka/values.yaml
new file mode 100644 (file)
index 0000000..75e6541
--- /dev/null
@@ -0,0 +1,355 @@
+# ------------------------------------------------------------------------------
+# Kafka:
+# ------------------------------------------------------------------------------
+
+## The StatefulSet installs 3 pods by default
+replicas: 3
+
+## The kafka image repository
+image: "akrainoenea/cp-kafka"
+
+## The kafka image tag
+imageTag: "4.1.2-2"
+
+## Specify a imagePullPolicy
+## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+imagePullPolicy: "IfNotPresent"
+
+## Configure resource requests and limits
+## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+resources: {}
+  # limits:
+  #   cpu: 200m
+  #   memory: 1536Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 1024Mi
+kafkaHeapOptions: "-Xmx1G -Xms1G"
+
+## The StatefulSet Update Strategy which Kafka will use when changes are applied.
+## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
+updateStrategy:
+  type: "OnDelete"
+
+## Start and stop pods in Parallel or OrderedReady (one-by-one.)  Note - Can not change after first release.
+## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy
+podManagementPolicy: OrderedReady
+
+## If RBAC is enabled on the cluster, the Kafka init container needs a service account
+## with permissisions sufficient to apply pod labels
+rbac:
+  enabled: false
+
+## The name of the storage class which the cluster should use.
+# storageClass: default
+
+## The subpath within the Kafka container's PV where logs will be stored.
+## This is combined with `persistence.mountPath`, to create, by default: /opt/kafka/data/logs
+logSubPath: "logs"
+
+## Use an alternate scheduler, e.g. "stork".
+## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+##
+# schedulerName:
+
+## Pod scheduling preferences (by default keep pods within a release on separate nodes).
+## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+## By default we don't set affinity
+affinity: {}
+## Alternatively, this typical example defines:
+## antiAffinity (to keep Kafka pods on separate pods)
+## and affinity (to encourage Kafka pods to be collocated with Zookeeper pods)
+# affinity:
+#   podAntiAffinity:
+#     requiredDuringSchedulingIgnoredDuringExecution:
+#     - labelSelector:
+#         matchExpressions:
+#         - key: app
+#           operator: In
+#           values:
+#           - kafka
+#       topologyKey: "kubernetes.io/hostname"
+#   podAffinity:
+#     preferredDuringSchedulingIgnoredDuringExecution:
+#      - weight: 50
+#        podAffinityTerm:
+#          labelSelector:
+#            matchExpressions:
+#            - key: app
+#              operator: In
+#              values:
+#                - zookeeper
+#          topologyKey: "kubernetes.io/hostname"
+
+## Node labels for pod assignment
+## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
+nodeSelector: {}
+
+## Readiness probe config.
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
+##
+readinessProbe:
+  initialDelaySeconds: 30
+  periodSeconds: 10
+  timeoutSeconds: 5
+  successThreshold: 1
+  failureThreshold: 3
+
+## Period to wait for broker graceful shutdown (sigterm) before pod is killed (sigkill)
+## ref: https://kubernetes-v1-4.github.io/docs/user-guide/production-pods/#lifecycle-hooks-and-termination-notice
+## ref: https://kafka.apache.org/10/documentation.html#brokerconfigs controlled.shutdown.*
+terminationGracePeriodSeconds: 60
+
+# Tolerations for nodes that have taints on them.
+# Useful if you want to dedicate nodes to just run kafka
+# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+tolerations: []
+# tolerations:
+# - key: "key"
+#   operator: "Equal"
+#   value: "value"
+#   effect: "NoSchedule"
+
+## Headless service.
+##
+headless:
+  # annotations:
+  # targetPort:
+  port: 9092
+
+## External access.
+##
+external:
+  type: NodePort
+  # annotations:
+  #  service.beta.kubernetes.io/openstack-internal-load-balancer: "true"
+
+  # create an A record for each statefulset pod
+  distinct: false
+  enabled: false
+  servicePort: 19092
+  firstListenerPort: 31090
+  domain: cluster.local
+  init:
+    image: "iecedge/kubectl_deployer_arm64"
+    imageTag: "0.4"
+    imagePullPolicy: "IfNotPresent"
+
+## Configuration Overrides. Specify any Kafka settings you would like set on the StatefulSet
+## here in map format, as defined in the official docs.
+## ref: https://kafka.apache.org/documentation/#brokerconfigs
+##
+configurationOverrides:
+  "offsets.topic.replication.factor": 3
+  # "auto.leader.rebalance.enable": true
+  # "auto.create.topics.enable": true
+  # "controlled.shutdown.enable": true
+  # "controlled.shutdown.max.retries": 100
+
+  ## Options required for external access via NodePort
+  ## ref:
+  ## - http://kafka.apache.org/documentation/#security_configbroker
+  ## - https://cwiki.apache.org/confluence/display/KAFKA/KIP-103%3A+Separation+of+Internal+and+External+traffic
+  ##
+  ## Setting "advertised.listeners" here appends to "PLAINTEXT://${POD_IP}:9092,"
+  # "advertised.listeners": |-
+  #   EXTERNAL://kafka.cluster.local:$((31090 + ${KAFKA_BROKER_ID}))
+  # "listener.security.protocol.map": |-
+  #   PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
+
+## A collection of additional ports to expose on brokers (formatted as normal containerPort yaml)
+# Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar
+additionalPorts: {}
+
+## Persistence configuration. Specify if and how to persist data to a persistent volume.
+##
+persistence:
+  enabled: true
+
+  ## The size of the PersistentVolume to allocate to each Kafka Pod in the StatefulSet. For
+  ## production servers this number should likely be much larger.
+  ##
+  size: "1Gi"
+
+  ## The location within the Kafka container where the PV will mount its storage and Kafka will
+  ## store its logs.
+  ##
+  mountPath: "/opt/kafka/data"
+
+  ## Kafka data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass:
+
+jmx:
+  ## Rules to apply to the Prometheus JMX Exporter.  Note while lots of stats have been cleaned and exposed,
+  ## there are still more stats to clean up and expose, others will never get exposed.  They keep lots of duplicates
+  ## that can be derived easily.  The configMap in this chart cleans up the metrics it exposes to be in a Prometheus
+  ## format, eg topic, broker are labels and not part of metric name. Improvements are gladly accepted and encouraged.
+  configMap:
+
+    ## Allows disabling the default configmap, note a configMap is needed
+    enabled: true
+
+    ## Allows setting values to generate confimap
+    ## To allow all metrics through (warning its crazy excessive) comment out below `overrideConfig` and set
+    ## `whitelistObjectNames: []`
+    overrideConfig: {}
+      # jmxUrl: service:jmx:rmi:///jndi/rmi://127.0.0.1:5555/jmxrmi
+      # lowercaseOutputName: true
+      # lowercaseOutputLabelNames: true
+      # ssl: false
+      # rules:
+      # - pattern: ".*"
+
+    ## If you would like to supply your own ConfigMap for JMX metrics, supply the name of that
+    ## ConfigMap as an `overrideName` here.
+    overrideName: ""
+
+  ## Port the jmx metrics are exposed in native jmx format, not in Prometheus format
+  port: 5555
+
+  ## JMX Whitelist Objects, can be set to control which JMX metrics are exposed.  Only whitelisted
+  ## values will be exposed via JMX Exporter.  They must also be exposed via Rules.  To expose all metrics
+  ## (warning its crazy excessive and they aren't formatted in a prometheus style) (1) `whitelistObjectNames: []`
+  ## (2) commented out above `overrideConfig`.
+  whitelistObjectNames:  # []
+  - kafka.controller:*
+  - kafka.server:*
+  - java.lang:*
+  - kafka.network:*
+  - kafka.log:*
+
+## Prometheus Exporters / Metrics
+##
+prometheus:
+  ## Prometheus JMX Exporter: exposes the majority of Kafkas metrics
+  jmx:
+    enabled: false
+
+    ## The image to use for the metrics collector
+    image: iecedge/kafka-prometheus-jmx-exporter_arm64
+
+    ## The image tag to use for the metrics collector
+    imageTag: misc-dockerfiles
+
+    ## Interval at which Prometheus scrapes metrics, note: only used by Prometheus Operator
+    interval: 10s
+
+    ## Port jmx-exporter exposes Prometheus format metrics to scrape
+    port: 5556
+
+    resources: {}
+      # limits:
+      #   cpu: 200m
+      #   memory: 1Gi
+      # requests:
+      #   cpu: 100m
+      #   memory: 100Mi
+
+  ## Prometheus Kafka Exporter: exposes complimentary metrics to JMX Exporter
+  kafka:
+    enabled: false
+
+    ## The image to use for the metrics collector
+    image: iecedge/kafka-exporter_arm64
+
+    ## The image tag to use for the metrics collector
+    imageTag: v1.2.0
+
+    ## Interval at which Prometheus scrapes metrics, note: only used by Prometheus Operator
+    interval: 10s
+
+    ## Port kafka-exporter exposes for Prometheus to scrape metrics
+    port: 9308
+
+    ## Resource limits
+    resources: {}
+#      limits:
+#        cpu: 200m
+#        memory: 1Gi
+#      requests:
+#        cpu: 100m
+#        memory: 100Mi
+
+  operator:
+    ## Are you using Prometheus Operator?
+    enabled: false
+
+    serviceMonitor:
+      # Namespace Prometheus is installed in
+      namespace: monitoring
+
+      ## Defaults to whats used if you follow CoreOS [Prometheus Install Instructions](https://github.com/coreos/prometheus-operator/tree/master/helm#tldr)
+      ## [Prometheus Selector Label](https://github.com/coreos/prometheus-operator/blob/master/helm/prometheus/templates/prometheus.yaml#L65)
+      ## [Kube Prometheus Selector Label](https://github.com/coreos/prometheus-operator/blob/master/helm/kube-prometheus/values.yaml#L298)
+      selector:
+        prometheus: kube-prometheus
+
+## Topic creation and configuration.
+## The job will be run on a deployment only when the config has been changed.
+## - If 'partitions' and 'replicationFactor' are specified we create the topic (with --if-not-exists.)
+## - If 'partitions' is specified we 'alter' the number of partitions. This will
+## silently and safely fail if the new setting isn’t strictly larger than the old (i.e. a NOOP.) Do be aware of the
+## implications for keyed topics (ref: https://docs.confluent.io/current/kafka/post-deployment.html#admin-operations)
+## - If 'defaultConfig' is specified it's deleted from the topic configuration. If it isn't present,
+## it will silently and safely fail.
+## - If 'config' is specified it's added to the topic configuration.
+##
+topics: []
+  # - name: myExistingTopicConfig
+  #   config: "cleanup.policy=compact,delete.retention.ms=604800000"
+  # - name: myExistingTopicPartitions
+  #   partitions: 8
+  # - name: myNewTopicWithConfig
+  #   partitions: 8
+  #   replicationFactor: 3
+  #   defaultConfig: "segment.bytes,segment.ms"
+  #   config: "cleanup.policy=compact,delete.retention.ms=604800000"
+
+# ------------------------------------------------------------------------------
+# Zookeeper:
+# ------------------------------------------------------------------------------
+
+zookeeper:
+  ## If true, install the Zookeeper chart alongside Kafka
+  ## ref: https://github.com/kubernetes/charts/tree/master/incubator/zookeeper
+  enabled: true
+
+  ## Configure Zookeeper resource requests and limits
+  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  resources: ~
+
+  ## Environmental variables to set in Zookeeper
+  env:
+    ## The JVM heap size to allocate to Zookeeper
+    ZK_HEAP_SIZE: "1G"
+
+  persistence:
+    enabled: false
+    ## The amount of PV storage allocated to each Zookeeper pod in the statefulset
+    # size: "2Gi"
+
+  ## Specify a Zookeeper imagePullPolicy
+  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+  image:
+    PullPolicy: "IfNotPresent"
+
+  ## If the Zookeeper Chart is disabled a URL and port are required to connect
+  url: ""
+  port: 2181
+
+  ## Pod scheduling preferences (by default keep pods within a release on separate nodes).
+  ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+  ## By default we don't set affinity:
+  affinity: {}  # Criteria by which pod label-values influence scheduling for zookeeper pods.
+  # podAntiAffinity:
+  #   requiredDuringSchedulingIgnoredDuringExecution:
+  #     - topologyKey: "kubernetes.io/hostname"
+  #       labelSelector:
+  #         matchLabels:
+  #           release: zookeeper
diff --git a/src/seba_charts/cord-platform/charts/logging/.helmignore b/src/seba_charts/cord-platform/charts/logging/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/logging/Chart.yaml b/src/seba_charts/cord-platform/charts/logging/Chart.yaml
new file mode 100644 (file)
index 0000000..1320da8
--- /dev/null
@@ -0,0 +1,4 @@
+description: Sets up log aggregation infrastructure in Kubernetes, with elasticstack
+  and kibana
+name: logging
+version: 1.0.0
diff --git a/src/seba_charts/cord-platform/charts/logging/README.md b/src/seba_charts/cord-platform/charts/logging/README.md
new file mode 100644 (file)
index 0000000..4cdd5e6
--- /dev/null
@@ -0,0 +1,22 @@
+# Logging
+
+This chart implements a log aggregation framework built on elasticsearch within
+kubernetes.
+
+It requires persistent storage, and currently has default values for the
+`local-provisioner` with storage on each k8s node.
+
+Once these prereqs are satisfied, it can be run with:
+
+    helm install -n logging logging
+
+(NOTE: the name must be `logging` currently, or name lookups within the pod are broken)
+
+## Current log sources
+
+- Container logs from k8s with [fluentd-elasticsearch](https://github.com/helm/charts/tree/master/stable/fluentd-elasticsearch)
+
+## Using Kibana
+
+Visit: http://<k8s_node_hostname>:30601
+
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/.helmignore b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/.helmignore
new file mode 100644 (file)
index 0000000..f225651
--- /dev/null
@@ -0,0 +1,3 @@
+.git
+# OWNERS file for Kubernetes
+OWNERS
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/Chart.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/Chart.yaml
new file mode 100644 (file)
index 0000000..764953b
--- /dev/null
@@ -0,0 +1,21 @@
+appVersion: 6.4.2
+description: Flexible and powerful open source, distributed real-time search and analytics
+  engine.
+home: https://www.elastic.co/products/elasticsearch
+icon: https://static-www.elastic.co/assets/blteb1c97719574938d/logo-elastic-elasticsearch-lt.svg
+maintainers:
+- email: christian@jetstack.io
+  name: simonswine
+- email: michael.haselton@gmail.com
+  name: icereval
+- email: pete.brown@powerhrg.com
+  name: rendhalver
+name: elasticsearch
+sources:
+- https://www.elastic.co/products/elasticsearch
+- https://github.com/jetstack/elasticsearch-pet
+- https://github.com/giantswarm/kubernetes-elastic-stack
+- https://github.com/GoogleCloudPlatform/elasticsearch-docker
+- https://github.com/clockworksoul/helm-elasticsearch
+- https://github.com/pires/kubernetes-elasticsearch-cluster
+version: 1.11.0
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/README.md b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/README.md
new file mode 100644 (file)
index 0000000..7d7345f
--- /dev/null
@@ -0,0 +1,220 @@
+# Elasticsearch Helm Chart
+
+This chart uses a standard Docker image of Elasticsearch (docker.elastic.co/elasticsearch/elasticsearch-oss) and uses a service pointing to the master's transport port for service discovery.
+Elasticsearch does not communicate with the Kubernetes API, hence no need for RBAC permissions.
+
+## Warning for previous users
+If you are currently using an earlier version of this Chart you will need to redeploy your Elasticsearch clusters. The discovery method used here is incompatible with using RBAC.
+If you are upgrading to Elasticsearch 6 from the 5.5 version used in this chart before, please note that your cluster needs to do a full cluster restart.
+The simplest way to do that is to delete the installation (keep the PVs) and install this chart again with the new version.
+If you want to avoid doing that upgrade to Elasticsearch 5.6 first before moving on to Elasticsearch 6.0.
+
+## Prerequisites Details
+
+* Kubernetes 1.6+
+* PV dynamic provisioning support on the underlying infrastructure
+
+## StatefulSets Details
+* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
+
+## StatefulSets Caveats
+* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#limitations
+
+## Todo
+
+* Implement TLS/Auth/Security
+* Smarter upscaling/downscaling
+* Solution for memory locking
+
+## Chart Details
+This chart will do the following:
+
+* Implemented a dynamically scalable elasticsearch cluster using Kubernetes StatefulSets/Deployments
+* Multi-role deployment: master, client (coordinating) and data nodes
+* Statefulset Supports scaling down without degrading the cluster
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```bash
+$ helm install --name my-release stable/elasticsearch
+```
+
+## Deleting the Charts
+
+Delete the Helm deployment as normal
+
+```
+$ helm delete my-release
+```
+
+Deletion of the StatefulSet doesn't cascade to deleting associated PVCs. To delete them:
+
+```
+$ kubectl delete pvc -l release=my-release,component=data
+```
+
+## Configuration
+
+The following table lists the configurable parameters of the elasticsearch chart and their default values.
+
+|              Parameter               |                             Description                             |                       Default                       |
+| ------------------------------------ | ------------------------------------------------------------------- | --------------------------------------------------- |
+| `appVersion`                         | Application Version (Elasticsearch)                                 | `6.4.2`                                             |
+| `image.repository`                   | Container image name                                                | `docker.elastic.co/elasticsearch/elasticsearch-oss` |
+| `image.tag`                          | Container image tag                                                 | `6.4.2`                                             |
+| `image.pullPolicy`                   | Container pull policy                                               | `IfNotPresent`                                      |
+| `initImage.repository`               | Init container image name                                           | `busybox`                                           |
+| `initImage.tag`                      | Init container image tag                                            | `latest`                                            |
+| `initImage.pullPolicy`               | Init container pull policy                                          | `Always`                                            |
+| `cluster.name`                       | Cluster name                                                        | `elasticsearch`                                     |
+| `cluster.xpackEnable`                | Writes the X-Pack configuration options to the configuration file   | `false`                                             |
+| `cluster.config`                     | Additional cluster config appended                                  | `{}`                                                |
+| `cluster.keystoreSecret`             | Name of secret holding secure config options in an es keystore      | `nil`                                               |
+| `cluster.env`                        | Cluster environment variables                                       | `{MINIMUM_MASTER_NODES: "2"}`                       |
+| `cluster.additionalJavaOpts`         | Cluster parameters to be added to `ES_JAVA_OPTS` environment variable | `""`                                              |
+| `client.name`                        | Client component name                                               | `client`                                            |
+| `client.replicas`                    | Client node replicas (deployment)                                   | `2`                                                 |
+| `client.resources`                   | Client node resources requests & limits                             | `{} - cpu limit must be an integer`                 |
+| `client.priorityClassName`           | Client priorityClass                                                | `nil`                                               |
+| `client.heapSize`                    | Client node heap size                                               | `512m`                                              |
+| `client.podAnnotations`              | Client Deployment annotations                                       | `{}`                                                |
+| `client.nodeSelector`                | Node labels for client pod assignment                               | `{}`                                                |
+| `client.tolerations`                 | Client tolerations                                                  | `[]`                                                |
+| `client.serviceAnnotations`          | Client Service annotations                                          | `{}`                                                |
+| `client.serviceType`                 | Client service type                                                 | `ClusterIP`                                         |
+| `client.loadBalancerIP`              | Client loadBalancerIP                                               | `{}`                                                |
+| `client.loadBalancerSourceRanges`    | Client loadBalancerSourceRanges                                     | `{}`                                                |
+| `client.antiAffinity`                | Client anti-affinity policy                                         | `soft`                                              |
+| `client.nodeAffinity`                | Client node affinity policy                                         | `{}`                                                |
+| `master.exposeHttp`                  | Expose http port 9200 on master Pods for monitoring, etc            | `false`                                             |
+| `master.name`                        | Master component name                                               | `master`                                            |
+| `master.replicas`                    | Master node replicas (deployment)                                   | `2`                                                 |
+| `master.resources`                   | Master node resources requests & limits                             | `{} - cpu limit must be an integer`                 |
+| `master.priorityClassName`           | Master priorityClass                                                | `nil`                                               |
+| `master.podAnnotations`              | Master Deployment annotations                                       | `{}`                                                |
+| `master.nodeSelector`                | Node labels for master pod assignment                               | `{}`                                                |
+| `master.tolerations`                 | Master tolerations                                                  | `[]`                                                |
+| `master.heapSize`                    | Master node heap size                                               | `512m`                                              |
+| `master.name`                        | Master component name                                               | `master`                                            |
+| `master.persistence.enabled`         | Master persistent enabled/disabled                                  | `true`                                              |
+| `master.persistence.name`            | Master statefulset PVC template name                                | `data`                                              |
+| `master.persistence.size`            | Master persistent volume size                                       | `4Gi`                                               |
+| `master.persistence.storageClass`    | Master persistent volume Class                                      | `nil`                                               |
+| `master.persistence.accessMode`      | Master persistent Access Mode                                       | `ReadWriteOnce`                                     |
+| `master.antiAffinity`                | Master anti-affinity policy                                         | `soft`                                              |
+| `master.nodeAffinity`                | Master node affinity policy                                         | `{}`                                                |
+| `data.exposeHttp`                    | Expose http port 9200 on data Pods for monitoring, etc              | `false`                                             |
+| `data.replicas`                      | Data node replicas (statefulset)                                    | `2`                                                 |
+| `data.resources`                     | Data node resources requests & limits                               | `{} - cpu limit must be an integer`                 |
+| `data.priorityClassName`             | Data priorityClass                                                  | `nil`                                               |
+| `data.heapSize`                      | Data node heap size                                                 | `1536m`                                             |
+| `data.persistence.enabled`           | Data persistent enabled/disabled                                    | `true`                                              |
+| `data.persistence.name`              | Data statefulset PVC template name                                  | `data`                                              |
+| `data.persistence.size`              | Data persistent volume size                                         | `30Gi`                                              |
+| `data.persistence.storageClass`      | Data persistent volume Class                                        | `nil`                                               |
+| `data.persistence.accessMode`        | Data persistent Access Mode                                         | `ReadWriteOnce`                                     |
+| `data.podAnnotations`                | Data StatefulSet annotations                                        | `{}`                                                |
+| `data.nodeSelector`                  | Node labels for data pod assignment                                 | `{}`                                                |
+| `data.tolerations`                   | Data tolerations                                                    | `[]`                                                |
+| `data.terminationGracePeriodSeconds` | Data termination grace period (seconds)                             | `3600`                                              |
+| `data.antiAffinity`                  | Data anti-affinity policy                                           | `soft`                                              |
+| `data.nodeAffinity`                  | Data node affinity policy                                           | `{}`                                                |
+| `extraInitContainers`                | Additional init container passed through the tpl                       | ``                                                  |
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
+
+In terms of Memory resources you should make sure that you follow that equation:
+
+- `${role}HeapSize < ${role}MemoryRequests < ${role}MemoryLimits`
+
+The YAML value of cluster.config is appended to elasticsearch.yml file for additional customization ("script.inline: on" for example to allow inline scripting)
+
+# Deep dive
+
+## Application Version
+
+This chart aims to support Elasticsearch v2 to v6 deployments by specifying the `values.yaml` parameter `appVersion`.
+
+### Version Specific Features
+
+* Memory Locking *(variable renamed)*
+* Ingest Node *(v5)*
+* X-Pack Plugin *(v5)*
+
+Upgrade paths & more info: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html
+
+## Mlocking
+
+This is a limitation in kubernetes right now. There is no way to raise the
+limits of lockable memory, so that these memory areas won't be swapped. This
+would degrade performance heavily. The issue is tracked in
+[kubernetes/#3595](https://github.com/kubernetes/kubernetes/issues/3595).
+
+```
+[WARN ][bootstrap] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory
+[WARN ][bootstrap] This can result in part of the JVM being swapped out.
+[WARN ][bootstrap] Increase RLIMIT_MEMLOCK, soft limit: 65536, hard limit: 65536
+```
+
+## Minimum Master Nodes
+> The minimum_master_nodes setting is extremely important to the stability of your cluster. This setting helps prevent split brains, the existence of two masters in a single cluster.
+
+>When you have a split brain, your cluster is at danger of losing data. Because the master is considered the supreme ruler of the cluster, it decides when new indices can be created, how shards are moved, and so forth. If you have two masters, data integrity becomes perilous, since you have two nodes that think they are in charge.
+
+>This setting tells Elasticsearch to not elect a master unless there are enough master-eligible nodes available. Only then will an election take place.
+
+>This setting should always be configured to a quorum (majority) of your master-eligible nodes. A quorum is (number of master-eligible nodes / 2) + 1
+
+More info: https://www.elastic.co/guide/en/elasticsearch/guide/1.x/_important_configuration_changes.html#_minimum_master_nodes
+
+# Client and Coordinating Nodes
+
+Elasticsearch v5 terminology has updated, and now refers to a `Client Node` as a `Coordinating Node`.
+
+More info: https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-node.html#coordinating-node
+
+## Enabling elasticsearch interal monitoring
+Requires version 6.3+ and standard non `oss` repository defined. Starting with 6.3 Xpack is partially free and enabled by default. You need to set a new config to enable the collection of these internal metrics. (https://www.elastic.co/guide/en/elasticsearch/reference/6.3/monitoring-settings.html)
+
+To do this through this helm chart override with the three following changes:
+```
+image.repository: docker.elastic.co/elasticsearch/elasticsearch
+cluster.xpackEnable: true
+cluster.env.XPACK_MONITORING_ENABLED: true
+```
+
+Note: to see these changes you will need to update your kibana repo to `image.repository: docker.elastic.co/kibana/kibana` instead of the `oss` version
+
+
+## Select right storage class for SSD volumes
+
+### GCE + Kubernetes 1.5
+
+Create StorageClass for SSD-PD
+
+```
+$ kubectl create -f - <<EOF
+kind: StorageClass
+apiVersion: extensions/v1beta1
+metadata:
+  name: ssd
+provisioner: kubernetes.io/gce-pd
+parameters:
+  type: pd-ssd
+EOF
+```
+Create cluster with Storage class `ssd` on Kubernetes 1.5+
+
+```
+$ helm install stable/elasticsearch --name my-release --set data.storageClass=ssd,data.storage=100Gi
+```
+
+### Usage of the `tpl` Function
+
+The `tpl` function allows us to pass string values from `values.yaml` through the templating engine. It is used for the following values:
+
+* `extraInitContainers`
+
+It is important that these values be configured as strings. Otherwise, installation will fail.
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/ci/extrainitcontainers-values.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/ci/extrainitcontainers-values.yaml
new file mode 100644 (file)
index 0000000..5ae6cf3
--- /dev/null
@@ -0,0 +1,9 @@
+extraInitContainers: |
+  - name: "plugin-install-ingest-attachment"
+    image: "akrainoenea/elasticsearch:6.4.0"
+    command: ["/bin/bash"]
+    args: ["-c", "yes | /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment"]
+  - name: "plugin-install-mapper-size"
+    image: "akrainoenea/elasticsearch:6.4.0"
+    command: ["/bin/bash"]
+    args: ["-c", "yes | /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-size"]
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..c38cbd6
--- /dev/null
@@ -0,0 +1,31 @@
+The elasticsearch cluster has been installed.
+
+Elasticsearch can be accessed:
+
+  * Within your cluster, at the following DNS name at port 9200:
+
+    {{ template "elasticsearch.client.fullname" . }}.{{ .Release.Namespace }}.svc
+
+  * From outside the cluster, run these commands in the same shell:
+    {{- if contains "NodePort" .Values.client.serviceType }}
+
+    export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "elasticsearch.client.fullname" . }})
+    export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+    echo http://$NODE_IP:$NODE_PORT
+    {{- else if contains "LoadBalancer" .Values.client.serviceType }}
+
+     WARNING: You have likely exposed your Elasticsearch cluster direct to the internet.
+              Elasticsearch does not implement any security for public facing clusters by default.
+              As a minimum level of security; switch to ClusterIP/NodePort and place an Nginx gateway infront of the cluster in order to lock down access to dangerous HTTP endpoints and verbs.
+
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ template "elasticsearch.client.fullname" . }}'
+
+    export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "elasticsearch.client.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+    echo http://$SERVICE_IP:9200
+    {{- else if contains "ClusterIP"  .Values.client.serviceType }}
+
+    export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "elasticsearch.name" . }},component={{ .Values.client.name }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+    echo "Visit http://127.0.0.1:9200 to use Elasticsearch"
+    kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 9200:9200
+    {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..100521c
--- /dev/null
@@ -0,0 +1,48 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "elasticsearch.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "elasticsearch.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified client name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "elasticsearch.client.fullname" -}}
+{{ template "elasticsearch.fullname" . }}-{{ .Values.client.name }}
+{{- end -}}
+
+{{/*
+Create a default fully qualified data name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "elasticsearch.data.fullname" -}}
+{{ template "elasticsearch.fullname" . }}-{{ .Values.data.name }}
+{{- end -}}
+
+{{/*
+Create a default fully qualified master name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "elasticsearch.master.fullname" -}}
+{{ template "elasticsearch.fullname" . }}-{{ .Values.master.name }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-deployment.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-deployment.yaml
new file mode 100644 (file)
index 0000000..23ff9ed
--- /dev/null
@@ -0,0 +1,153 @@
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.client.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.client.fullname" . }}
+spec:
+  replicas: {{ .Values.client.replicas }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "elasticsearch.name" . }}
+        component: "{{ .Values.client.name }}"
+        release: {{ .Release.Name }}
+        {{- if .Values.client.podAnnotations }}
+      annotations:
+{{ toYaml .Values.client.podAnnotations | indent 8 }}
+        {{- end }}
+    spec:
+{{- if .Values.client.priorityClassName }}
+      priorityClassName: "{{ .Values.client.priorityClassName }}"
+{{- end }}
+      securityContext:
+        fsGroup: 1000
+      {{- if or .Values.client.antiAffinity .Values.client.nodeAffinity }}
+      affinity:
+      {{- end }}
+      {{- if eq .Values.client.antiAffinity "hard" }}
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - topologyKey: "kubernetes.io/hostname"
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.client.name }}"
+      {{- else if eq .Values.client.antiAffinity "soft" }}
+        podAntiAffinity:
+          preferredDuringSchedulingIgnoredDuringExecution:
+          - weight: 1
+            podAffinityTerm:
+              topologyKey: kubernetes.io/hostname
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.client.name }}"
+      {{- end }}
+      {{- with .Values.client.nodeAffinity }}
+        nodeAffinity:
+{{ toYaml . | indent 10 }}
+      {{- end }}
+{{- if .Values.client.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.client.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.client.tolerations }}
+      tolerations:
+{{ toYaml .Values.client.tolerations | indent 8 }}
+{{- end }}
+      initContainers:
+      # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
+      # and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
+      - name: "sysctl"
+        image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
+        imagePullPolicy: {{ .Values.initImage.pullPolicy | quote }}
+        command: ["sysctl", "-w", "vm.max_map_count=262144"]
+        securityContext:
+          privileged: true
+{{- if .Values.extraInitContainers }}
+{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- end }}
+      containers:
+      - name: elasticsearch
+        env:
+        - name: NODE_DATA
+          value: "false"
+{{- if hasPrefix "5." .Values.appVersion }}
+        - name: NODE_INGEST
+          value: "false"
+{{- end }}
+        - name: NODE_MASTER
+          value: "false"
+        - name: DISCOVERY_SERVICE
+          value: {{ template "elasticsearch.fullname" . }}-discovery
+        - name: PROCESSORS
+          valueFrom:
+            resourceFieldRef:
+              resource: limits.cpu
+        - name: ES_JAVA_OPTS
+          value: "-Djava.net.preferIPv4Stack=true -Xms{{ .Values.client.heapSize }} -Xmx{{ .Values.client.heapSize }} {{ .Values.cluster.additionalJavaOpts }}"
+        {{- range $key, $value :=  .Values.cluster.env }}
+        - name: {{ $key }}
+          value: {{ $value | quote }}
+        {{- end }}
+        resources:
+{{ toYaml .Values.client.resources | indent 12 }}
+        readinessProbe:
+          httpGet:
+            path: /_cluster/health
+            port: 9200
+          initialDelaySeconds: 5
+        livenessProbe:
+          httpGet:
+            path: /_cluster/health?local=true
+            port: 9200
+          initialDelaySeconds: 90
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+        ports:
+        - containerPort: 9200
+          name: http
+        - containerPort: 9300
+          name: transport
+        volumeMounts:
+        - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
+          name: config
+          subPath: elasticsearch.yml
+{{- if hasPrefix "2." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/logging.yml
+          name: config
+          subPath: logging.yml
+{{- end }}
+{{- if hasPrefix "5." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/log4j2.properties
+          name: config
+          subPath: log4j2.properties
+{{- end }}
+{{- if .Values.cluster.keystoreSecret }}
+        - name: keystore
+          mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore"
+          subPath: elasticsearch.keystore
+          readOnly: true
+{{- end }}
+{{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+      {{- range $pullSecret := .Values.image.pullSecrets }}
+        - name: {{ $pullSecret }}
+      {{- end }}
+{{- end }}
+      volumes:
+      - name: config
+        configMap:
+          name: {{ template "elasticsearch.fullname" . }}
+{{- if .Values.cluster.keystoreSecret }}
+      - name: keystore
+        secret:
+          secretName: {{ .Values.cluster.keystoreSecret }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-pdb.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-pdb.yaml
new file mode 100644 (file)
index 0000000..ccb3f35
--- /dev/null
@@ -0,0 +1,24 @@
+{{- if .Values.client.podDisruptionBudget.enabled }}
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.client.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.client.fullname" . }}
+spec:
+{{- if .Values.client.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.client.podDisruptionBudget.minAvailable }}
+{{- end }}
+{{- if .Values.client.podDisruptionBudget.maxUnavailable }}
+  maxUnavailable: {{ .Values.client.podDisruptionBudget.maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+      app: {{ template "elasticsearch.name" . }}
+      component: "{{ .Values.client.name }}"
+      release: {{ .Release.Name }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-svc.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/client-svc.yaml
new file mode 100644 (file)
index 0000000..cbecce5
--- /dev/null
@@ -0,0 +1,34 @@
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.client.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.client.fullname" . }}
+{{- if .Values.client.serviceAnnotations }}
+  annotations:
+{{ toYaml .Values.client.serviceAnnotations | indent 4 }}
+{{- end }}
+
+spec:
+  ports:
+    - name: http
+      port: 9200
+      targetPort: http
+  selector:
+    app: {{ template "elasticsearch.name" . }}
+    component: "{{ .Values.client.name }}"
+    release: {{ .Release.Name }}
+  type: {{ .Values.client.serviceType }}
+{{- if .Values.client.loadBalancerIP }}
+  loadBalancerIP: "{{ .Values.client.loadBalancerIP }}"
+{{- end }}
+  {{if .Values.client.loadBalancerSourceRanges}}
+  loadBalancerSourceRanges:
+    {{range $rangeList := .Values.client.loadBalancerSourceRanges}}
+    - {{ $rangeList }}
+    {{end}}
+  {{end}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/configmap.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..df8fd49
--- /dev/null
@@ -0,0 +1,157 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "elasticsearch.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+data:
+  elasticsearch.yml: |-
+    cluster.name: {{ .Values.cluster.name }}
+
+    node.data: ${NODE_DATA:true}
+    node.master: ${NODE_MASTER:true}
+{{- if hasPrefix "5." .Values.appVersion }}
+    node.ingest: ${NODE_INGEST:true}
+{{- else if hasPrefix "6." .Values.appVersion }}
+    node.ingest: ${NODE_INGEST:true}
+{{- end }}
+    node.name: ${HOSTNAME}
+
+    network.host: 0.0.0.0
+
+{{- if hasPrefix "2." .Values.appVersion }}
+    # see https://github.com/kubernetes/kubernetes/issues/3595
+    bootstrap.mlockall: ${BOOTSTRAP_MLOCKALL:false}
+
+    discovery:
+      zen:
+        ping.unicast.hosts: ${DISCOVERY_SERVICE:}
+        minimum_master_nodes: ${MINIMUM_MASTER_NODES:2}
+{{- else if hasPrefix "5." .Values.appVersion }}
+    # see https://github.com/kubernetes/kubernetes/issues/3595
+    bootstrap.memory_lock: ${BOOTSTRAP_MEMORY_LOCK:false}
+
+    discovery:
+      zen:
+        ping.unicast.hosts: ${DISCOVERY_SERVICE:}
+        minimum_master_nodes: ${MINIMUM_MASTER_NODES:2}
+
+{{- if .Values.cluster.xpackEnable }}
+    # see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
+    xpack.ml.enabled: ${XPACK_ML_ENABLED:false}
+    xpack.monitoring.enabled: ${XPACK_MONITORING_ENABLED:false}
+    xpack.security.enabled: ${XPACK_SECURITY_ENABLED:false}
+    xpack.watcher.enabled: ${XPACK_WATCHER_ENABLED:false}
+{{- end }}
+{{- else if hasPrefix "6." .Values.appVersion }}
+    # see https://github.com/kubernetes/kubernetes/issues/3595
+    bootstrap.memory_lock: ${BOOTSTRAP_MEMORY_LOCK:false}
+
+    discovery:
+      zen:
+        ping.unicast.hosts: ${DISCOVERY_SERVICE:}
+        minimum_master_nodes: ${MINIMUM_MASTER_NODES:2}
+
+{{- if (.Values.cluster.xpackEnable) and .Values.appVersion gt 6.3  }}
+    # see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
+    # After 6.3 xpack systems changed and are enabled by default and different configs manage them this enables monitoring
+    xpack.monitoring.collection.enabled: ${XPACK_MONITORING_ENABLED:false}
+{{- else if .Values.cluster.xpackEnable }}
+    # see https://www.elastic.co/guide/en/x-pack/current/xpack-settings.html
+    xpack.ml.enabled: ${XPACK_ML_ENABLED:false}
+    xpack.monitoring.enabled: ${XPACK_MONITORING_ENABLED:false}
+    xpack.security.enabled: ${XPACK_SECURITY_ENABLED:false}
+    xpack.watcher.enabled: ${XPACK_WATCHER_ENABLED:false}
+{{- end }}
+{{- end }}
+
+    # see https://github.com/elastic/elasticsearch-definitive-guide/pull/679
+    processors: ${PROCESSORS:}
+
+    # avoid split-brain w/ a minimum consensus of two masters plus a data node
+    gateway.expected_master_nodes: ${EXPECTED_MASTER_NODES:2}
+    gateway.expected_data_nodes: ${EXPECTED_DATA_NODES:1}
+    gateway.recover_after_time: ${RECOVER_AFTER_TIME:5m}
+    gateway.recover_after_master_nodes: ${RECOVER_AFTER_MASTER_NODES:2}
+    gateway.recover_after_data_nodes: ${RECOVER_AFTER_DATA_NODES:1}
+{{- with .Values.cluster.config }}
+{{ toYaml . | indent 4 }}
+{{- end }}
+{{- if hasPrefix "2." .Values.image.tag }}
+  logging.yml: |-
+    # you can override this using by setting a system property, for example -Des.logger.level=DEBUG
+    es.logger.level: INFO
+    rootLogger: ${es.logger.level}, console
+    logger:
+      # log action execution errors for easier debugging
+      action: DEBUG
+      # reduce the logging for aws, too much is logged under the default INFO
+      com.amazonaws: WARN
+    appender:
+      console:
+        type: console
+        layout:
+          type: consolePattern
+          conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
+{{- else if hasPrefix "5." .Values.image.tag }}
+  log4j2.properties: |-
+    status = error
+    appender.console.type = Console
+    appender.console.name = console
+    appender.console.layout.type = PatternLayout
+    appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
+    rootLogger.level = info
+    rootLogger.appenderRef.console.ref = console
+    logger.searchguard.name = com.floragunn
+    logger.searchguard.level = info
+{{- else if hasPrefix "6." .Values.image.tag }}
+  log4j2.properties: |-
+    status = error
+    appender.console.type = Console
+    appender.console.name = console
+    appender.console.layout.type = PatternLayout
+    appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n
+    rootLogger.level = info
+    rootLogger.appenderRef.console.ref = console
+    logger.searchguard.name = com.floragunn
+    logger.searchguard.level = info
+{{- end }}
+  pre-stop-hook.sh: |-
+    #!/bin/bash
+    exec &> >(tee -a "/var/log/elasticsearch-hooks.log")
+    NODE_NAME=${HOSTNAME}
+    echo "Prepare to migrate data of the node ${NODE_NAME}"
+    echo "Move all data from node ${NODE_NAME}"
+    curl -s -XPUT -H 'Content-Type: application/json' '{{ template "elasticsearch.client.fullname" . }}:9200/_cluster/settings' -d "{
+      \"transient\" :{
+          \"cluster.routing.allocation.exclude._name\" : \"${NODE_NAME}\"
+      }
+    }"
+    echo ""
+
+    while true ; do
+      echo -e "Wait for node ${NODE_NAME} to become empty"
+      SHARDS_ALLOCATION=$(curl -s -XGET 'http://{{ template "elasticsearch.client.fullname" . }}:9200/_cat/shards')
+      if ! echo "${SHARDS_ALLOCATION}" | grep -E "${NODE_NAME}"; then
+        break
+      fi
+      sleep 1
+    done
+    echo "Node ${NODE_NAME} is ready to shutdown"
+  post-start-hook.sh: |-
+    #!/bin/bash
+    exec &> >(tee -a "/var/log/elasticsearch-hooks.log")
+    NODE_NAME=${HOSTNAME}
+    CLUSTER_SETTINGS=$(curl -s -XGET "http://{{ template "elasticsearch.client.fullname" . }}:9200/_cluster/settings")
+    if echo "${CLUSTER_SETTINGS}" | grep -E "${NODE_NAME}"; then
+      echo "Activate node ${NODE_NAME}"
+      curl -s -XPUT -H 'Content-Type: application/json' "http://{{ template "elasticsearch.client.fullname" . }}:9200/_cluster/settings" -d "{
+        \"transient\" :{
+            \"cluster.routing.allocation.exclude._name\" : null
+        }
+      }"
+    fi
+    echo "Node ${NODE_NAME} is ready to be used"
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-pdb.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-pdb.yaml
new file mode 100644 (file)
index 0000000..54e91c7
--- /dev/null
@@ -0,0 +1,24 @@
+{{- if .Values.data.podDisruptionBudget.enabled }}
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.data.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.data.fullname" . }}
+spec:
+{{- if .Values.data.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.data.podDisruptionBudget.minAvailable }}
+{{- end }}
+{{- if .Values.data.podDisruptionBudget.maxUnavailable }}
+  maxUnavailable: {{ .Values.data.podDisruptionBudget.maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+      app: {{ template "elasticsearch.name" . }}
+      component: "{{ .Values.data.name }}"
+      release: {{ .Release.Name }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-statefulset.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/data-statefulset.yaml
new file mode 100644 (file)
index 0000000..d7ae76d
--- /dev/null
@@ -0,0 +1,198 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.data.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.data.fullname" . }}
+spec:
+  serviceName: {{ template "elasticsearch.data.fullname" . }}
+  replicas: {{ .Values.data.replicas }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "elasticsearch.name" . }}
+        component: "{{ .Values.data.name }}"
+        release: {{ .Release.Name }}
+        {{- if .Values.data.podAnnotations }}
+      annotations:
+{{ toYaml .Values.data.podAnnotations | indent 8 }}
+        {{- end }}
+    spec:
+{{- if .Values.data.priorityClassName }}
+      priorityClassName: "{{ .Values.data.priorityClassName }}"
+{{- end }}
+      securityContext:
+        fsGroup: 1000
+      {{- if or .Values.data.antiAffinity .Values.data.nodeAffinity }}
+      affinity:
+      {{- end }}
+      {{- if eq .Values.data.antiAffinity "hard" }}
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - topologyKey: "kubernetes.io/hostname"
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.data.name }}"
+      {{- else if eq .Values.data.antiAffinity "soft" }}
+        podAntiAffinity:
+          preferredDuringSchedulingIgnoredDuringExecution:
+          - weight: 1
+            podAffinityTerm:
+              topologyKey: kubernetes.io/hostname
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.data.name }}"
+      {{- end }}
+      {{- with .Values.data.nodeAffinity }}
+        nodeAffinity:
+{{ toYaml . | indent 10 }}
+      {{- end }}
+{{- if .Values.data.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.data.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.data.tolerations }}
+      tolerations:
+{{ toYaml .Values.data.tolerations | indent 8 }}
+{{- end }}
+      initContainers:
+      # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
+      # and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
+      - name: "sysctl"
+        image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
+        imagePullPolicy: {{ .Values.initImage.pullPolicy | quote }}
+        command: ["sysctl", "-w", "vm.max_map_count=262144"]
+        securityContext:
+          privileged: true
+      - name: "chown"
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+        command:
+        - /bin/bash
+        - -c
+        - chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data &&
+          chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/logs
+        securityContext:
+          runAsUser: 0
+        volumeMounts:
+        - mountPath: /usr/share/elasticsearch/data
+          name: data
+{{- if .Values.extraInitContainers }}
+{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- end }}
+      containers:
+      - name: elasticsearch
+        env:
+        - name: DISCOVERY_SERVICE
+          value: {{ template "elasticsearch.fullname" . }}-discovery
+        - name: NODE_MASTER
+          value: "false"
+        - name: PROCESSORS
+          valueFrom:
+            resourceFieldRef:
+              resource: limits.cpu
+        - name: ES_JAVA_OPTS
+          value: "-Djava.net.preferIPv4Stack=true -Xms{{ .Values.data.heapSize }} -Xmx{{ .Values.data.heapSize }} {{ .Values.cluster.additionalJavaOpts }}"
+        {{- range $key, $value :=  .Values.cluster.env }}
+        - name: {{ $key }}
+          value: {{ $value | quote }}
+        {{- end }}
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+        ports:
+        - containerPort: 9300
+          name: transport
+{{ if .Values.data.exposeHttp }}
+        - containerPort: 9200
+          name: http
+{{ end }}
+        resources:
+{{ toYaml .Values.data.resources | indent 12 }}
+        readinessProbe:
+          httpGet:
+            path: /_cluster/health?local=true
+            port: 9200
+          initialDelaySeconds: 5
+        volumeMounts:
+        - mountPath: /usr/share/elasticsearch/data
+          name: data
+        - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
+          name: config
+          subPath: elasticsearch.yml
+{{- if hasPrefix "2." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/logging.yml
+          name: config
+          subPath: logging.yml
+{{- end }}
+{{- if hasPrefix "5." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/log4j2.properties
+          name: config
+          subPath: log4j2.properties
+{{- end }}
+        - name: config
+          mountPath: /pre-stop-hook.sh
+          subPath: pre-stop-hook.sh
+        - name: config
+          mountPath: /post-start-hook.sh
+          subPath: post-start-hook.sh
+{{- if .Values.cluster.keystoreSecret }}
+        - name: keystore
+          mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore"
+          subPath: elasticsearch.keystore
+          readOnly: true
+{{- end }}
+        lifecycle:
+          preStop:
+            exec:
+              command: ["/bin/bash","/pre-stop-hook.sh"]
+          postStart:
+            exec:
+              command: ["/bin/bash","/post-start-hook.sh"]
+      terminationGracePeriodSeconds: {{ .Values.data.terminationGracePeriodSeconds }}
+{{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+      {{- range $pullSecret := .Values.image.pullSecrets }}
+        - name: {{ $pullSecret }}
+      {{- end }}
+{{- end }}
+      volumes:
+      - name: config
+        configMap:
+          name: {{ template "elasticsearch.fullname" . }}
+{{- if .Values.cluster.keystoreSecret }}
+      - name: keystore
+        secret:
+          secretName: {{ .Values.cluster.keystoreSecret }}
+{{- end }}
+  {{- if not .Values.data.persistence.enabled }}
+      - name: data
+        emptyDir: {}
+  {{- end }}
+  updateStrategy:
+    type: {{ .Values.data.updateStrategy.type }}
+  {{- if .Values.data.persistence.enabled }}
+  volumeClaimTemplates:
+  - metadata:
+      name: {{ .Values.data.persistence.name }}
+    spec:
+      accessModes:
+        - {{ .Values.data.persistence.accessMode | quote }}
+    {{- if .Values.data.persistence.storageClass }}
+    {{- if (eq "-" .Values.data.persistence.storageClass) }}
+      storageClassName: ""
+    {{- else }}
+      storageClassName: "{{ .Values.data.persistence.storageClass }}"
+    {{- end }}
+    {{- end }}
+      resources:
+        requests:
+          storage: "{{ .Values.data.persistence.size }}"
+  {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-pdb.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-pdb.yaml
new file mode 100644 (file)
index 0000000..c3efe83
--- /dev/null
@@ -0,0 +1,24 @@
+{{- if .Values.master.podDisruptionBudget.enabled }}
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.master.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.master.fullname" . }}
+spec:
+{{- if .Values.master.podDisruptionBudget.minAvailable }}
+  minAvailable: {{ .Values.master.podDisruptionBudget.minAvailable }}
+{{- end }}
+{{- if .Values.master.podDisruptionBudget.maxUnavailable }}
+  maxUnavailable: {{ .Values.master.podDisruptionBudget.maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+      app: {{ template "elasticsearch.name" . }}
+      component: "{{ .Values.master.name }}"
+      release: {{ .Release.Name }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-statefulset.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-statefulset.yaml
new file mode 100644 (file)
index 0000000..6530b00
--- /dev/null
@@ -0,0 +1,188 @@
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.master.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.master.fullname" . }}
+spec:
+  serviceName: {{ template "elasticsearch.master.fullname" . }}
+  replicas: {{ .Values.master.replicas }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "elasticsearch.name" . }}
+        component: "{{ .Values.master.name }}"
+        release: {{ .Release.Name }}
+        {{- if .Values.master.podAnnotations }}
+      annotations:
+{{ toYaml .Values.master.podAnnotations | indent 8 }}
+        {{- end }}
+    spec:
+{{- if .Values.master.priorityClassName }}
+      priorityClassName: "{{ .Values.master.priorityClassName }}"
+{{- end }}
+      securityContext:
+        fsGroup: 1000
+      {{- if or .Values.master.antiAffinity .Values.master.nodeAffinity }}
+      affinity:
+      {{- end }}
+      {{- if eq .Values.master.antiAffinity "hard" }}
+        podAntiAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            - topologyKey: "kubernetes.io/hostname"
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.master.name }}"
+      {{- else if eq .Values.master.antiAffinity "soft" }}
+        podAntiAffinity:
+          preferredDuringSchedulingIgnoredDuringExecution:
+          - weight: 1
+            podAffinityTerm:
+              topologyKey: kubernetes.io/hostname
+              labelSelector:
+                matchLabels:
+                  app: "{{ template "elasticsearch.name" . }}"
+                  release: "{{ .Release.Name }}"
+                  component: "{{ .Values.master.name }}"
+      {{- end }}
+      {{- with .Values.master.nodeAffinity }}
+        nodeAffinity:
+{{ toYaml . | indent 10 }}
+      {{- end }}
+{{- if .Values.master.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.master.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.master.tolerations }}
+      tolerations:
+{{ toYaml .Values.master.tolerations | indent 8 }}
+{{- end }}
+      initContainers:
+      # see https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html
+      # and https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration-memory.html#mlockall
+      - name: "sysctl"
+        image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}"
+        imagePullPolicy: {{ .Values.initImage.pullPolicy | quote }}
+        command: ["sysctl", "-w", "vm.max_map_count=262144"]
+        securityContext:
+          privileged: true
+      - name: "chown"
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+        command:
+        - /bin/bash
+        - -c
+        - chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data &&
+          chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/logs
+        securityContext:
+          runAsUser: 0
+        volumeMounts:
+        - mountPath: /usr/share/elasticsearch/data
+          name: data
+{{- if .Values.extraInitContainers }}
+{{ tpl .Values.extraInitContainers . | indent 6 }}
+{{- end }}
+      containers:
+      - name: elasticsearch
+        env:
+        - name: NODE_DATA
+          value: "false"
+{{- if hasPrefix "5." .Values.appVersion }}
+        - name: NODE_INGEST
+          value: "false"
+{{- end }}
+        - name: DISCOVERY_SERVICE
+          value: {{ template "elasticsearch.fullname" . }}-discovery
+        - name: PROCESSORS
+          valueFrom:
+            resourceFieldRef:
+              resource: limits.cpu
+        - name: ES_JAVA_OPTS
+          value: "-Djava.net.preferIPv4Stack=true -Xms{{ .Values.master.heapSize }} -Xmx{{ .Values.master.heapSize }} {{ .Values.cluster.additionalJavaOpts }}"
+        {{- range $key, $value :=  .Values.cluster.env }}
+        - name: {{ $key }}
+          value: {{ $value | quote }}
+        {{- end }}
+        resources:
+{{ toYaml .Values.master.resources | indent 12 }}
+        readinessProbe:
+          httpGet:
+            path: /_cluster/health?local=true
+            port: 9200
+          initialDelaySeconds: 5
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+        ports:
+        - containerPort: 9300
+          name: transport
+{{ if .Values.master.exposeHttp }}
+        - containerPort: 9200
+          name: http
+{{ end }}
+        volumeMounts:
+        - mountPath: /usr/share/elasticsearch/data
+          name: data
+        - mountPath: /usr/share/elasticsearch/config/elasticsearch.yml
+          name: config
+          subPath: elasticsearch.yml
+{{- if hasPrefix "2." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/logging.yml
+          name: config
+          subPath: logging.yml
+{{- end }}
+{{- if hasPrefix "5." .Values.image.tag }}
+        - mountPath: /usr/share/elasticsearch/config/log4j2.properties
+          name: config
+          subPath: log4j2.properties
+{{- end }}
+{{- if .Values.cluster.keystoreSecret }}
+        - name: keystore
+          mountPath: "/usr/share/elasticsearch/config/elasticsearch.keystore"
+          subPath: elasticsearch.keystore
+          readOnly: true
+{{- end }}
+{{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+      {{- range $pullSecret := .Values.image.pullSecrets }}
+        - name: {{ $pullSecret }}
+      {{- end }}
+{{- end }}
+      volumes:
+      - name: config
+        configMap:
+          name: {{ template "elasticsearch.fullname" . }}
+{{- if .Values.cluster.keystoreSecret }}
+      - name: keystore
+        secret:
+          secretName: {{ .Values.cluster.keystoreSecret }}
+{{- end }}
+  {{- if not .Values.master.persistence.enabled }}
+      - name: data
+        emptyDir: {}
+  {{- end }}
+  updateStrategy:
+    type: {{ .Values.master.updateStrategy.type }}
+  {{- if .Values.master.persistence.enabled }}
+  volumeClaimTemplates:
+  - metadata:
+      name: {{ .Values.master.persistence.name }}
+    spec:
+      accessModes:
+        - {{ .Values.master.persistence.accessMode | quote }}
+    {{- if .Values.master.persistence.storageClass }}
+    {{- if (eq "-" .Values.master.persistence.storageClass) }}
+      storageClassName: ""
+    {{- else }}
+      storageClassName: "{{ .Values.master.persistence.storageClass }}"
+    {{- end }}
+    {{- end }}
+      resources:
+        requests:
+          storage: "{{ .Values.master.persistence.size }}"
+  {{ end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-svc.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/templates/master-svc.yaml
new file mode 100644 (file)
index 0000000..5db28b7
--- /dev/null
@@ -0,0 +1,19 @@
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: {{ template "elasticsearch.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.master.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "elasticsearch.fullname" . }}-discovery
+spec:
+  clusterIP: None
+  ports:
+    - port: 9300
+      targetPort: transport
+  selector:
+    app: {{ template "elasticsearch.name" . }}
+    component: "{{ .Values.master.name }}"
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/values.yaml b/src/seba_charts/cord-platform/charts/logging/charts/elasticsearch/values.yaml
new file mode 100644 (file)
index 0000000..1cafe19
--- /dev/null
@@ -0,0 +1,134 @@
+# Default values for elasticsearch.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+appVersion: "6.4.2"
+
+image:
+  repository: "akrainoenea/elasticsearch-oss"
+  tag: "6.4.2"
+  pullPolicy: "IfNotPresent"
+  # If specified, use these secrets to access the image
+  # pullSecrets:
+  #   - registry-secret
+
+initImage:
+  repository: "busybox"
+  tag: "latest"
+  pullPolicy: "Always"
+
+cluster:
+  name: "elasticsearch"
+  # If you want X-Pack installed, switch to an image that includes it, enable this option and toggle the features you want
+  # enabled in the environment variables outlined in the README
+  xpackEnable: false
+  # Some settings must be placed in a keystore, so they need to be mounted in from a secret.
+  # Use this setting to specify the name of the secret
+  # keystoreSecret: eskeystore
+  config: {}
+  # Custom parameters, as string, to be added to ES_JAVA_OPTS environment variable
+  additionalJavaOpts: ""
+  env:
+    # IMPORTANT: https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#minimum_master_nodes
+    # To prevent data loss, it is vital to configure the discovery.zen.minimum_master_nodes setting so that each master-eligible
+    # node knows the minimum number of master-eligible nodes that must be visible in order to form a cluster.
+    MINIMUM_MASTER_NODES: "2"
+
+client:
+  name: client
+  replicas: 2
+  serviceType: ClusterIP
+  loadBalancerIP: {}
+  loadBalancerSourceRanges: {}
+## (dict) If specified, apply these annotations to the client service
+#  serviceAnnotations:
+#    example: client-svc-foo
+  heapSize: "512m"
+  antiAffinity: "soft"
+  nodeAffinity: {}
+  nodeSelector: {}
+  tolerations: []
+  resources:
+    limits:
+      cpu: "1"
+      # memory: "1024Mi"
+    requests:
+      cpu: "25m"
+      memory: "512Mi"
+  priorityClassName: ""
+  ## (dict) If specified, apply these annotations to each client Pod
+  # podAnnotations:
+  #   example: client-foo
+  podDisruptionBudget:
+    enabled: false
+    minAvailable: 1
+    # maxUnavailable: 1
+
+master:
+  name: master
+  exposeHttp: false
+  replicas: 3
+  heapSize: "512m"
+  persistence:
+    enabled: true
+    accessMode: ReadWriteOnce
+    name: data
+    size: "4Gi"
+    # storageClass: "ssd"
+  antiAffinity: "soft"
+  nodeAffinity: {}
+  nodeSelector: {}
+  tolerations: []
+  resources:
+    limits:
+      cpu: "1"
+      # memory: "1024Mi"
+    requests:
+      cpu: "25m"
+      memory: "512Mi"
+  priorityClassName: ""
+  ## (dict) If specified, apply these annotations to each master Pod
+  # podAnnotations:
+  #   example: master-foo
+  podDisruptionBudget:
+    enabled: false
+    minAvailable: 2  # Same as `cluster.env.MINIMUM_MASTER_NODES`
+    # maxUnavailable: 1
+  updateStrategy:
+    type: OnDelete
+
+data:
+  name: data
+  exposeHttp: false
+  replicas: 2
+  heapSize: "1536m"
+  persistence:
+    enabled: true
+    accessMode: ReadWriteOnce
+    name: data
+    size: "30Gi"
+    # storageClass: "ssd"
+  terminationGracePeriodSeconds: 3600
+  antiAffinity: "soft"
+  nodeAffinity: {}
+  nodeSelector: {}
+  tolerations: []
+  resources:
+    limits:
+      cpu: "1"
+      # memory: "2048Mi"
+    requests:
+      cpu: "25m"
+      memory: "1536Mi"
+  priorityClassName: ""
+  ## (dict) If specified, apply these annotations to each data Pod
+  # podAnnotations:
+  #   example: data-foo
+  podDisruptionBudget:
+    enabled: false
+    # minAvailable: 1
+    maxUnavailable: 1
+  updateStrategy:
+    type: OnDelete
+
+## Additional init containers
+extraInitContainers: |
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/Chart.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/Chart.yaml
new file mode 100644 (file)
index 0000000..a0c8388
--- /dev/null
@@ -0,0 +1,21 @@
+appVersion: 2.3.1
+description: A Fluentd Helm chart for Kubernetes with Elasticsearch output
+engine: gotpl
+home: https://www.fluentd.org/
+icon: https://raw.githubusercontent.com/fluent/fluentd-docs/master/public/logo/Fluentd_square.png
+keywords:
+- fluentd
+- elasticsearch
+- multiline
+- detect-exceptions
+- logging
+maintainers:
+- email: monotek23@gmail.com
+  name: monotek
+name: fluentd-elasticsearch
+sources:
+- https://github.com/kubernetes/charts/stable/fluentd-elasticsearch
+- https://github.com/fluent/fluentd-kubernetes-daemonset
+- https://github.com/GoogleCloudPlatform/fluent-plugin-detect-exceptions
+- https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch/fluentd-es-image
+version: 1.0.3
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/OWNERS b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/OWNERS
new file mode 100644 (file)
index 0000000..9375c95
--- /dev/null
@@ -0,0 +1,4 @@
+approvers:
+- monotek
+reviewers:
+- monotek
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/README.md b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/README.md
new file mode 100644 (file)
index 0000000..a3676b4
--- /dev/null
@@ -0,0 +1,82 @@
+# Fluentd Elasticsearch
+
+* Installs [Fluentd](https://www.fluentd.org/) log forwarder.
+
+## TL;DR;
+
+```console
+$ helm install stable/fluentd-elasticsearch
+```
+
+## Introduction
+
+This chart bootstraps a [Fluentd](https://www.fluentd.org/) daemonset on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+It's meant to be a drop in replacement for fluentd-gcp on GKE which sends logs to Google's Stackdriver service, but can also be used in other places where logging to ElasticSearch is required.
+The used Docker image also contains Google's detect exceptions (for Java multiline stacktraces), Prometheus exporter, Kubernetes metadata filter & Systemd plugins.
+
+## Prerequisites
+
+- Kubernetes 1.8+ with Beta APIs enabled
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm install --name my-release stable/fluentd-elasticsearch
+```
+
+The command deploys fluentd-elasticsearch on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` deployment:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release.
+
+## Configuration
+
+The following table lists the configurable parameters of the Fluentd elasticsearch chart and their default values.
+
+
+| Parameter                          | Description                                | Default                                                    |
+| ---------------------------------- | ------------------------------------------ | ---------------------------------------------------------- |
+| `annotations`                      | Optional daemonset annotations             | `NULL`                                                     |
+| `configMaps`                       | Fluentd configmaps                         | `default conf files`                                       |
+| `elasticsearch.host`               | Elstaicsearch Host                         | `elasticsearch-client`                                     |
+| `elasticsearch.port`               | Elasticsearch Port                         | `9200`                                                     |
+| `elasticsearch.buffer_chunk_limit` | Elasticsearch buffer chunk limit           | `2M`                                                       |
+| `elasticsearch.buffer_queue_limit` | Elasticsearch buffer queue limit           | `8`                                                        |
+| `extraVolumeMounts`                | Mount an extra volume, required to mount ssl certificates when elasticsearch has tls enabled |          |
+| `extraVolume`                      | Extra volume                               |                                                            |
+| `image.repository`                 | Image                                      | `gcr.io/google-containers/fluentd-elasticsearch`           |
+| `image.tag`                        | Image tag                                  | `v2.3.1`                                                   |
+| `image.pullPolicy`                 | Image pull policy                          | `IfNotPresent`                                             |
+| `rbac.create`                      | RBAC                                       | `true`                                                     |
+| `resources.limits.cpu`             | CPU limit                                  | `100m`                                                     |
+| `resources.limits.memory`          | Memory limit                               | `500Mi`                                                    |
+| `resources.requests.cpu`           | CPU request                                | `100m`                                                     |
+| `resources.requests.memory`        | Memory request                             | `200Mi`                                                    |
+| `service`                          | Service definition                         | `{}`                                                       |
+| `serviceAccount.create`            | Specifies whether a service account should be created.| `true`                                          |
+| `serviceAccount.name`              | Name of the service account.               |                                                            |   
+| `livenessProbe.enabled`            | Whether to enable livenessProbe             | `true`                                                    |   
+| `tolerations`                      | Optional daemonset tolerations             | `NULL`                                                     |
+
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+$ helm install --name my-release \
+    stable/fluentd-elasticsearch
+```
+
+Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install --name my-release -f values.yaml stable/fluentd-elasticsearch
+```
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..d0cf765
--- /dev/null
@@ -0,0 +1,6 @@
+To verify that Fluentd has started, run:
+
+  kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "fluentd-elasticsearch.name" . }},release={{ .Release.Name }}"
+
+THIS APPLICATION CAPTURES ALL CONSOLE OUTPUT AND FORWARDS IT TO elasticsearch . Anything that might be identifying,
+including things like IP addresses, container images, and object names will NOT be anonymized.
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..46b56b9
--- /dev/null
@@ -0,0 +1,27 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "fluentd-elasticsearch.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "fluentd-elasticsearch.fullname" -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "fluentd-elasticsearch.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "fluentd-elasticsearch.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrole.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrole.yaml
new file mode 100644 (file)
index 0000000..10eaa8d
--- /dev/null
@@ -0,0 +1,23 @@
+{{- if .Values.rbac.create -}}
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.name" . }}
+    kubernetes.io/cluster-service: "true"
+    addonmanager.kubernetes.io/mode: Reconcile
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+rules:
+- apiGroups:
+  - ""
+  resources:
+  - "namespaces"
+  - "pods"
+  verbs:
+  - "get"
+  - "watch"
+  - "list"
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrolebinding.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/clusterrolebinding.yaml
new file mode 100644 (file)
index 0000000..ac5ba23
--- /dev/null
@@ -0,0 +1,21 @@
+{{- if .Values.rbac.create -}}
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.name" . }}
+    kubernetes.io/cluster-service: "true"
+    addonmanager.kubernetes.io/mode: Reconcile
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+subjects:
+- kind: ServiceAccount
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  namespace: {{ .Release.Namespace }}
+roleRef:
+  kind: ClusterRole
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  apiGroup: rbac.authorization.k8s.io
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/configmap.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..6fc1a19
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service | quote }}
+    release: {{ .Release.Name | quote }}
+    addonmanager.kubernetes.io/mode: Reconcile
+data:
+{{- range $key, $value := .Values.configMaps }}
+  {{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/daemonset.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/daemonset.yaml
new file mode 100644 (file)
index 0000000..62f02fe
--- /dev/null
@@ -0,0 +1,134 @@
+apiVersion: apps/v1beta2
+kind: DaemonSet
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.fullname" . }}
+    version: {{ .Values.image.tag }}
+    kubernetes.io/cluster-service: "true"
+    addonmanager.kubernetes.io/mode: Reconcile
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: "{{ .Release.Service }}"
+    release: "{{ .Release.Name }}"
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "fluentd-elasticsearch.fullname" . }}
+      release: "{{ .Release.Name }}"
+  template:
+    metadata:
+      labels:
+        app: {{ template "fluentd-elasticsearch.fullname" . }}
+        version: {{ .Values.image.tag }}
+        chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+        heritage: "{{ .Release.Service }}"
+        kubernetes.io/cluster-service: "true"
+        version: {{ .Values.image.tag }}
+        release: "{{ .Release.Name }}"
+      # This annotation ensures that fluentd does not get evicted if the node
+      # supports critical pod annotation based priority scheme.
+      # Note that this does not guarantee admission on the nodes (#40573).
+      annotations:
+        scheduler.alpha.kubernetes.io/critical-pod: ''
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+{{- if .Values.annotations }}
+{{ toYaml .Values.annotations | indent 8 }}
+{{- end }}
+    spec:
+      serviceAccountName: {{ template "fluentd-elasticsearch.fullname" . }}
+      containers:
+      - name: {{ template "fluentd-elasticsearch.fullname" . }}
+        image:  "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
+        env:
+        - name: FLUENTD_ARGS
+          value: --no-supervisor -q
+        - name: OUTPUT_HOST
+          value: {{ .Values.elasticsearch.host | quote }}
+        - name: OUTPUT_PORT
+          value: {{ .Values.elasticsearch.port | quote }}
+        - name: OUTPUT_BUFFER_CHUNK_LIMIT
+          value: {{ .Values.elasticsearch.buffer_chunk_limit | quote }}
+        - name: OUTPUT_BUFFER_QUEUE_LIMIT
+          value: {{ .Values.elasticsearch.buffer_queue_limit | quote }}
+        - name: K8S_NODE_NAME
+          valueFrom:
+            fieldRef:
+              fieldPath: spec.nodeName
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+        volumeMounts:
+        - name: varlog
+          mountPath: /var/log
+        - name: varlibdockercontainers
+          mountPath: /var/lib/docker/containers
+          readOnly: true
+        - name: libsystemddir
+          mountPath: /host/lib
+          readOnly: true
+        - name: config-volume-{{ template "fluentd-elasticsearch.fullname" . }}
+          mountPath: /etc/fluent/config.d
+{{- if .Values.extraVolumeMounts }}
+{{ toYaml .Values.extraVolumeMounts | indent 8 }}
+{{- end }}
+        ports:          
+{{- range $port := .Values.service.ports }}
+          - name: {{ $port.name }}
+            containerPort: {{ $port.port }}
+{{- end }}          
+{{- if .Values.livenessProbe.enabled }}       
+        # Liveness probe is aimed to help in situarions where fluentd
+        # silently hangs for no apparent reasons until manual restart.
+        # The idea of this probe is that if fluentd is not queueing or
+        # flushing chunks for 5 minutes, something is not right. If
+        # you want to change the fluentd configuration, reducing amount of
+        # logs fluentd collects, consider changing the threshold or turning
+        # liveness probe off completely.
+        livenessProbe:
+          initialDelaySeconds: 600
+          periodSeconds: 60
+          exec:
+            command:
+            - '/bin/sh'
+            - '-c'
+            - >
+              LIVENESS_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-300};
+              STUCK_THRESHOLD_SECONDS=${LIVENESS_THRESHOLD_SECONDS:-900};
+              if [ ! -e /var/log/fluentd-buffers ];
+              then
+                exit 1;
+              fi;
+              touch -d "${STUCK_THRESHOLD_SECONDS} seconds ago" /tmp/marker-stuck;
+              if [[ -z "$(find /var/log/fluentd-buffers -type f -newer /tmp/marker-stuck -print -quit)" ]];
+              then
+                rm -rf /var/log/fluentd-buffers;
+                exit 1;
+              fi;
+              touch -d "${LIVENESS_THRESHOLD_SECONDS} seconds ago" /tmp/marker-liveness;
+              if [[ -z "$(find /var/log/fluentd-buffers -type f -newer /tmp/marker-liveness -print -quit)" ]];
+              then
+                exit 1;
+              fi;
+{{- end }}              
+      terminationGracePeriodSeconds: 30
+      volumes:
+      - name: varlog
+        hostPath:
+          path: /var/log
+      - name: varlibdockercontainers
+        hostPath:
+          path: /var/lib/docker/containers
+      # It is needed to copy systemd library to decompress journals
+      - name: libsystemddir
+        hostPath:
+          path: /usr/lib64
+      - name: config-volume-{{ template "fluentd-elasticsearch.fullname" . }}
+        configMap:
+          name: {{ template "fluentd-elasticsearch.fullname" . }}
+{{- if .Values.extraVolumes }}
+{{ toYaml .Values.extraVolumes | indent 6 }}
+{{- end }}
+{{- if .Values.tolerations }}
+      tolerations:
+{{ toYaml .Values.tolerations | indent 6 }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service-account.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service-account.yaml
new file mode 100644 (file)
index 0000000..9bbc28f
--- /dev/null
@@ -0,0 +1,13 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.name" . }}
+    kubernetes.io/cluster-service: "true"
+    addonmanager.kubernetes.io/mode: Reconcile
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/templates/service.yaml
new file mode 100644 (file)
index 0000000..9425497
--- /dev/null
@@ -0,0 +1,22 @@
+{{- if .Values.service }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "fluentd-elasticsearch.fullname" . }}
+  labels:
+    app: {{ template "fluentd-elasticsearch.fullname" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: "{{ .Release.Service }}"
+    release: "{{ .Release.Name }}"
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{- range $port := .Values.service.ports }}
+    - name: {{ $port.name }}
+      port: {{ $port.port }}
+      targetPort: {{ $port.port }}
+  {{- end }}
+  selector:
+    app: {{ template "fluentd-elasticsearch.fullname" . }}
+    release: {{ .Release.Name }}
+{{- end }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/values.yaml b/src/seba_charts/cord-platform/charts/logging/charts/fluentd-elasticsearch/values.yaml
new file mode 100644 (file)
index 0000000..105c33d
--- /dev/null
@@ -0,0 +1,448 @@
+image:
+  repository: akrainoenea/fluentd-elasticsearch
+## Specify an imagePullPolicy (Required)
+## It's recommended to change this to 'Always' if the image tag is 'latest'
+## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
+  tag: v2.3.1
+  pullPolicy: IfNotPresent
+
+## Configure resource requests and limits
+## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+##
+resources: {}
+  # limits:
+  #   cpu: 100m
+  #   memory: 500Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 200Mi
+
+elasticsearch:
+  host: 'elasticsearch-client'
+  port: 9200
+  buffer_chunk_limit: 2M
+  buffer_queue_limit: 8
+
+rbac:
+  create: true
+
+serviceAccount:
+  # Specifies whether a ServiceAccount should be created
+  create: true
+  # The name of the ServiceAccount to use.
+  # If not set and create is true, a name is generated using the fullname template
+  name:
+
+livenessProbe:
+  enabled: true
+
+annotations: {}
+  # prometheus.io/scrape: "true"
+  # prometheus.io/port: "24231"
+
+tolerations: {}
+  # - key: node-role.kubernetes.io/master
+  #   operator: Exists
+  #   effect: NoSchedule
+
+service: {}
+  # type: ClusterIP
+  # ports:
+  #   - name: "monitor-agent"
+  #     port: 24231
+
+configMaps:
+  system.conf: |-
+    <system>
+      root_dir /tmp/fluentd-buffers/
+    </system>
+  containers.input.conf: |-
+    # This configuration file for Fluentd / td-agent is used
+    # to watch changes to Docker log files. The kubelet creates symlinks that
+    # capture the pod name, namespace, container name & Docker container ID
+    # to the docker logs for pods in the /var/log/containers directory on the host.
+    # If running this fluentd configuration in a Docker container, the /var/log
+    # directory should be mounted in the container.
+    #
+    # These logs are then submitted to Elasticsearch which assumes the
+    # installation of the fluent-plugin-elasticsearch & the
+    # fluent-plugin-kubernetes_metadata_filter plugins.
+    # See https://github.com/uken/fluent-plugin-elasticsearch &
+    # https://github.com/fabric8io/fluent-plugin-kubernetes_metadata_filter for
+    # more information about the plugins.
+    #
+    # Example
+    # =======
+    # A line in the Docker log file might look like this JSON:
+    #
+    # {"log":"2014/09/25 21:15:03 Got request with path wombat\n",
+    #  "stream":"stderr",
+    #   "time":"2014-09-25T21:15:03.499185026Z"}
+    #
+    # The time_format specification below makes sure we properly
+    # parse the time format produced by Docker. This will be
+    # submitted to Elasticsearch and should appear like:
+    # $ curl 'http://elasticsearch-logging:9200/_search?pretty'
+    # ...
+    # {
+    #      "_index" : "logstash-2014.09.25",
+    #      "_type" : "fluentd",
+    #      "_id" : "VBrbor2QTuGpsQyTCdfzqA",
+    #      "_score" : 1.0,
+    #      "_source":{"log":"2014/09/25 22:45:50 Got request with path wombat\n",
+    #                 "stream":"stderr","tag":"docker.container.all",
+    #                 "@timestamp":"2014-09-25T22:45:50+00:00"}
+    #    },
+    # ...
+    #
+    # The Kubernetes fluentd plugin is used to write the Kubernetes metadata to the log
+    # record & add labels to the log record if properly configured. This enables users
+    # to filter & search logs on any metadata.
+    # For example a Docker container's logs might be in the directory:
+    #
+    #  /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b
+    #
+    # and in the file:
+    #
+    #  997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log
+    #
+    # where 997599971ee6... is the Docker ID of the running container.
+    # The Kubernetes kubelet makes a symbolic link to this file on the host machine
+    # in the /var/log/containers directory which includes the pod name and the Kubernetes
+    # container name:
+    #
+    #    synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
+    #    ->
+    #    /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log
+    #
+    # The /var/log directory on the host is mapped to the /var/log directory in the container
+    # running this instance of Fluentd and we end up collecting the file:
+    #
+    #   /var/log/containers/synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
+    #
+    # This results in the tag:
+    #
+    #  var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
+    #
+    # The Kubernetes fluentd plugin is used to extract the namespace, pod name & container name
+    # which are added to the log message as a kubernetes field object & the Docker container ID
+    # is also added under the docker field object.
+    # The final tag is:
+    #
+    #   kubernetes.var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
+    #
+    # And the final log record look like:
+    #
+    # {
+    #   "log":"2014/09/25 21:15:03 Got request with path wombat\n",
+    #   "stream":"stderr",
+    #   "time":"2014-09-25T21:15:03.499185026Z",
+    #   "kubernetes": {
+    #     "namespace": "default",
+    #     "pod_name": "synthetic-logger-0.25lps-pod",
+    #     "container_name": "synth-lgr"
+    #   },
+    #   "docker": {
+    #     "container_id": "997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b"
+    #   }
+    # }
+    #
+    # This makes it easier for users to search for logs by pod name or by
+    # the name of the Kubernetes container regardless of how many times the
+    # Kubernetes pod has been restarted (resulting in a several Docker container IDs).
+    # Json Log Example:
+    # {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"}
+    # CRI Log Example:
+    # 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here
+    <source>
+      @id fluentd-containers.log
+      @type tail
+      path /var/log/containers/*.log
+      pos_file /var/log/fluentd-containers.log.pos
+      time_format %Y-%m-%dT%H:%M:%S.%NZ
+      tag raw.kubernetes.*
+      format json
+      read_from_head true
+    </source>
+    # Detect exceptions in the log output and forward them as one log entry.
+    <match raw.kubernetes.**>
+      @id raw.kubernetes
+      @type detect_exceptions
+      remove_tag_prefix raw
+      message log
+      stream stream
+      multiline_flush_interval 5
+      max_bytes 500000
+      max_lines 1000
+    </match>
+  system.input.conf: |-
+    # Example:
+    # 2015-12-21 23:17:22,066 [salt.state       ][INFO    ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
+    <source>
+      @id minion
+      @type tail
+      format /^(?<time>[^ ]* [^ ,]*)[^\[]*\[[^\]]*\]\[(?<severity>[^ \]]*) *\] (?<message>.*)$/
+      time_format %Y-%m-%d %H:%M:%S
+      path /var/log/salt/minion
+      pos_file /var/log/salt.pos
+      tag salt
+    </source>
+    # Example:
+    # Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script
+    <source>
+      @id startupscript.log
+      @type tail
+      format syslog
+      path /var/log/startupscript.log
+      pos_file /var/log/startupscript.log.pos
+      tag startupscript
+    </source>
+    # Examples:
+    # time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json"
+    # time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404
+    <source>
+      @id docker.log
+      @type tail
+      format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
+      path /var/log/docker.log
+      pos_file /var/log/docker.log.pos
+      tag docker
+    </source>
+    # Example:
+    # 2016/02/04 06:52:38 filePurge: successfully removed file /var/etcd/data/member/wal/00000000000006d0-00000000010a23d1.wal
+    <source>
+      @id etcd.log
+      @type tail
+      # Not parsing this, because it doesn't have anything particularly useful to
+      # parse out of it (like severities).
+      format none
+      path /var/log/etcd.log
+      pos_file /var/log/etcd.log.pos
+      tag etcd
+    </source>
+    # Multi-line parsing is required for all the kube logs because very large log
+    # statements, such as those that include entire object bodies, get split into
+    # multiple lines by glog.
+    # Example:
+    # I0204 07:32:30.020537    3368 server.go:1048] POST /stats/container/: (13.972191ms) 200 [[Go-http-client/1.1] 10.244.1.3:40537]
+    <source>
+      @id kubelet.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/kubelet.log
+      pos_file /var/log/kubelet.log.pos
+      tag kubelet
+    </source>
+    # Example:
+    # I1118 21:26:53.975789       6 proxier.go:1096] Port "nodePort for kube-system/default-http-backend:http" (:31429/tcp) was open before and is still needed
+    <source>
+      @id kube-proxy.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/kube-proxy.log
+      pos_file /var/log/kube-proxy.log.pos
+      tag kube-proxy
+    </source>
+    # Example:
+    # I0204 07:00:19.604280       5 handlers.go:131] GET /api/v1/nodes: (1.624207ms) 200 [[kube-controller-manager/v1.1.3 (linux/amd64) kubernetes/6a81b50] 127.0.0.1:38266]
+    <source>
+      @id kube-apiserver.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/kube-apiserver.log
+      pos_file /var/log/kube-apiserver.log.pos
+      tag kube-apiserver
+    </source>
+    # Example:
+    # I0204 06:55:31.872680       5 servicecontroller.go:277] LB already exists and doesn't need update for service kube-system/kube-ui
+    <source>
+      @id kube-controller-manager.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/kube-controller-manager.log
+      pos_file /var/log/kube-controller-manager.log.pos
+      tag kube-controller-manager
+    </source>
+    # Example:
+    # W0204 06:49:18.239674       7 reflector.go:245] pkg/scheduler/factory/factory.go:193: watch of *api.Service ended with: 401: The event in requested index is outdated and cleared (the requested history has been cleared [2578313/2577886]) [2579312]
+    <source>
+      @id kube-scheduler.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/kube-scheduler.log
+      pos_file /var/log/kube-scheduler.log.pos
+      tag kube-scheduler
+    </source>
+    # Example:
+    # I1104 10:36:20.242766       5 rescheduler.go:73] Running Rescheduler
+    <source>
+      @id rescheduler.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/rescheduler.log
+      pos_file /var/log/rescheduler.log.pos
+      tag rescheduler
+    </source>
+    # Example:
+    # I0603 15:31:05.793605       6 cluster_manager.go:230] Reading config from path /etc/gce.conf
+    <source>
+      @id glbc.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/glbc.log
+      pos_file /var/log/glbc.log.pos
+      tag glbc
+    </source>
+    # Example:
+    # I0603 15:31:05.793605       6 cluster_manager.go:230] Reading config from path /etc/gce.conf
+    <source>
+      @id cluster-autoscaler.log
+      @type tail
+      format multiline
+      multiline_flush_interval 5s
+      format_firstline /^\w\d{4}/
+      format1 /^(?<severity>\w)(?<time>\d{4} [^\s]*)\s+(?<pid>\d+)\s+(?<source>[^ \]]+)\] (?<message>.*)/
+      time_format %m%d %H:%M:%S.%N
+      path /var/log/cluster-autoscaler.log
+      pos_file /var/log/cluster-autoscaler.log.pos
+      tag cluster-autoscaler
+    </source>
+    # Logs from systemd-journal for interesting services.
+    <source>
+      @id journald-docker
+      @type systemd
+      matches [{ "_SYSTEMD_UNIT": "docker.service" }]
+      <storage>
+        @type local
+        persistent true
+        path /var/log/journald-docker.pos
+      </storage>
+      read_from_head true
+      tag docker
+    </source>
+    <source>
+      @id journald-kubelet
+      @type systemd
+      matches [{ "_SYSTEMD_UNIT": "kubelet.service" }]
+      <storage>
+        @type local
+        persistent true
+        path /var/log/journald-kubelet.pos
+      </storage>
+      read_from_head true
+      tag kubelet
+    </source>
+    <source>
+      @id journald-node-problem-detector
+      @type systemd
+      matches [{ "_SYSTEMD_UNIT": "node-problem-detector.service" }]
+      <storage>
+        @type local
+        persistent true
+        path /var/log/journald-node-problem-detector.pos
+      </storage>
+      read_from_head true
+      tag node-problem-detector
+    </source>
+  forward.input.conf: |-
+    # Takes the messages sent over TCP
+    <source>
+      @type forward
+    </source>
+  monitoring.conf: |-
+    # Prometheus Exporter Plugin
+    # input plugin that exports metrics
+    <source>
+      @type prometheus
+    </source>
+    <source>
+      @type monitor_agent
+    </source>
+    # input plugin that collects metrics from MonitorAgent
+    <source>
+      @type prometheus_monitor
+      <labels>
+        host ${hostname}
+      </labels>
+    </source>
+    # input plugin that collects metrics for output plugin
+    <source>
+      @type prometheus_output_monitor
+      <labels>
+        host ${hostname}
+      </labels>
+    </source>
+    # input plugin that collects metrics for in_tail plugin
+    <source>
+      @type prometheus_tail_monitor
+      <labels>
+        host ${hostname}
+      </labels>
+    </source>
+  output.conf: |
+    # Enriches records with Kubernetes metadata
+    <filter kubernetes.**>
+      @type kubernetes_metadata
+    </filter>
+
+    <match **>
+      @id elasticsearch
+      @type elasticsearch
+      @log_level info
+      include_tag_key true
+      type_name fluentd
+      host "#{ENV['OUTPUT_HOST']}"
+      port "#{ENV['OUTPUT_PORT']}"
+      logstash_format true
+      <buffer>
+        @type file
+        path /var/log/fluentd-buffers/kubernetes.system.buffer
+        flush_mode interval
+        retry_type exponential_backoff
+        flush_thread_count 2
+        flush_interval 5s
+        retry_forever
+        retry_max_interval 30
+        chunk_limit_size "#{ENV['OUTPUT_BUFFER_CHUNK_LIMIT']}"
+        queue_limit_length "#{ENV['OUTPUT_BUFFER_QUEUE_LIMIT']}"
+        overflow_action block
+      </buffer>
+    </match>
+
+# extraVolumes:
+#   - name: es-certs
+#     secret:
+#       defaultMode: 420
+#       secretName: es-certs
+# extraVolumeMounts:
+#   - name: es-certs
+#     mountPath: /certs
+#     readOnly: true
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/.helmignore b/src/seba_charts/cord-platform/charts/logging/charts/kibana/.helmignore
new file mode 100644 (file)
index 0000000..c13e3c8
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/Chart.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/Chart.yaml
new file mode 100644 (file)
index 0000000..879e118
--- /dev/null
@@ -0,0 +1,15 @@
+appVersion: 6.4.2
+description: Kibana is an open source data visualization plugin for Elasticsearch
+engine: gotpl
+home: https://www.elastic.co/products/kibana
+icon: https://raw.githubusercontent.com/elastic/kibana/master/src/ui/public/icons/kibana-color.svg
+keywords:
+- elasticsearch
+- kibana
+maintainers:
+- email: casey@monax.io
+  name: compleatang
+name: kibana
+sources:
+- https://github.com/elastic/kibana
+version: 0.16.1
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/OWNERS b/src/seba_charts/cord-platform/charts/logging/charts/kibana/OWNERS
new file mode 100644 (file)
index 0000000..0191a8e
--- /dev/null
@@ -0,0 +1,4 @@
+approvers:
+- compleatang
+reviewers:
+- compleatang
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/README.md b/src/seba_charts/cord-platform/charts/logging/charts/kibana/README.md
new file mode 100644 (file)
index 0000000..1503449
--- /dev/null
@@ -0,0 +1,104 @@
+# kibana
+
+[kibana](https://github.com/elastic/kibana) is your window into the Elastic Stack. Specifically, it's an open source (Apache Licensed), browser-based analytics and search dashboard for Elasticsearch.
+
+## TL;DR;
+
+```console
+$ helm install stable/kibana
+```
+
+## Introduction
+
+This chart bootstraps a kibana deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm install stable/kibana --name my-release
+```
+
+The command deploys kibana on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` deployment:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release.
+
+## Configuration
+
+The following table lists the configurable parameters of the kibana chart and their default values.
+
+| Parameter                                     | Description                                | Default                                |
+|-----------------------------------------------|--------------------------------------------|----------------------------------------|
+| `affinity`                                    | node/pod affinities                        | None                                   |
+| `env`                                         | Environment variables to configure Kibana  | `{}`                                   |
+| `files`                                       | Kibana configuration files                 | None                                   |
+| `image.pullPolicy`                            | Image pull policy                          | `IfNotPresent`                         |
+| `image.repository`                            | Image repository                           | `docker.elastic.co/kibana/kibana-oss`  |
+| `image.tag`                                   | Image tag                                  | `6.4.2`                                |
+| `image.pullSecrets`                           | Specify image pull secrets                 | `nil`                                  |
+| `commandline.args`                            | add additional commandline args            | `nil`                                  |
+| `ingress.enabled`                             | Enables Ingress                            | `false`                                |
+| `ingress.annotations`                         | Ingress annotations                        | None:                                  |
+| `ingress.hosts`                               | Ingress accepted hostnames                 | None:                                  |
+| `ingress.tls`                                 | Ingress TLS configuration                  | None:                                  |
+| `nodeSelector`                                | node labels for pod assignment             | `{}`                                   |
+| `podAnnotations`                              | annotations to add to each pod             | `{}`                                   |
+| `replicaCount`                                | desired number of pods                     | `1`                                    |
+| `revisionHistoryLimit`                        | revisionHistoryLimit                       | `3`                                    |
+| `serviceAccountName`                          | DEPRECATED: use serviceAccount.name        | `nil`                                  |
+| `serviceAccount.create`                       | create a serviceAccount to run the pod     | `false`                                |
+| `serviceAccount.name`                         | name of the serviceAccount to create       | `kibana.fullname`                      |
+| `authProxyEnabled`                            | enables authproxy. Create container in extracontainers   | `false`                  |
+| `extraContainers`                             | Sidecar containers to add to the kibana pod| `{}`                                   |
+| `resources`                                   | pod resource requests & limits             | `{}`                                   |
+| `priorityClassName`                           | priorityClassName                          | `nil`                                  |
+| `service.externalPort`                        | external port for the service              | `443`                                  |
+| `service.internalPort`                        | internal port for the service              | `4180`                                 |
+| `service.authProxyPort`                       | port to use when using sidecar authProxy   | None:                                  |
+| `service.externalIPs`                         | external IP addresses                      | None:                                  |
+| `service.loadBalancerIP`                      | Load Balancer IP address                   | None:                                  |
+| `service.loadBalancerSourceRanges`            | Limit load balancer source IPs to list of CIDRs (where available)) | `[]`           |
+| `service.nodePort`                            | NodePort value if service.type is NodePort | None:                                  |
+| `service.type`                                | type of service                            | `ClusterIP`                            |
+| `service.annotations`                         | Kubernetes service annotations             | None:                                  |
+| `service.labels`                              | Kubernetes service labels                  | None:                                  |
+| `tolerations`                                 | List of node taints to tolerate            | `[]`                                   |
+| `dashboardImport.timeout`                     | Time in seconds waiting for Kibana to be in green overall state | `60`                                   |
+| `dashboardImport.xpackauth.enabled`           | Enable Xpack auth                          | `false`                                |
+| `dashboardImport.xpackauth.username`          | Optional Xpack username                    | `myuser`                               |
+| `dashboardImport.xpackauth.password`          | Optional Xpack password                    | `mypass`                               |
+| `dashboardImport.dashboards`                  | Dashboards                                 | `{}`                                   |
+| `plugins`                                     | List of URLs pointing to zip files of Kibana plugins to install                                 | None:                                   |
+
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+* The Kibana configuration files config properties can be set through the `env` parameter too.
+* All the files listed under this variable will overwrite any existing files by the same name in kibana config directory.
+* Files not mentioned under this variable will remain unaffected.
+
+```console
+$ helm install stable/kibana --name my-release \
+  --set=image.tag=v0.0.2,resources.limits.cpu=200m
+```
+
+Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install stable/kibana --name my-release -f values.yaml
+```
+
+> **Tip**: You can use the default [values.yaml](values.yaml)
+
+## Dasboard import
+
+* A dashboard for dashboardImport.dashboards can be a JSON or a download url to a JSON file.
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..f515ecd
--- /dev/null
@@ -0,0 +1,18 @@
+To verify that {{ template "kibana.fullname" . }} has started, run:
+
+  kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "kibana.name" . }}"
+
+Kibana can be accessed:
+
+  * From outside the cluster, run these commands in the same shell:
+    {{- if contains "NodePort" .Values.service.type }}
+
+    export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "kibana.fullname" . }})
+    export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+    echo http://$NODE_IP:$NODE_PORT
+    {{- else if contains "ClusterIP"  .Values.service.type }}
+
+    export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "kibana.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+    echo "Visit http://127.0.0.1:5601 to use Kibana"
+    kubectl port-forward --namespace {{ .Release.Namespace }} $POD_NAME 5601:5601
+    {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..c6c30e9
--- /dev/null
@@ -0,0 +1,40 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "kibana.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "kibana.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "kibana.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+{{ default (include "kibana.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+{{- if .Values.serviceAccountName -}}
+{{- .Values.serviceAccountName }}
+{{- else -}}
+{{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap-dashboardimport.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap-dashboardimport.yaml
new file mode 100644 (file)
index 0000000..8eefbcf
--- /dev/null
@@ -0,0 +1,67 @@
+{{- if .Values.dashboardImport.dashboards }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "kibana.fullname" . }}-importscript
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+  dashboardImport.sh: |
+    #!/usr/bin/env bash
+    #
+    # kibana dashboard import script
+    #
+
+    cd /kibanadashboards
+
+    echo "Starting Kibana..."
+
+    /usr/local/bin/kibana-docker $@ &
+
+    echo "Waiting up to {{ .Values.dashboardImport.timeout }} seconds for Kibana to get in green overall state..."
+
+    for i in {1..{{ .Values.dashboardImport.timeout }}}; do
+      curl -s localhost:5601/api/status | python -c 'import sys, json; print json.load(sys.stdin)["status"]["overall"]["state"]' 2> /dev/null | grep green > /dev/null && break || sleep 1
+    done
+
+    for DASHBOARD_FILE in *; do
+      echo -e "Importing ${DASHBOARD_FILE} dashboard..."
+
+      if [ ! "$(python -c 'import sys, json; print json.load(sys.stdin)' < ${DASHBOARD_FILE} &> /dev/null)" ]; then
+        echo "${DASHBOARD_FILE} is no valid json. Trying to import from url..."
+        TMP_FILE="$(mktemp)"
+        curl -s $(cat ${DASHBOARD_FILE}) > ${TMP_FILE}
+        curl -v {{ if .Values.dashboardImport.xpackauth.enabled }}--user {{ .Values.dashboardImport.xpackauth.username }}:{{ .Values.dashboardImport.xpackauth.password }}{{ end }} -s --connect-timeout 60 --max-time 60 -XPOST localhost:5601/api/kibana/dashboards/import?force=true -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @${TMP_FILE}
+        rm ${TMP_FILE}
+      else
+        echo "Importing from json file..."
+        curl -v {{ if .Values.dashboardImport.xpackauth.enabled }}--user {{ .Values.dashboardImport.xpackauth.username }}:{{ .Values.dashboardImport.xpackauth.password }}{{ end }} -s --connect-timeout 60 --max-time 60 -XPOST localhost:5601/api/kibana/dashboards/import?force=true -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @./${DASHBOARD_FILE}
+      fi
+
+      if [ "$?" != "0" ]; then
+        echo -e "\nImport of ${DASHBOARD_FILE} dashboard failed... Exiting..."
+        exit 1
+      else
+        echo -e "\nImport of ${DASHBOARD_FILE} dashboard finished :-)"
+      fi
+
+    done
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "kibana.fullname" . }}-dashboards
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{- range $key, $value := .Values.dashboardImport.dashboards }}
+  {{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..610da72
--- /dev/null
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "kibana.fullname" . }}
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{- range $key, $value := .Values.files }}
+  {{ $key }}: |
+{{ toYaml $value | default "{}" | indent 4 }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/deployment.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..299889d
--- /dev/null
@@ -0,0 +1,180 @@
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "kibana.fullname" . }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
+  template:
+    metadata:
+    {{- if .Values.podAnnotations }}
+      annotations:
+{{ toYaml .Values.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "kibana.name" . }}
+        release: "{{ .Release.Name }}"
+    spec:
+      serviceAccountName: {{ template "kibana.serviceAccountName" . }}
+      {{- if .Values.priorityClassName }}
+      priorityClassName: "{{ .Values.priorityClassName }}"
+      {{- end }}
+{{- if or (.Values.dashboardImport.dashboards) (.Values.plugins) }}
+      initContainers:
+{{- if .Values.dashboardImport.dashboards }}
+      - name: {{ .Chart.Name }}-dashboardimport
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        command: ["/bin/bash"]
+        args:
+          - "-c"
+          - "/tmp/dashboardImport.sh"
+{{- if .Values.commandline.args }}
+{{ toYaml .Values.commandline.args | indent 10 }}
+{{- end }}
+        env:
+        {{- range $key, $value := .Values.env }}
+        - name: "{{ $key }}"
+          value: "{{ $value }}"
+        {{- end }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+          name: {{ template "kibana.name" . }}
+          protocol: TCP
+        volumeMounts:
+        - name: {{ template "kibana.fullname" . }}-dashboards
+          mountPath: "/kibanadashboards"
+        - name: {{ template "kibana.fullname" . }}-importscript
+          mountPath: "/tmp/dashboardImport.sh"
+          subPath: dashboardImport.sh
+        {{- range $configFile := (keys .Values.files) }}
+        - name: {{ template "kibana.name" $ }}
+          mountPath: "/usr/share/kibana/config/{{ $configFile }}"
+          subPath: {{ $configFile }}
+        {{- end }}
+{{- end }}
+{{- if .Values.plugins}}
+      - name: {{ .Chart.Name }}-plugins-install
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        command:
+          - /bin/bash
+          - "-c"
+          - |
+            set -e
+            plugins=(
+            {{- range .Values.plugins }}
+            {{ . }}
+            {{- end }}
+            )
+            for i in "${plugins[@]}"
+            do
+               ./bin/kibana-plugin install $i
+            done
+        env:
+        {{- range $key, $value := .Values.env }}
+        - name: "{{ $key }}"
+          value: "{{ $value }}"
+        {{- end }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+          name: {{ template "kibana.name" . }}
+          protocol: TCP
+        volumeMounts:
+        - name: plugins
+          mountPath: /usr/share/kibana/plugins
+        {{- range $configFile := (keys .Values.files) }}
+        - name: {{ template "kibana.name" $ }}
+          mountPath: "/usr/share/kibana/config/{{ $configFile }}"
+          subPath: {{ $configFile }}
+        {{- end }}
+{{- end }}
+{{- end }}
+      containers:
+      - name: {{ .Chart.Name }}
+        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        {{- if .Values.commandline.args }}
+        args:
+          - "/bin/bash"
+          - "/usr/local/bin/kibana-docker"
+{{ toYaml .Values.commandline.args | indent 10 }}
+        {{- end }}
+        env:
+        {{- range $key, $value := .Values.env }}
+        - name: "{{ $key }}"
+          value: "{{ $value }}"
+        {{- end }}
+{{- if (not .Values.authProxyEnabled) }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+          name: {{ template "kibana.name" . }}
+          protocol: TCP
+{{- end }}
+{{- if .Values.livenessProbe.enabled }}
+        livenessProbe:
+          httpGet:
+            path: /status
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
+          timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
+{{- end }}
+{{- if .Values.readinessProbe.enabled }}
+        readinessProbe:
+          httpGet:
+            path: /status
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
+          timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
+{{- end }}
+        resources:
+{{ toYaml .Values.resources | indent 10 }}
+        volumeMounts:
+        {{- range $configFile := (keys .Values.files) }}
+        - name: {{ template "kibana.name" $ }}
+          mountPath: "/usr/share/kibana/config/{{ $configFile }}"
+          subPath: {{ $configFile }}
+        {{- end }}
+{{- if .Values.plugins}}
+        - name: plugins
+          mountPath: /usr/share/kibana/plugins
+{{- end }}        
+{{- with .Values.extraContainers }}
+{{ tpl . $ | indent 6 }}
+{{- end }}
+    {{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+{{ toYaml .Values.image.pullSecrets | indent 8 }}
+    {{- end }}
+    {{- if .Values.affinity }}
+      affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+    {{- end }}
+    {{- if .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+    {{- end }}
+      tolerations:
+{{ toYaml .Values.tolerations | indent 8 }}
+      volumes:
+        - name: {{ template "kibana.name" . }}
+          configMap:
+            name: {{ template "kibana.fullname" . }}
+{{- if .Values.plugins}}
+        - name: plugins
+          emptyDir: {}
+{{- end }}
+{{- if .Values.dashboardImport.dashboards }}
+        - name: {{ template "kibana.fullname" . }}-dashboards
+          configMap:
+            name: {{ template "kibana.fullname" . }}-dashboards
+        - name: {{ template "kibana.fullname" . }}-importscript
+          configMap:
+            name: {{ template "kibana.fullname" . }}-importscript
+            defaultMode: 0777
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/ingress.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..bfb02ea
--- /dev/null
@@ -0,0 +1,32 @@
+{{- if .Values.ingress.enabled -}}
+{{- $serviceName := include "kibana.fullname" . -}}
+{{- $servicePort := .Values.service.externalPort -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "kibana.fullname" . }}
+  annotations:
+    {{- range $key, $value := .Values.ingress.annotations }}
+      {{ $key }}: {{ $value | quote }}
+    {{- end }}
+spec:
+  rules:
+    {{- range $host := .Values.ingress.hosts }}
+    - host: {{ $host }}
+      http:
+        paths:
+          - path: /
+            backend:
+              serviceName: {{ $serviceName }}
+              servicePort: {{ $servicePort }}
+    {{- end -}}
+  {{- if .Values.ingress.tls }}
+  tls:
+{{ toYaml .Values.ingress.tls | indent 4 }}
+  {{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/service.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/service.yaml
new file mode 100644 (file)
index 0000000..d66546c
--- /dev/null
@@ -0,0 +1,45 @@
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  {{- range $key, $value := .Values.service.labels }}
+    {{ $key }}: {{ $value | quote }}
+  {{- end }}
+  name: {{ template "kibana.fullname" . }}
+  annotations:
+    {{- range $key, $value := .Values.service.annotations }}
+      {{ $key }}: {{ $value | quote }}
+    {{- end }}
+spec:
+  {{- if .Values.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+    {{- range $cidr := .Values.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+    {{- end }}
+  {{- end }}
+  type: {{ .Values.service.type }}
+  ports:
+    - port: {{ .Values.service.externalPort }}
+{{- if not .Values.authProxyEnabled }}
+      targetPort: {{ .Values.service.internalPort }}
+{{- else }}
+      targetPort: {{ .Values.service.authProxyPort }}
+{{- end }}
+      protocol: TCP
+{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
+      nodePort: {{ .Values.service.nodePort }}
+{{ end }}      
+{{- if .Values.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.service.externalIPs | indent 4 }}
+{{- end }}
+  selector:
+    app: {{ template "kibana.name" . }}
+    release: {{ .Release.Name }}
+{{- if .Values.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/serviceaccount.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/templates/serviceaccount.yaml
new file mode 100644 (file)
index 0000000..948390a
--- /dev/null
@@ -0,0 +1,11 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ template "kibana.serviceAccountName" . }}
+  labels:
+    app: {{ template "kibana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/kibana/values.yaml b/src/seba_charts/cord-platform/charts/logging/charts/kibana/values.yaml
new file mode 100644 (file)
index 0000000..bf2f28a
--- /dev/null
@@ -0,0 +1,143 @@
+image:
+  repository: "akrainoenea/kibana-oss"
+  tag: "6.4.2"
+  pullPolicy: "IfNotPresent"
+
+commandline:
+  args:
+
+env: {}
+  # All Kibana configuration options are adjustable via env vars.
+  # To adjust a config option to an env var uppercase + replace `.` with `_`
+  # Ref: https://www.elastic.co/guide/en/kibana/current/settings.html
+  #
+  # ELASTICSEARCH_URL: http://elasticsearch-client:9200
+  # SERVER_PORT: 5601
+  # LOGGING_VERBOSE: "true"
+  # SERVER_DEFAULTROUTE: "/app/kibana"
+
+files:
+  kibana.yml:
+    ## Default Kibana configuration from kibana-docker.
+    server.name: kibana
+    server.host: "0"
+    elasticsearch.url: http://elasticsearch:9200
+
+    ## Custom config properties below
+    ## Ref: https://www.elastic.co/guide/en/kibana/current/settings.html
+    # server.port: 5601
+    # logging.verbose: "true"
+    # server.defaultRoute: "/app/kibana"
+
+service:
+  type: ClusterIP
+  externalPort: 443
+  internalPort: 5601
+  # authProxyPort: 5602 To be used with authProxyEnabled and a proxy extraContainer
+  ## External IP addresses of service
+  ## Default: nil
+  ##
+  # externalIPs:
+  # - 192.168.0.1
+  #
+  ## LoadBalancer IP if service.type is LoadBalancer
+  ## Default: nil
+  ##
+  # loadBalancerIP: 10.2.2.2
+  annotations:
+    # Annotation example: setup ssl with aws cert when service.type is LoadBalancer
+    # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:EXAMPLE_CERT
+  labels:
+    ## Label example: show service URL in `kubectl cluster-info`
+    # kubernetes.io/cluster-service: "true"
+  ## Limit load balancer source ips to list of CIDRs (where available)
+  # loadBalancerSourceRanges: []
+
+ingress:
+  enabled: false
+  # hosts:
+    # - chart-example.local
+  # annotations:
+  #   kubernetes.io/ingress.class: nginx
+  #   kubernetes.io/tls-acme: "true"
+  # tls:
+    # - secretName: chart-example-tls
+    #   hosts:
+    #     - chart-example.local
+
+serviceAccount:
+  # Specifies whether a service account should be created
+  create: false
+  # The name of the service account to use.
+  # If not set and create is true, a name is generated using the fullname template
+  # If set and create is false, the service account must be existing
+  name:
+
+livenessProbe:
+  enabled: false
+  initialDelaySeconds: 30
+  timeoutSeconds: 10
+
+readinessProbe:
+  enabled: false
+  initialDelaySeconds: 30
+  timeoutSeconds: 10
+
+# Enable an authproxy. Specify container in extraContainers
+authProxyEnabled: false
+
+extraContainers: |
+# - name: proxy
+#   image: quay.io/gambol99/keycloak-proxy:latest
+#   args:
+#     - --resource=uri=/*
+#     - --discovery-url=https://discovery-url
+#     - --client-id=client
+#     - --client-secret=secret
+#     - --listen=0.0.0.0:5602
+#     - --upstream-url=http://127.0.0.1:5601
+#   ports:
+#     - name: web
+#       containerPort: 9090
+resources: {}
+  # limits:
+  #   cpu: 100m
+  #   memory: 300Mi
+  # requests:
+  #   cpu: 100m
+  #   memory: 300Mi
+
+priorityClassName: ""
+
+# Affinity for pod assignment
+# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+# affinity: {}
+
+# Tolerations for pod assignment
+# Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+tolerations: []
+
+# Node labels for pod assignment
+# Ref: https://kubernetes.io/docs/user-guide/node-selection/
+nodeSelector: {}
+
+podAnnotations: {}
+replicaCount: 1
+revisionHistoryLimit: 3
+
+# To export a dashboard from a running Kibana 6.3.x use:
+# curl --user <username>:<password> -XGET https://kibana.yourdomain.com:5601/api/kibana/dashboards/export?dashboard=<some-dashboard-uuid> > my-dashboard.json
+# A dashboard is defined by a name and a string with the json payload or the download url
+dashboardImport:
+  timeout: 60
+  xpackauth:
+    enabled: false
+    username: myuser
+    password: mypass
+  dashboards: {}
+    # k8s: https://raw.githubusercontent.com/monotek/kibana-dashboards/master/k8s-fluentd-elasticsearch.json
+
+# List of pluginns to install using initContainer
+plugins:
+  # - https://github.com/sivasamyk/logtrail/releases/download/v0.1.29/logtrail-6.4.0-0.1.29.zip
+  # - other_plugin
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/.helmignore b/src/seba_charts/cord-platform/charts/logging/charts/logstash/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/Chart.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/Chart.yaml
new file mode 100644 (file)
index 0000000..ac0b6b7
--- /dev/null
@@ -0,0 +1,17 @@
+apiVersion: v1
+appVersion: 6.4.2
+description: Logstash is an open source, server-side data processing pipeline
+home: https://www.elastic.co/products/logstash
+icon: https://www.elastic.co/assets/blt86e4472872eed314/logo-elastic-logstash-lt.svg
+maintainers:
+- email: pete.brown@powerhrg.com
+  name: rendhalver
+- email: jrodgers@powerhrg.com
+  name: jar361
+- email: christian.roggia@gmail.com
+  name: christian-roggia
+name: logstash
+sources:
+- https://www.docker.elastic.co
+- https://www.elastic.co/guide/en/logstash/current/index.html
+version: 1.0.0
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/OWNERS b/src/seba_charts/cord-platform/charts/logging/charts/logstash/OWNERS
new file mode 100644 (file)
index 0000000..ee2cba8
--- /dev/null
@@ -0,0 +1,6 @@
+approvers:
+- christian-roggia
+- rendhalver
+reviewers:
+- christian-roggia
+- rendhalver
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/README.md b/src/seba_charts/cord-platform/charts/logging/charts/logstash/README.md
new file mode 100644 (file)
index 0000000..bd775e1
--- /dev/null
@@ -0,0 +1,114 @@
+# Logstash
+
+[Logstash](https://www.elastic.co/products/logstash) is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite “stash.”
+
+## TL;DR;
+
+```console
+$ helm install stable/logstash
+```
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm install --name my-release stable/logstash
+```
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` deployment:
+
+```console
+$ helm delete my-release
+```
+
+The command removes nearly all the Kubernetes components associated with the
+chart and deletes the release.
+
+## Best Practices
+
+### Release and tune this chart once per Logstash pipeline
+
+To achieve multiple pipelines with this chart, current best practice is to
+maintain one pipeline per chart release. In this way configuration is
+simplified and pipelines are more isolated from one another.
+
+### Default Pipeline: Beats Input -> Elasticsearch Output
+
+Current best practice for ELK logging is to ship logs from hosts using Filebeat
+to logstash where persistent queues are enabled. Filebeat supports structured
+(e.g. JSON) and unstructured (e.g. log lines) log shipment.
+
+### Load Beats-generated index template into Elasticsearch
+
+To best utilize the combination of Beats, Logstash and Elasticsearch,
+load Beats-generated index templates into Elasticsearch as described [here](
+https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-template.html).
+
+On a remote-to-Kubernetes Linux instance you might run the following command to
+load that instance's Beats-generated index template into Elasticsearch
+(Elasticsearch hostname will vary).
+
+```
+filebeat setup --template -E output.logstash.enabled=false \
+  -E 'output.elasticsearch.hosts=["elasticsearch.cluster.local:9200"]'
+```
+
+### Links
+
+Please review the following links that expound on current best practices.
+
+- https://www.elastic.co/blog/structured-logging-filebeat
+- https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-template.html
+- https://www.elastic.co/guide/en/logstash/current/deploying-and-scaling.html
+- https://www.elastic.co/guide/en/logstash/current/persistent-queues.html
+
+## Configuration
+
+The following table lists the configurable parameters of the chart and its default values.
+
+|              Parameter      |                    Description                     |                     Default                      |
+| --------------------------- | -------------------------------------------------- | ------------------------------------------------ |
+| `replicaCount`                  | Number of replicas                                 | `1`                                              |
+| `podDisruptionBudget`           | Pod disruption budget                              | `maxUnavailable: 1`                              |
+| `updateStrategy`                | Update strategy                                    | `type: RollingUpdate`                            |
+| `image.repository`              | Container image name                               | `docker.elastic.co/logstash/logstash-oss`        |
+| `image.tag`                     | Container image tag                                | `6.4.2`                                          |
+| `image.pullPolicy`              | Container image pull policy                        | `IfNotPresent`                                   |
+| `service.type`                  | Service type (ClusterIP, NodePort or LoadBalancer) | `ClusterIP`                                      |
+| `service.annotations`           | Service annotations                                | `{}`                                             |
+| `service.ports`                 | Ports exposed by service                           | beats                                            |
+| `service.loadBalancerIP`        | The load balancer IP for the service               | unset                                            |
+| `service.clusterIP`             | The cluster IP for the service                     | unset                                            |
+| `ports`                         | Ports exposed by logstash container                | beats                                            |
+| `ingress.enabled`               | Enables Ingress                                    | `false`                                          |
+| `ingress.annotations`           | Ingress annotations                                | `{}`                                             |
+| `ingress.path`                  | Ingress path                                       | `/`                                              |
+| `ingress.hosts`                 | Ingress accepted hostnames                         | `["logstash.cluster.local"]`                     |
+| `ingress.tls`                   | Ingress TLS configuration                          | `[]`                                             |
+| `resources`                     | Pod resource requests & limits                     | `{}`                                             |
+| `nodeSelector`                  | Node selector                                      | `{}`                                             |
+| `tolerations`                   | Tolerations                                        | `[]`                                             |
+| `affinity`                      | Affinity or Anti-Affinity                          | `{}`                                             |
+| `podAnnotations`                | Pod annotations                                    | `{}`                                             |
+| `podLabels`                     | Pod labels                                         | `{}`                                             |
+| `livenessProbe`                 | Liveness probe settings for logstash container     | (see `values.yaml`)                              |
+| `readinessProbe`                | Readiness probe settings for logstash container    | (see `values.yaml`)                              |
+| `persistence.enabled`           | Enable persistence                                 | `true`                                           |
+| `persistence.storageClass`      | Storage class for PVCs                             | unset                                            |
+| `persistence.accessMode`        | Access mode for PVCs                               | `ReadWriteOnce`                                  |
+| `persistence.size`              | Size for PVCs                                      | `2Gi`                                            |
+| `volumeMounts`                  | Volume mounts to configure for logstash container  | (see `values.yaml`)                              |
+| `volumes`                       | Volumes to configure for logstash container        | []                              |
+| `terminationGracePeriodSeconds` | Duration the pod needs to terminate gracefully     | `30`
+| `exporter.logstash`             | Prometheus logstash-exporter settings              | (see `values.yaml`)                              |
+| `exporter.logstash.enabled`     | Enables Prometheus logstash-exporter               | `false`                                          |
+| `elasticsearch.host`            | ElasticSearch hostname                             | `elasticsearch-client.default.svc.cluster.local` |
+| `elasticsearch.port`            | ElasticSearch port                                 | `9200`                                           |
+| `config`                        | Logstash configuration key-values                  | (see `values.yaml`)                              |
+| `patterns`                      | Logstash patterns configuration                    | `nil`                                            |
+| `inputs`                        | Logstash inputs configuration                      | beats                                            |
+| `filters`                       | Logstash filters configuration                     | `nil`                                            |
+| `outputs`                       | Logstash outputs configuration                     | elasticsearch                                    |
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..6fc6988
--- /dev/null
@@ -0,0 +1,21 @@
+{{- if .Values.service.ports.http }}
+Get the Logstash HTTP Input URL by running these commands:
+  {{- if .Values.ingress.enabled }}
+    {{- range .Values.ingress.hosts }}
+  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
+    {{- end }}
+  {{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "logstash.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+  {{- else if contains "LoadBalancer" .Values.service.type }}
+     NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+           You can watch the status of by running 'kubectl get svc -w {{ template "logstash.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "logstash.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.ports.http.port }}
+  {{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "logstash.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:{{ .Values.service.ports.http.port }}
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..d88fb24
--- /dev/null
@@ -0,0 +1,32 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "logstash.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "logstash.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "logstash.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/ingress.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..d924504
--- /dev/null
@@ -0,0 +1,38 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "logstash.fullname" . -}}
+{{- $ingressPath := .Values.ingress.path -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+  name: {{ $fullName }}
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- with .Values.ingress.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+{{- if .Values.ingress.tls }}
+  tls:
+  {{- range .Values.ingress.tls }}
+    - hosts:
+      {{- range .hosts }}
+        - {{ . }}
+      {{- end }}
+      secretName: {{ .secretName }}
+  {{- end }}
+{{- end }}
+  rules:
+  {{- range .Values.ingress.hosts }}
+    - host: {{ . }}
+      http:
+        paths:
+          - path: {{ $ingressPath }}
+            backend:
+              serviceName: {{ $fullName }}
+              servicePort: http
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/patterns-config.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/patterns-config.yaml
new file mode 100644 (file)
index 0000000..5149ffa
--- /dev/null
@@ -0,0 +1,14 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "logstash.fullname" . }}-patterns
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{- range $key, $value := .Values.patterns }}
+  {{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/pipeline-config.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/pipeline-config.yaml
new file mode 100644 (file)
index 0000000..2aea322
--- /dev/null
@@ -0,0 +1,24 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "logstash.fullname" . }}-pipeline
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{- range $key, $value := .Values.inputs }}
+  input_{{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end }}
+
+{{- range $key, $value := .Values.filters }}
+  filter_{{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end }}
+
+{{- range $key, $value := .Values.outputs }}
+  output_{{ $key }}: |-
+{{ $value | indent 4 }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/poddisruptionbudget.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/poddisruptionbudget.yaml
new file mode 100644 (file)
index 0000000..f3c37eb
--- /dev/null
@@ -0,0 +1,15 @@
+apiVersion: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ template "logstash.fullname" . }}
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ template "logstash.name" . }}
+      release: {{ .Release.Name }}
+{{ toYaml .Values.podDisruptionBudget | indent 2 }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/service.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/service.yaml
new file mode 100644 (file)
index 0000000..e7ae10e
--- /dev/null
@@ -0,0 +1,29 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "logstash.fullname" . }}
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+{{- with .Values.service.annotations }}
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+  {{- range $key, $value := .Values.service.ports }}
+    - name: {{ $key }}
+{{ toYaml $value | indent 6 }}
+  {{- end }}
+  selector:
+    app: {{ template "logstash.name" . }}
+    release: {{ .Release.Name }}
+{{- if .Values.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.service.clusterIP }}
+  clusterIP: {{ .Values.service.clusterIP }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/statefulset.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..8d8f10a
--- /dev/null
@@ -0,0 +1,156 @@
+apiVersion: apps/v1beta2
+kind: StatefulSet
+metadata:
+  name: {{ template "logstash.fullname" . }}
+  labels:
+    app: {{ template "logstash.name" . }}
+    chart: {{ template "logstash.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  serviceName: {{ template "logstash.fullname" . }}
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "logstash.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "logstash.name" . }}
+        release: {{ .Release.Name }}
+      {{- if .Values.podLabels }}
+        ## Custom pod labels
+        {{- range $key, $value := .Values.podLabels }}
+        {{ $key }}: {{ $value | quote }}
+        {{- end }}
+      {{- end }}
+      annotations:
+        checksum/patterns: {{ include (print $.Template.BasePath "/patterns-config.yaml") . | sha256sum }}
+        checksum/pipeline: {{ include (print $.Template.BasePath "/pipeline-config.yaml") . | sha256sum }}
+      {{- if .Values.podAnnotations }}
+        ## Custom pod annotations
+        {{- range $key, $value := .Values.podAnnotations }}
+        {{ $key }}: {{ $value | quote }}
+        {{- end }}
+      {{- end }}
+    spec:
+      securityContext:
+        runAsUser: 1000
+        fsGroup: 1000
+      {{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+{{ toYaml .Values.image.pullSecrets | indent 8 }}
+      {{- end }}
+      containers:
+
+        ## logstash
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - name: monitor
+              containerPort: {{ .Values.exporter.logstash.target.port }}
+              protocol: TCP
+{{ toYaml .Values.ports | indent 12 }}
+          livenessProbe:
+{{ toYaml .Values.livenessProbe | indent 12 }}
+          readinessProbe:
+{{ toYaml .Values.readinessProbe | indent 12 }}
+          env:
+            ## Logstash monitoring API host and port env vars
+            - name: HTTP_HOST
+              value: "0.0.0.0"
+            - name: HTTP_PORT
+              value: {{ .Values.exporter.logstash.target.port | quote }}
+            ## Elasticsearch output
+            - name: ELASTICSEARCH_HOST
+              value: {{ .Values.elasticsearch.host | quote }}
+            - name: ELASTICSEARCH_PORT
+              value: {{ .Values.elasticsearch.port | quote }}
+            ## Additional env vars
+          {{- range $key, $value := .Values.config }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+{{ toYaml .Values.volumeMounts | indent 12 }}
+
+{{- if .Values.exporter.logstash.enabled }}
+        ## logstash-exporter
+        - name: {{ .Chart.Name }}-exporter
+          image: "{{ .Values.exporter.logstash.image.repository }}:{{ .Values.exporter.logstash.image.tag }}"
+          imagePullPolicy: {{ .Values.exporter.logstash.image.pullPolicy }}
+          command: ["/bin/sh", "-c"]
+          ## Delay start of logstash-exporter to give logstash more time to come online.
+          args:
+            - >-
+              sleep 60;
+              exec /logstash_exporter
+                --logstash.endpoint=http://localhost:{{ .Values.exporter.logstash.target.port }}
+                --web.listen-address=:{{ .Values.exporter.logstash.port }}
+          ports:
+            - name: ls-exporter
+              containerPort: {{ .Values.exporter.logstash.port }}
+              protocol: TCP
+          livenessProbe:
+{{ toYaml .Values.exporter.logstash.livenessProbe | indent 12 }}
+          readinessProbe:
+{{ toYaml .Values.exporter.logstash.readinessProbe | indent 12 }}
+          {{- with .Values.exporter.logstash.config }}
+          env:
+            {{- range $key, $value := . }}
+            - name: {{ $key | upper | replace "." "_" }}
+              value: {{ $value | quote }}
+            {{- end }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.exporter.logstash.resources | indent 12 }}
+{{- end }}
+
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+      terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
+      volumes:
+        - name: patterns
+          configMap:
+            name: {{ template "logstash.fullname" . }}-patterns
+        - name: pipeline
+          configMap:
+            name: {{ template "logstash.fullname" . }}-pipeline
+    {{- with .Values.volumes }}
+{{ toYaml . | indent 8 }}
+    {{- end }}
+{{- if not .Values.persistence.enabled }}
+        - name: data
+          emptyDir: {}
+{{- else }}
+  volumeClaimTemplates:
+    - metadata:
+        name: data
+      spec:
+        accessModes:
+          - {{ .Values.persistence.accessMode | quote }}
+        resources:
+          requests:
+            storage: {{ .Values.persistence.size | quote }}
+      {{- if .Values.persistence.storageClass }}
+        {{- if (eq "-" .Values.persistence.storageClass) }}
+        storageClassName: ""
+        {{- else }}
+        storageClassName: "{{ .Values.persistence.storageClass }}"
+        {{- end }}
+      {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/logging/charts/logstash/values.yaml b/src/seba_charts/cord-platform/charts/logging/charts/logstash/values.yaml
new file mode 100644 (file)
index 0000000..56529af
--- /dev/null
@@ -0,0 +1,264 @@
+replicaCount: 1
+
+podDisruptionBudget:
+  maxUnavailable: 1
+
+updateStrategy:
+  type: RollingUpdate
+
+terminationGracePeriodSeconds: 30
+
+image:
+  repository: akrainoenea/logstash-oss
+  tag: 6.4.2
+  pullPolicy: IfNotPresent
+  ## Add secrets manually via kubectl on kubernetes cluster and reference here
+  #  pullSecrets:
+  #    - name: "myKubernetesSecret"
+
+service:
+  type: ClusterIP
+  # clusterIP: None
+  annotations: {}
+    ## AWS example for use with LoadBalancer service type.
+    # external-dns.alpha.kubernetes.io/hostname: logstash.cluster.local
+    # service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
+    # service.beta.kubernetes.io/aws-load-balancer-internal: "true"
+  ports:
+    # syslog-udp:
+    #   port: 1514
+    #   targetPort: syslog-udp
+    #   protocol: UDP
+    # syslog-tcp:
+    #   port: 1514
+    #   targetPort: syslog-tcp
+    #   protocol: TCP
+    beats:
+      port: 5044
+      targetPort: beats
+      protocol: TCP
+    # http:
+    #  port: 8080
+    #  targetPort: http
+    #  protocol: TCP
+    # loadBalancerIP: 10.0.0.1
+ports:
+  # - name: syslog-udp
+  #   containerPort: 1514
+  #   protocol: UDP
+  # - name: syslog-tcp
+  #   containerPort: 1514
+  #   protocol: TCP
+  - name: beats
+    containerPort: 5044
+    protocol: TCP
+  # - name: http
+  #   containerPort: 8080
+  #   protocol: TCP
+
+ingress:
+  enabled: false
+  annotations: {}
+    # kubernetes.io/ingress.class: nginx
+    # kubernetes.io/tls-acme: "true"
+  path: /
+  hosts:
+    - logstash.cluster.local
+  tls: []
+  #  - secretName: logstash-tls
+  #    hosts:
+  #      - logstash.cluster.local
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  # limits:
+  #  cpu: 100m
+  #  memory: 128Mi
+  # requests:
+  #  cpu: 100m
+  #  memory: 128Mi
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
+  # podAntiAffinity:
+  #   requiredDuringSchedulingIgnoredDuringExecution:
+  #     - topologyKey: "kubernetes.io/hostname"
+  #       labelSelector:
+  #         matchLabels:
+  #           release: logstash
+
+podAnnotations: {}
+  # iam.amazonaws.com/role: "logstash-role"
+  # prometheus.io/scrape: "true"
+  # prometheus.io/path: "/metrics"
+  # prometheus.io/port: "9198"
+
+podLabels: {}
+  # team: "developers"
+  # service: "logstash"
+
+livenessProbe:
+  httpGet:
+    path: /
+    port: monitor
+  initialDelaySeconds: 20
+  # periodSeconds: 30
+  # timeoutSeconds: 30
+  # failureThreshold: 6
+  # successThreshold: 1
+
+readinessProbe:
+  httpGet:
+    path: /
+    port: monitor
+  initialDelaySeconds: 20
+  # periodSeconds: 30
+  # timeoutSeconds: 30
+  # failureThreshold: 6
+  # successThreshold: 1
+
+persistence:
+  enabled: true
+  ## logstash data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteOnce
+  size: 2Gi
+
+volumeMounts:
+  - name: data
+    mountPath: /usr/share/logstash/data
+  - name: patterns
+    mountPath: /usr/share/logstash/patterns
+  - name: pipeline
+    mountPath: /usr/share/logstash/pipeline
+
+volumes: []
+  # - name: tls
+  #   secret:
+  #     secretName: logstash-tls
+  # - name: pipeline
+  #   configMap:
+  #     name: logstash-pipeline
+  # - name: certs
+  #   hostPath:
+  #     path: /tmp
+
+exporter:
+  logstash:
+    enabled: false
+    image:
+      repository: akrainoenea/logstash_explorer
+      tag: v0.1.2
+      pullPolicy: IfNotPresent
+    env: {}
+    resources: {}
+    path: /metrics
+    port: 9198
+    target:
+      port: 9600
+      path: /metrics
+    livenessProbe:
+      httpGet:
+        path: /metrics
+        port: ls-exporter
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+    readinessProbe:
+      httpGet:
+        path: /metrics
+        port: ls-exporter
+      periodSeconds: 15
+      timeoutSeconds: 60
+      failureThreshold: 8
+      successThreshold: 1
+
+elasticsearch:
+  host: elasticsearch-client.default.svc.cluster.local
+  port: 9200
+
+## ref: https://github.com/elastic/logstash-docker/blob/master/build/logstash/env2yaml/env2yaml.go
+config:
+  config.reload.automatic: "true"
+  path.config: /usr/share/logstash/pipeline
+  path.data: /usr/share/logstash/data
+
+  ## ref: https://www.elastic.co/guide/en/logstash/current/persistent-queues.html
+  queue.checkpoint.writes: 1
+  queue.drain: "true"
+  queue.max_bytes: 1gb  # disk capacity must be greater than the value of `queue.max_bytes`
+  queue.type: persisted
+
+## Patterns for filters.
+## Each YAML heredoc will become a separate pattern file.
+patterns:
+  # main: |-
+  #   TESTING {"foo":.*}$
+
+## NOTE: To achieve multiple pipelines with this chart, current best practice
+## is to maintain one pipeline per chart release. In this way configuration is
+## simplified and pipelines are more isolated from one another.
+
+inputs:
+  main: |-
+    input {
+      # udp {
+      #   port => 1514
+      #   type => syslog
+      # }
+      # tcp {
+      #   port => 1514
+      #   type => syslog
+      # }
+      beats {
+        port => 5044
+      }
+      # http {
+      #   port => 8080
+      # }
+      # kafka {
+      #   ## ref: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html
+      #   bootstrap_servers => "kafka-input:9092"
+      #   codec => json { charset => "UTF-8" }
+      #   consumer_threads => 1
+      #   topics => ["source"]
+      #   type => "example"
+      # }
+    }
+
+filters:
+  # main: |-
+  #   filter {
+  #   }
+
+outputs:
+  main: |-
+    output {
+      # stdout { codec => rubydebug }
+      elasticsearch {
+        hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
+        manage_template => false
+        index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
+        document_type => "%{[@metadata][type]}"
+      }
+      # kafka {
+      #   ## ref: https://www.elastic.co/guide/en/logstash/current/plugins-outputs-kafka.html
+      #   bootstrap_servers => "kafka-output:9092"
+      #   codec => json { charset => "UTF-8" }
+      #   compression_type => "lz4"
+      #   topic_id => "destination"
+      # }
+    }
diff --git a/src/seba_charts/cord-platform/charts/logging/requirements.lock b/src/seba_charts/cord-platform/charts/logging/requirements.lock
new file mode 100644 (file)
index 0000000..c70c529
--- /dev/null
@@ -0,0 +1,15 @@
+dependencies:
+- name: elasticsearch
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 1.11.0
+- name: kibana
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 0.16.1
+- name: fluentd-elasticsearch
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 1.0.3
+- name: logstash
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 1.0.0
+digest: sha256:7ee6a73ff3e4558886e14ca06381f6d775b6bfade42525468b4e66397cb228b6
+generated: 2018-12-19T11:26:23.274726079-07:00
diff --git a/src/seba_charts/cord-platform/charts/logging/requirements.yaml b/src/seba_charts/cord-platform/charts/logging/requirements.yaml
new file mode 100644 (file)
index 0000000..7352088
--- /dev/null
@@ -0,0 +1,35 @@
+---
+# 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.
+
+dependencies:
+
+- name: elasticsearch
+  version: 1.11.0
+  repository: https://kubernetes-charts.storage.googleapis.com/
+
+- name: kibana
+  condition: kibana.enabled
+  version: 0.16.1
+  repository: https://kubernetes-charts.storage.googleapis.com/
+
+- name: fluentd-elasticsearch
+  condition: fluentd-elasticsearch.enabled
+  version: 1.0.3
+  repository: https://kubernetes-charts.storage.googleapis.com/
+
+- name: logstash
+  condition: logstash.enabled
+  version: 1.0.0
+  repository: https://kubernetes-charts.storage.googleapis.com/
diff --git a/src/seba_charts/cord-platform/charts/logging/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/logging/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..7802534
--- /dev/null
@@ -0,0 +1,16 @@
+** Log aggregation for CORD **
+
+This chart runs the following services:
+
+- Elasticsearch
+
+and optionally:
+
+- Kibana
+- Logstash
+- fluentd-elasticsearch (container logs from k8s)
+
+To access Kibana, go to:
+
+ http://<any_k8s_node>:{{ .Values.kibana.service.nodePort }}
+
diff --git a/src/seba_charts/cord-platform/charts/logging/values.yaml b/src/seba_charts/cord-platform/charts/logging/values.yaml
new file mode 100644 (file)
index 0000000..719124e
--- /dev/null
@@ -0,0 +1,144 @@
+---
+# 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.
+
+# Values file for SEBA log aggregation infra
+# NOTE: must start this chart with the name "logging":
+#   helm install -n logging logging
+# ortherwise the elasticsearch hostname won't work properly in the other containers
+
+# elasticstack config
+# ref: https://github.com/helm/charts/tree/master/incubator/elasticsearch
+elasticsearch:
+  client:
+    serviceType: "NodePort"
+  master:
+    persistence:
+      storageClass: "local-ssd"
+      size: "5Gi"
+  data:
+    persistence:
+      storageClass: "local-hdd"
+      size: "10Gi"
+
+# kibana config
+# ref: https://github.com/helm/charts/tree/master/stable/kibana
+kibana:
+  enabled: true
+#  dashboardImport:
+#    dashboards: |-
+#
+  service:
+    type: "NodePort"
+    nodePort: 30601
+  env:
+    ELASTICSEARCH_URL: "http://logging-elasticsearch-client:9200"
+
+  dashboardImport:
+    dashboards:
+      1_create_index: |-
+        {
+          "version": "6.4.2",
+          "objects": [
+            {
+              "id": "749ea2f0-d15c-11e8-b4aa-8f5499fd5eba",
+              "type": "index-pattern",
+              "version": 2,
+              "attributes": {
+                "title": "logstash-*",
+                "timeFieldName": "@timestamp",
+                "fields": "[{\"name\":\"@timestamp\",\"type\":\"date\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"@version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_source\",\"type\":\"_source\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"_type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"bundle.id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.id.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bundle.name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"bundle.version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"bundle.version.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"category\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"category.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.message.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"error.type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"error.type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"detail\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"geoip.ip\",\"type\":\"ip\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.latitude\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.location\",\"type\":\"geo_point\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"geoip.longitude\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"host.name\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"host.name.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"input.type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"input.type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_key\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_key.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_timestamp\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_timestamp.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"kafka_topic\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"kafka_topic.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"levelname\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"levelname.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"levelno\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"lineno\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"message\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"offset\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"msg.model\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"msg.version\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"thread\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"name\":\"threadName\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"name\":\"type.keyword\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true}]"
+              }
+            }
+          ]
+        }
+
+# logstash config
+# ref: https://github.com/helm/charts/tree/master/incubator/logstash
+logstash:
+  enabled: true
+  elasticsearch:
+    host: "logging-elasticsearch-client"
+
+  # we have kafka, so persistence isn't needed
+  # ref: https://www.elastic.co/guide/en/logstash/current/persistent-queues.html
+  persistence:
+    enabled: false
+
+  # Probe default delays are too short, which puts logstash into a reboot loop
+  livenessProbe:
+    initialDelaySeconds: 240
+
+  readinessProbe:
+    initialDelaySeconds: 240
+
+  # 'config' k/v are turned into env vars for logstash container
+  # ref: https://www.elastic.co/guide/en/logstash/current/docker-config.html#docker-env-config
+  # config:
+  #   LOG_LEVEL: trace
+
+  # Kafka input plugin
+  # ref: https://www.elastic.co/guide/en/logstash/current/plugins-inputs-kafka.html
+  inputs:
+    main: |-
+      input {
+        kafka {
+          auto_offset_reset => "earliest" # get all previous items from new topics
+          bootstrap_servers => "cord-kafka:9092"
+          client_id => "logstash_ck"
+          codec => json { charset => "UTF-8" }
+          consumer_threads => 1
+          decorate_events => true
+          group_id => "logstash_ck"
+          metadata_max_age_ms => 60000 # recheck for new topics every minute
+          # other topics that are not indexed: xos.gui_events, voltha.kpis, voltha.heartbeat
+          topics_pattern => '.*\.events|dhcp.*|onos.*|.*\.log.*'
+          type => "cord-kafka"
+        }
+      }
+
+  filters:
+    main: |-
+      filter {
+        mutate {
+          add_field => {
+            "kafka_topic" => "%{[@metadata][kafka][topic]}"
+            "kafka_key" => "%{[@metadata][kafka][key]}"
+            "kafka_timestamp" => "%{[@metadata][kafka][timestamp]}"
+          }
+        }
+
+        json {
+          source => "data"
+          target => "data"
+          skip_on_invalid_json => true
+        }
+      }
+
+  outputs:
+    main: |-
+      output {
+        elasticsearch {
+          hosts => ["${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}"]
+        }
+      }
+
+# fluentd-elasticsearch config
+# ref: https://github.com/helm/charts/tree/master/stable/fluentd-elasticsearch
+# forwards k8s logs from nodes to elasticsearch
+fluentd-elasticsearch:
+  enabled: false
+  elasticsearch:
+    host: "logging-elasticsearch-client"
+
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/.helmignore b/src/seba_charts/cord-platform/charts/nem-monitoring/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/Chart.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/Chart.yaml
new file mode 100644 (file)
index 0000000..767e972
--- /dev/null
@@ -0,0 +1,3 @@
+description: Time Series Storage and Dashboard for SEBA
+name: nem-monitoring
+version: 1.0.0
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/README.md b/src/seba_charts/cord-platform/charts/nem-monitoring/README.md
new file mode 100644 (file)
index 0000000..d15253b
--- /dev/null
@@ -0,0 +1,20 @@
+# Nem Monitoring
+
+To deploy this chart please use:
+
+```shell
+helm install -n nem-monitoring nem-monitoring/
+```
+
+It will expose:
+
+- grafana on port `31300`
+- prometheus on port `31301`
+
+## Running on minikube
+
+On minikube you don't need all the permission schema, so install this chart with:
+
+```shell
+helm install -n nem-monitoring nem-monitoring/ -f nem-monitoring/examples/nem-monitoring-minikube.yaml
+```
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/Chart.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/Chart.yaml
new file mode 100644 (file)
index 0000000..f08f136
--- /dev/null
@@ -0,0 +1,15 @@
+appVersion: 5.1.3
+description: The leading tool for querying and visualizing time series and metrics.
+engine: gotpl
+home: https://grafana.net
+icon: https://raw.githubusercontent.com/Same/master/public/img/logo_transparent_400x.png
+kubeVersion: ^1.8.0-0
+maintainers:
+- email: zanhsieh@gmail.com
+  name: zanhsieh
+- email: rluckie@cisco.com
+  name: rtluckie
+name: grafana
+sources:
+- https://github.com/Same
+version: 1.12.0
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/README.md b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/README.md
new file mode 100644 (file)
index 0000000..1065dab
--- /dev/null
@@ -0,0 +1,159 @@
+# Grafana Helm Chart
+
+* Installs the web dashboarding system [Grafana](http://grafana.org/)
+
+## TL;DR;
+
+```console
+$ helm install stable/grafana
+```
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm install --name my-release stable/grafana
+```
+
+## Uninstalling the Chart
+
+To uninstall/delete the my-release deployment:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release.
+
+
+## Configuration
+
+
+| Parameter                  | Description                         | Default                                                 |
+|----------------------------|-------------------------------------|---------------------------------------------------------|
+| `replicas`                 | Number of nodes | `1` |
+| `deploymentStrategy`       | Deployment strategy | `RollingUpdate` |
+| `image.repository`         | Image repository | `grafana/grafana` |
+| `image.tag`                | Image tag. (`Must be >= 5.0.0`) Possible values listed [here](https://hub.docker.com/r/grafana/grafana/tags/).| `5.0.4`|
+| `image.pullPolicy`         | Image pull policy | `IfNotPresent` |
+| `service.type`             | Kubernetes service type | `ClusterIP` |
+| `service.port`             | Kubernetes port where service is exposed| `9000` |
+| `service.annotations`      | Service annotations | `80` |
+| `service.labels`           | Custom labels                       | `{}`
+| `ingress.enabled`          | Enables Ingress | `false` |
+| `ingress.annotations`      | Ingress annotations | `{}` |
+| `ingress.labels`           | Custom labels                       | `{}`
+| `ingress.hosts`            | Ingress accepted hostnames | `[]` |
+| `ingress.tls`              | Ingress TLS configuration | `[]` |
+| `resources`                | CPU/Memory resource requests/limits | `{}` |
+| `nodeSelector`             | Node labels for pod assignment | `{}` |
+| `tolerations`              | Toleration labels for pod assignment | `[]` |
+| `affinity`                 | Affinity settings for pod assignment | `{}` |
+| `persistence.enabled`      | Use persistent volume to store data | `false` |
+| `persistence.size`         | Size of persistent volume claim | `10Gi` |
+| `persistence.existingClaim`| Use an existing PVC to persist data | `nil` |
+| `persistence.storageClassName` | Type of persistent volume claim | `nil` |
+| `persistence.accessModes`  | Persistence access modes | `[]` |
+| `persistence.subPath`      | Mount a sub directory of the persistent volume if set | `""` |
+| `schedulerName`            | Alternate scheduler name | `nil` |
+| `env`                      | Extra environment variables passed to pods | `{}` |
+| `envFromSecret`            | The name of a Kubenretes secret (must be manually created in the same namespace) containing values to be added to the environment | `""` |
+| `extraSecretMounts`        | Additional grafana server secret mounts | `[]` |
+| `datasources`              | Configure grafana datasources | `{}` |
+| `dashboardProviders`       | Configure grafana dashboard providers | `{}` |
+| `dashboards`               | Dashboards to import | `{}` |
+| `dashboardsConfigMaps`     | ConfigMaps reference that contains dashboards | `{}` |
+| `grafana.ini`              | Grafana's primary configuration | `{}` |
+| `ldap.existingSecret`      | The name of an existing secret containing the `ldap.toml` file, this must have the key `ldap-toml`. | `""` |
+| `ldap.config  `            | Grafana's LDAP configuration    | `""` |
+| `annotations`              | Deployment annotations | `{}` |
+| `podAnnotations`           | Pod annotations | `{}` |
+| `sidecar.dashboards.enabled`            | Enabled the cluster wide search for dashboards and adds/updates/deletes them in grafana | false |
+| `sidecar.dashboards.label`            | Label that config maps with dashboards should have to be added | false |
+| `sidecar.datasources.enabled`            | Enabled the cluster wide search for datasources and adds/updates/deletes them in grafana | false |
+| `sidecar.datasources.label`            | Label that config maps with datasources should have to be added | false |
+| `smtp.existingSecret`      | The name of an existing secret containing the SMTP credentials, this must have the keys `user` and `password`. | `""` |
+
+## Sidecar for dashboards
+
+If the parameter `sidecar.dashboards.enabled` is set, a sidecar container is deployed in the grafana pod. This container watches all config maps in the cluster and filters out the ones with a label as defined in `sidecar.dashboards.label`. The files defined in those configmaps are written to a folder and accessed by grafana. Changes to the configmaps are monitored and the imported dashboards are deleted/updated. A recommendation is to use one configmap per dashboard, as an reduction of multiple dashboards inside one configmap is currently not properly mirrored in grafana.
+Example dashboard config:
+```
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sample-grafana-dashboard
+  labels:
+     grafana_dashboard: 1
+data:
+  k8s-dashboard.json: |-
+  [...]
+```
+
+## Sidecar for datasources
+
+If the parameter `sidecar.datasource.enabled` is set, a sidecar container is deployed in the grafana pod. This container watches all config maps in the cluster and filters out the ones with a label as defined in `sidecar.datasources.label`. The files defined in those configmaps are written to a folder and accessed by grafana on startup. Using these yaml files, the data sources in grafana can be modified.
+
+Example datasource config adapted from [Grafana](http://docs.grafana.org/administration/provisioning/#example-datasource-config-file):
+```
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sample-grafana-datasource
+  labels:
+     grafana_datasource: 1
+data:
+       datasource.yaml: |-
+               # config file version
+               apiVersion: 1
+
+               # list of datasources that should be deleted from the database
+               deleteDatasources:
+                 - name: Graphite
+                   orgId: 1
+
+               # list of datasources to insert/update depending
+               # whats available in the database
+               datasources:
+                 # <string, required> name of the datasource. Required
+               - name: Graphite
+                 # <string, required> datasource type. Required
+                 type: graphite
+                 # <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
+                 access: proxy
+                 # <int> org id. will default to orgId 1 if not specified
+                 orgId: 1
+                 # <string> url
+                 url: http://localhost:8080
+                 # <string> database password, if used
+                 password:
+                 # <string> database user, if used
+                 user:
+                 # <string> database name, if used
+                 database:
+                 # <bool> enable/disable basic auth
+                 basicAuth:
+                 # <string> basic auth username
+                 basicAuthUser:
+                 # <string> basic auth password
+                 basicAuthPassword:
+                 # <bool> enable/disable with credentials headers
+                 withCredentials:
+                 # <bool> mark as default datasource. Max one per org
+                 isDefault:
+                 # <map> fields that will be converted to json and stored in json_data
+                 jsonData:
+                    graphiteVersion: "1.1"
+                    tlsAuth: true
+                    tlsAuthWithCACert: true
+                 # <string> json object of data that will be encrypted.
+                 secureJsonData:
+                   tlsCACert: "..."
+                   tlsClientCert: "..."
+                   tlsClientKey: "..."
+                 version: 1
+                 # <bool> allow users to edit datasources from the UI.
+                 editable: false
+
+```
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..634e30a
--- /dev/null
@@ -0,0 +1,37 @@
+1. Get your '{{ .Values.adminUser }}' user password by running:
+
+   kubectl get secret --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
+
+2. The Grafana server can be accessed via port {{ .Values.service.port }} on the following DNS name from within your cluster:
+
+   {{ template "grafana.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
+{{ if .Values.ingress.enabled }}
+   From outside the cluster, the server URL(s) are:
+{{- range .Values.ingress.hosts }}
+     http://{{ . }}
+{{- end }}
+{{ else }}
+   Get the Grafana URL to visit by running these commands in the same shell:
+{{ if contains "NodePort" .Values.service.type -}}
+     export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "grafana.fullname" . }})
+     export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+     echo http://$NODE_IP:$NODE_PORT
+{{ else if contains "LoadBalancer" .Values.service.type -}}
+   NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+        You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "grafana.fullname" . }}'
+     export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "grafana.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+     http://$SERVICE_IP:{{ .Values.service.port -}}
+{{ else if contains "ClusterIP"  .Values.service.type }}
+     export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "grafana.fullname" . }},component={{ .Values.name }}" -o jsonpath="{.items[0].metadata.name}")
+     kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000
+{{- end }}
+{{- end }}
+
+3. Login with the password from step 1 and the username: {{ .Values.adminUser }}
+
+{{- if not .Values.persistence.enabled }}
+#################################################################################
+######   WARNING: Persistence is disabled!!! You will lose your data when   #####
+######            the Grafana pod is terminated.                            #####
+#################################################################################
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..3a3ebd3
--- /dev/null
@@ -0,0 +1,43 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "grafana.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "grafana.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "grafana.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account
+*/}}
+{{- define "grafana.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+    {{ default (include "grafana.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrole.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrole.yaml
new file mode 100644 (file)
index 0000000..47452f4
--- /dev/null
@@ -0,0 +1,23 @@
+{{- if .Values.rbac.create }}
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- with .Values.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+  name: {{ template "grafana.fullname" . }}-clusterrole
+{{- if or .Values.sidecar.dashboards.enabled .Values.sidecar.datasources.enabled }}
+rules:
+- apiGroups: [""] # "" indicates the core API group
+  resources: ["configmaps"]
+  verbs: ["get", "watch", "list"]
+{{- else }}
+rules: []
+{{- end}}
+{{- end}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrolebinding.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/clusterrolebinding.yaml
new file mode 100644 (file)
index 0000000..093e551
--- /dev/null
@@ -0,0 +1,23 @@
+{{- if .Values.rbac.create }}
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+  name: {{ template "grafana.fullname" . }}-clusterrolebinding
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- with .Values.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ template "grafana.serviceAccountName" . }}
+    namespace: {{ .Release.Namespace }}
+roleRef:
+  kind: ClusterRole
+  name: {{ template "grafana.fullname" . }}-clusterrole
+  apiGroup: rbac.authorization.k8s.io
+{{- end}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap-dashboard-provider.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap-dashboard-provider.yaml
new file mode 100644 (file)
index 0000000..0771731
--- /dev/null
@@ -0,0 +1,26 @@
+{{- if .Values.sidecar.dashboards.enabled }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- with .Values.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+  name: {{ template "grafana.fullname" . }}-config-dashboards
+data:
+  provider.yaml: |-
+    apiVersion: 1
+    providers:
+    - name: 'default'
+      orgId: 1
+      folder: ''
+      type: file
+      disableDeletion: false
+      options:
+        path: {{ .Values.sidecar.dashboards.folder }}
+{{- end}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..bc50816
--- /dev/null
@@ -0,0 +1,61 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{- with .Values.plugins }}
+  plugins: {{ . | quote }}
+{{- end }}
+  grafana.ini: |
+{{- range $key, $value := index .Values "grafana.ini" }}
+    [{{ $key }}]
+    {{- range $elem, $elemVal := $value }}
+    {{ $elem }} = {{ $elemVal }}
+    {{- end }}
+{{- end }}
+
+{{- if .Values.datasources }}
+  {{- range $key, $value := .Values.datasources }}
+  {{ $key }}: |
+{{ toYaml $value | indent 4 }}
+  {{- end -}}
+{{- end -}}
+
+{{- if .Values.dashboardProviders }}
+  {{- range $key, $value := .Values.dashboardProviders }}
+  {{ $key }}: |
+{{ toYaml $value | indent 4 }}
+  {{- end -}}
+{{- end -}}
+
+{{- if .Values.dashboards  }}
+  download_dashboards.sh: |
+    #!/usr/bin/env sh
+    set -euf
+    {{- if .Values.dashboardProviders }}
+      {{- range $key, $value := .Values.dashboardProviders }}
+        {{- range $value.providers }}
+    mkdir -p {{ .options.path }}
+        {{- end }}
+      {{- end }}
+    {{- end }}
+
+  {{- range $provider, $dashboards := .Values.dashboards }}
+    {{- range $key, $value := $dashboards }}
+      {{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }}
+    curl -sk \
+    --connect-timeout 60 \
+    --max-time 60 \
+    -H "Accept: application/json" \
+    -H "Content-Type: application/json;charset=UTF-8" \
+    {{- if $value.url -}}{{ $value.url }}{{- else -}} https://grafana.com/api/dashboards/{{ $value.gnetId }}/revisions/{{- if $value.revision -}}{{ $value.revision }}{{- else -}}1{{- end -}}/download{{- end -}}{{ if $value.datasource }}| sed 's|\"datasource\":[^,]*|\"datasource\": \"{{ $value.datasource }}\"|g'{{ end }} \
+    > /var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/dashboards-json-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/dashboards-json-configmap.yaml
new file mode 100644 (file)
index 0000000..8737166
--- /dev/null
@@ -0,0 +1,22 @@
+{{- if .Values.dashboards }}
+  {{- range $provider, $dashboards := .Values.dashboards }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ template "grafana.fullname" $ }}-dashboards-{{ $provider }}
+  labels:
+    app: {{ template "grafana.name" $ }}
+    chart: {{ template "grafana.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+    dashboard-provider: {{ $provider }}
+data:
+  {{- range $key, $value := $dashboards }}
+    {{- if hasKey $value "json" }}
+  {{ $key }}.json: |
+{{ $value.json | indent 4 }}
+    {{- end }}
+  {{- end }}
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..96e9afd
--- /dev/null
@@ -0,0 +1,273 @@
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- with .Values.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+  replicas: {{ .Values.replicas }}
+  selector:
+    matchLabels:
+      app: {{ template "grafana.name" . }}
+      release: {{ .Release.Name }}
+  strategy:
+    type: {{ .Values.deploymentStrategy }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "grafana.name" . }}
+        release: {{ .Release.Name }}
+{{- with .Values.podAnnotations }}
+      annotations:
+{{ toYaml . | indent 8 }}
+{{- end }}
+    spec:
+      serviceAccountName: {{ template "grafana.serviceAccountName" . }}
+{{- if .Values.schedulerName }}
+      schedulerName: "{{ .Values.schedulerName }}"
+{{- end }}
+      securityContext:
+        runAsUser: 472
+        fsGroup: 472
+{{- if .Values.dashboards }}
+      initContainers:
+        - name: download-dashboards
+          image: "{{ .Values.downloadDashboardsImage.repository }}:{{ .Values.downloadDashboardsImage.tag }}"
+          imagePullPolicy: {{ .Values.downloadDashboardsImage.pullPolicy }}
+          command: ["sh", "/etc/grafana/download_dashboards.sh"]
+          volumeMounts:
+            - name: config
+              mountPath: "/etc/grafana/download_dashboards.sh"
+              subPath: download_dashboards.sh
+            - name: storage
+              mountPath: "/var/lib/grafana"
+              subPath: {{ .Values.persistence.subPath }}
+          {{- range .Values.extraSecretMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+{{- end }}
+      {{- if .Values.image.pullSecrets }}
+      imagePullSecrets:
+      {{- range .Values.image.pullSecrets }}
+        - name: {{ . }}
+      {{- end}}
+      {{- end }}
+      containers:
+{{- if .Values.sidecar.dashboards.enabled }}
+        - name: {{ template "grafana.name" . }}-sc-dashboard
+          image: "{{ .Values.sidecar.image }}"
+          imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
+          env:
+            - name: LABEL
+              value: "{{ .Values.sidecar.dashboards.label }}"
+            - name: FOLDER
+              value: "{{ .Values.sidecar.dashboards.folder }}"
+          resources:
+{{ toYaml .Values.sidecar.resources | indent 12 }}
+          volumeMounts:
+            - name: sc-dashboard-volume
+              mountPath: {{ .Values.sidecar.dashboards.folder | quote }}
+{{- end}}
+{{- if .Values.sidecar.datasources.enabled }}
+        - name: {{ template "grafana.name" . }}-sc-datasources
+          image: "{{ .Values.sidecar.image }}"
+          imagePullPolicy: {{ .Values.sidecar.imagePullPolicy }}
+          env:
+            - name: LABEL
+              value: "{{ .Values.sidecar.datasources.label }}"
+            - name: FOLDER
+              value: "/etc/grafana/provisioning/datasources"
+          resources:
+{{ toYaml .Values.sidecar.resources | indent 12 }}
+          volumeMounts:
+            - name: sc-datasources-volume
+              mountPath: "/etc/grafana/provisioning/datasources"
+{{- end}}
+        - name: {{ .Chart.Name }}
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          volumeMounts:
+            - name: config
+              mountPath: "/etc/Same.ini"
+              subPath: grafana.ini
+            - name: ldap
+              mountPath: "/etc/grafana/ldap.toml"
+              subPath: ldap.toml
+{{- if .Values.dashboards }}
+  {{- range $provider, $dashboards := .Values.dashboards }}
+    {{- range $key, $value := $dashboards }}
+      {{- if hasKey $value "json" }}
+            - name: dashboards-{{ $provider }}
+              mountPath: "/var/lib/grafana/dashboards/{{ $provider }}/{{ $key }}.json"
+              subPath: "{{ $key }}.json"
+      {{- end }}
+    {{- end }}
+  {{- end }}
+{{- end -}}
+{{- if .Values.dashboardsConfigMaps }}
+  {{- range keys .Values.dashboardsConfigMaps }}
+            - name: dashboards-{{ . }}
+              mountPath: "/var/lib/grafana/dashboards/{{ . }}"
+  {{- end }}
+{{- end }}
+{{- if .Values.datasources }}
+            - name: config
+              mountPath: "/etc/grafana/provisioning/datasources/datasources.yaml"
+              subPath: datasources.yaml
+{{- end }}
+{{- if .Values.dashboardProviders }}
+            - name: config
+              mountPath: "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml"
+              subPath: dashboardproviders.yaml
+{{- end }}
+{{- if .Values.sidecar.dashboards.enabled }}
+            - name: sc-dashboard-volume
+              mountPath: {{ .Values.sidecar.dashboards.folder | quote }}
+            - name: sc-dashboard-provider
+              mountPath: "/etc/grafana/provisioning/dashboards"
+{{- end}}
+{{- if .Values.sidecar.datasources.enabled }}
+            - name: sc-datasources-volume
+              mountPath: "/etc/grafana/provisioning/datasources"
+{{- end}}
+            - name: storage
+              mountPath: "/var/lib/grafana"
+              subPath: {{ .Values.persistence.subPath }}
+          {{- range .Values.extraSecretMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+          ports:
+            - name: service
+              containerPort: {{ .Values.service.port }}
+              protocol: TCP
+            - name: grafana
+              containerPort: 3000
+              protocol: TCP
+          env:
+            - name: GF_SECURITY_ADMIN_USER
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "grafana.fullname" . }}
+                  key: admin-user
+            - name: GF_SECURITY_ADMIN_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ template "grafana.fullname" . }}
+                  key: admin-password
+            {{- if .Values.plugins }}
+            - name: GF_INSTALL_PLUGINS
+              valueFrom:
+                configMapKeyRef:
+                  name: {{ template "grafana.fullname" . }}
+                  key: plugins
+            {{- end }}
+            {{- if .Values.smtp.existingSecret }}
+            - name: GF_SMTP_USER
+              valueFrom:
+                secretKeyRef:
+                  name: {{ .Values.smtp.existingSecret }}
+                  key: user
+            - name: GF_SMTP_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: {{ .Values.smtp.existingSecret }}
+                  key: password
+            {{- end }}
+{{- range $key, $value := .Values.env }}
+            - name: "{{ $key }}"
+              value: "{{ $value }}"
+{{- end }}
+          {{- if .Values.envFromSecret }}
+          envFrom:
+            - secretRef:
+                name: {{ .Values.envFromSecret }}
+          {{- end }}
+          livenessProbe:
+            httpGet:
+              path: /api/health
+              port: 3000
+          readinessProbe:
+            httpGet:
+              path: /api/health
+              port: 3000
+            initialDelaySeconds: 60
+            timeoutSeconds: 30
+            failureThreshold: 10
+            periodSeconds: 10
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+      volumes:
+        - name: config
+          configMap:
+            name: {{ template "grafana.fullname" . }}
+        {{- if .Values.dashboards }}
+          {{- range keys .Values.dashboards }}
+        - name: dashboards-{{ . }}
+          configMap:
+            name: {{ template "grafana.fullname" $ }}-dashboards-{{ . }}
+          {{- end }}
+        {{- end }}
+        {{- if .Values.dashboardsConfigMaps }}
+          {{- range $provider, $name := .Values.dashboardsConfigMaps }}
+        - name: dashboards-{{ $provider }}
+          configMap:
+            name: {{ $name }}
+          {{- end }}
+        {{- end }}
+        - name: ldap
+          secret:
+            {{- if .Values.ldap.existingSecret }}
+            secretName: {{ .Values.ldap.existingSecret }}
+            {{- else }}
+            secretName: {{ template "grafana.fullname" . }}
+            {{- end }}
+            items:
+              - key: ldap-toml
+                path: ldap.toml
+        - name: storage
+      {{- if .Values.persistence.enabled }}
+          persistentVolumeClaim:
+            claimName: {{ .Values.persistence.existingClaim | default (include "grafana.fullname" .) }}
+      {{- else }}
+          emptyDir: {}
+      {{- end -}}
+      {{- if .Values.sidecar.dashboards.enabled }}
+        - name: sc-dashboard-volume
+          emptyDir: {}
+        - name: sc-dashboard-provider
+          configMap:
+            name: {{ template "grafana.fullname" . }}-config-dashboards
+      {{- end }}
+      {{- if .Values.sidecar.datasources.enabled }}
+        - name: sc-datasources-volume
+          emptyDir: {}
+      {{- end -}}
+      {{- range .Values.extraSecretMounts }}
+        - name: {{ .name }}
+          secret:
+            secretName: {{ .secretName }}
+      {{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/ingress.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/ingress.yaml
new file mode 100644 (file)
index 0000000..307166f
--- /dev/null
@@ -0,0 +1,42 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "grafana.fullname" . -}}
+{{- $servicePort := .Values.service.port -}}
+{{- $ingressPath := .Values.ingress.path -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+  name: {{ $fullName }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- if .Values.ingress.labels }}
+{{ toYaml .Values.ingress.labels | indent 4 }}
+{{- end }}
+{{- with .Values.ingress.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+{{- if .Values.ingress.tls }}
+  tls:
+  {{- range .Values.ingress.tls }}
+    - hosts:
+      {{- range .hosts }}
+        - {{ . }}
+      {{- end }}
+      secretName: {{ .secretName }}
+  {{- end }}
+{{- end }}
+  rules:
+  {{- range .Values.ingress.hosts }}
+    - host: {{ . }}
+      http:
+        paths:
+          - path: {{ $ingressPath }}
+            backend:
+              serviceName: {{ $fullName }}
+              servicePort: {{ $servicePort }}
+  {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/podsecuritypolicy.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/podsecuritypolicy.yaml
new file mode 100644 (file)
index 0000000..ffe4822
--- /dev/null
@@ -0,0 +1,40 @@
+{{- if .Values.rbac.pspEnabled }}
+apiVersion: extensions/v1beta1
+kind: PodSecurityPolicy
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  annotations:
+    seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
+    apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
+    seccomp.security.alpha.kubernetes.io/defaultProfileName:  'docker/default'
+    apparmor.security.beta.kubernetes.io/defaultProfileName:  'runtime/default'
+spec:
+  privileged: false
+  allowPrivilegeEscalation: false
+  requiredDropCapabilities:
+    - ALL
+  volumes:
+    - 'configMap'
+    - 'emptyDir'
+    - 'projected'
+    - 'secret'
+    - 'downwardAPI'
+    - 'persistentVolumeClaim'
+  hostNetwork: false
+  hostIPC: false
+  hostPID: false
+  runAsUser:
+    rule: 'RunAsAny'
+  seLinux:
+    rule: 'RunAsAny'
+  supplementalGroups:
+    rule: 'RunAsAny'
+  fsGroup:
+    rule: 'RunAsAny'
+  readOnlyRootFilesystem: false
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/pvc.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..e1cc032
--- /dev/null
@@ -0,0 +1,24 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  {{- with .Values.persistence.annotations  }}
+  annotations:
+{{ toYaml . | indent 4 }}
+  {{- end }}
+spec:
+  accessModes:
+    {{- range .Values.persistence.accessModes }}
+    - {{ . | quote }}
+    {{- end }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size | quote }}
+  storageClassName: {{ .Values.persistence.storageClassName }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/role.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/role.yaml
new file mode 100644 (file)
index 0000000..8091d49
--- /dev/null
@@ -0,0 +1,18 @@
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.rbac.pspEnabled }}
+rules:
+- apiGroups:      ['extensions']
+  resources:      ['podsecuritypolicies']
+  verbs:          ['use']
+  resourceNames:  [{{ template "grafana.fullname" . }}]
+{{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/rolebinding.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/rolebinding.yaml
new file mode 100644 (file)
index 0000000..199e8fe
--- /dev/null
@@ -0,0 +1,18 @@
+{{- if .Values.rbac.create -}}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: {{ template "grafana.fullname" . }}
+subjects:
+- kind: ServiceAccount
+  name: {{ template "grafana.serviceAccountName" . }}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/secret.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/secret.yaml
new file mode 100644 (file)
index 0000000..a698e05
--- /dev/null
@@ -0,0 +1,20 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+type: Opaque
+data:
+  admin-user: {{ .Values.adminUser | b64enc | quote }}
+  {{- if .Values.adminPassword }}
+  admin-password: {{ .Values.adminPassword | b64enc | quote }}
+  {{- else }}
+  admin-password: {{ randAlphaNum 40 | b64enc | quote }}
+  {{- end }}
+  {{- if not .Values.ldap.existingSecret }}
+  ldap-toml: {{ .Values.ldap.config | b64enc | quote }}
+  {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/service.yaml
new file mode 100644 (file)
index 0000000..6dcd63a
--- /dev/null
@@ -0,0 +1,49 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ template "grafana.fullname" . }}
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ template "grafana.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- if .Values.service.labels }}
+{{ toYaml .Values.service.labels | indent 4 }}
+{{- end }}
+{{- with .Values.service.annotations }}
+  annotations:
+{{ toYaml . | indent 4 }}
+{{- end }}
+spec:
+{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
+  type: ClusterIP
+  {{- if .Values.service.clusterIP }}
+  clusterIP: {{ .Values.service.clusterIP }}
+  {{end}}
+{{- else if eq .Values.service.type "LoadBalancer" }}
+  type: {{ .Values.service.type }}
+  {{- if .Values.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.service.loadBalancerIP }}
+  {{- end }}
+  {{- if .Values.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
+  {{- end -}}
+{{- else }}
+  type: {{ .Values.service.type }}
+{{- end }}
+{{- if .Values.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.service.externalIPs | indent 4 }}
+{{- end }}
+  ports:
+    - name: service
+      port: {{ .Values.service.port }}
+      protocol: TCP
+      targetPort: 3000
+{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
+      nodePort: {{.Values.service.nodePort}}
+{{ end }}
+  selector:
+    app: {{ template "grafana.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/templates/serviceaccount.yaml
new file mode 100644 (file)
index 0000000..04601d0
--- /dev/null
@@ -0,0 +1,11 @@
+{{- if .Values.serviceAccount.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "grafana.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "grafana.serviceAccountName" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/values.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/grafana/values.yaml
new file mode 100644 (file)
index 0000000..26a0fd3
--- /dev/null
@@ -0,0 +1,256 @@
+rbac:
+  create: true
+  pspEnabled: true
+serviceAccount:
+  create: true
+  name:
+
+replicas: 1
+
+deploymentStrategy: RollingUpdate
+
+image:
+  repository: grafana/grafana
+  tag: 5.4.3
+  pullPolicy: IfNotPresent
+
+  ## Optionally specify an array of imagePullSecrets.
+  ## Secrets must be manually created in the namespace.
+  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
+  ##
+  # pullSecrets:
+  #   - myRegistrKeySecretName
+
+downloadDashboardsImage:
+  repository: akrainoenea/curl
+  tag: latest
+  pullPolicy: IfNotPresent
+
+## Pod Annotations
+# podAnnotations: {}
+
+## Deployment annotations
+# annotations: {}
+
+## Expose the grafana service to be accessed from outside the cluster (LoadBalancer service).
+## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
+## ref: http://kubernetes.io/docs/user-guide/services/
+##
+service:
+  type: ClusterIP
+  port: 80
+  annotations: {}
+  labels: {}
+
+ingress:
+  enabled: false
+  annotations: {}
+    # kubernetes.io/ingress.class: nginx
+    # kubernetes.io/tls-acme: "true"
+  labels: {}
+  path: /
+  hosts:
+    - chart-example.local
+  tls: []
+  #  - secretName: chart-example-tls
+  #    hosts:
+  #      - chart-example.local
+
+resources: {}
+#  limits:
+#    cpu: 100m
+#    memory: 128Mi
+#  requests:
+#    cpu: 100m
+#    memory: 128Mi
+
+## Node labels for pod assignment
+## ref: https://kubernetes.io/docs/user-guide/node-selection/
+#
+nodeSelector: {}
+
+## Tolerations for pod assignment
+## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
+##
+tolerations: []
+
+## Affinity for pod assignment
+## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
+##
+affinity: {}
+
+## Enable persistence using Persistent Volume Claims
+## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
+##
+persistence:
+  enabled: false
+  # storageClassName: default
+  # accessModes:
+  #   - ReadWriteOnce
+  # size: 10Gi
+  # annotations: {}
+  # subPath: ""
+  # existingClaim:
+
+adminUser: admin
+# adminPassword: strongpassword
+
+## Use an alternate scheduler, e.g. "stork".
+## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+##
+# schedulerName:
+
+## Extra environment variables that will be pass onto deployment pods
+env: {}
+
+## The name of a secret in the same kubernetes namespace which contain values to be added to the environment
+## This can be useful for auth tokens, etc
+envFromSecret: ""
+
+## Additional grafana server secret mounts
+# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
+extraSecretMounts: []
+  # - name: secret-files
+  #   mountPath: /etc/secrets
+  #   secretName: grafana-secret-files
+  #   readOnly: true
+
+# Pass the plugins you want installed as a comma separated list.
+# plugins: "digrich-bubblechart-panel,grafana-clock-panel"
+plugins: ""
+
+## Configure grafana datasources
+## ref: http://docs.grafana.org/administration/provisioning/#datasources
+##
+datasources: {}
+#  datasources.yaml:
+#    apiVersion: 1
+#    datasources:
+#    - name: Prometheus
+#      type: prometheus
+#      url: http://prometheus-prometheus-server
+#      access: proxy
+#      isDefault: true
+
+## Configure grafana dashboard providers
+## ref: http://docs.grafana.org/administration/provisioning/#dashboards
+##
+## `path` must be /var/lib/grafana/dashboards/<provider_name>
+##
+dashboardProviders: {}
+#  dashboardproviders.yaml:
+#    apiVersion: 1
+#    providers:
+#    - name: 'default'
+#      orgId: 1
+#      folder: ''
+#      type: file
+#      disableDeletion: false
+#      editable: true
+#      options:
+#        path: /var/lib/grafana/default/dashboards
+
+## Configure grafana dashboard to import
+## NOTE: To use dashboards you must also enable/configure dashboardProviders
+## ref: https://grafana.com/dashboards
+##
+## dashboards per provider, use provider name as key.
+##
+dashboards: {}
+#  default:
+#    some-dashboard:
+#      json: |
+#        $RAW_JSON
+#    prometheus-stats:
+#      gnetId: 2
+#      revision: 2
+#      datasource: Prometheus
+#    local-dashboard:
+#      url: https://example.com/repository/test.json
+
+## Reference to external ConfigMap per provider. Use provider name as key and ConfiMap name as value.
+## A provider dashboards must be defined either by external ConfigMaps or in values.yaml, not in both.
+## ConfigMap data example:
+##
+## data:
+##   example-dashboard.json: |
+##     RAW_JSON
+##
+dashboardsConfigMaps: {}
+#  default: ""
+
+## Grafana's primary configuration
+## NOTE: values in map will be converted to ini format
+## ref: http://docs.grafana.org/installation/configuration/
+##
+grafana.ini:
+  paths:
+    data: /var/lib/grafana/data
+    logs: /var/log/grafana
+    plugins: /var/lib/grafana/plugins
+    provisioning: /etc/grafana/provisioning
+  analytics:
+    check_for_updates: true
+  log:
+    mode: console
+  grafana_net:
+    url: https://grafana.net
+## LDAP Authentication can be enabled with the following values on grafana.ini
+## NOTE: Grafana will fail to start if the value for ldap.toml is invalid
+  # auth.ldap:
+  #   enabled: true
+  #   allow_sign_up: true
+  #   config_file: /etc/grafana/ldap.toml
+
+## Grafana's LDAP configuration
+## Templated by the template in _helpers.tpl
+## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled
+## ref: http://docs.grafana.org/installation/configuration/#auth-ldap
+## ref: http://docs.grafana.org/installation/ldap/#configuration
+ldap:
+  # `existingSecret` is a reference to an existing secret containing the ldap configuration
+  # for Grafana in a key `ldap-toml`.
+  existingSecret: ""
+  # `config` is the content of `ldap.toml` that will be stored in the created secret
+  config: ""
+  # config: |-
+  #   verbose_logging = true
+
+  #   [[servers]]
+  #   host = "my-ldap-server"
+  #   port = 636
+  #   use_ssl = true
+  #   start_tls = false
+  #   ssl_skip_verify = false
+  #   bind_dn = "uid=%s,ou=users,dc=myorg,dc=com"
+
+## Grafana's SMTP configuration
+## NOTE: To enable, grafana.ini must be configured with smtp.enabled
+## ref: http://docs.grafana.org/installation/configuration/#smtp
+smtp:
+  # `existingSecret` is a reference to an existing secret containing the smtp configuration
+  # for Grafana in keys `user` and `password`.
+  existingSecret: ""
+
+## Sidecars that collect the configmaps with specified label and stores the included files them into the respective folders
+## Requires at least Grafana 5 to work and can't be used together with parameters dashboardProviders, datasources and dashboards
+sidecar:
+  image: akrainoenea/k8s-sidecar:0.0.3
+  imagePullPolicy: IfNotPresent
+  resources:
+#   limits:
+#     cpu: 100m
+#     memory: 100Mi
+#   requests:
+#     cpu: 50m
+#     memory: 50Mi
+  dashboards:
+    enabled: false
+    # label that the configmaps with dashboards are marked with
+    label: grafana_dashboard
+    # folder in the pod that should hold the collected dashboards
+    folder: /tmp/dashboards
+  datasources:
+    enabled: false
+    # label that the configmaps with datasources are marked with
+    label: grafana_datasource
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/.helmignore b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/Chart.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/Chart.yaml
new file mode 100644 (file)
index 0000000..837fb1f
--- /dev/null
@@ -0,0 +1,19 @@
+appVersion: 2.3.1
+description: Prometheus is a monitoring system and time series database.
+engine: gotpl
+home: https://prometheus.io/
+icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/assets/prometheus_logo-cb55bb5c346.png
+maintainers:
+- email: mgoodness@gmail.com
+  name: mgoodness
+- email: gianrubio@gmail.com
+  name: gianrubio
+name: prometheus
+sources:
+- https://github.com/prometheus/alertmanager
+- https://github.com/prometheus/prometheus
+- https://github.com/prometheus/pushgateway
+- https://github.com/prometheus/node_exporter
+- https://github.com/kubernetes/kube-state-metrics
+tillerVersion: '>=2.8.0'
+version: 6.8.1
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/OWNERS b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/OWNERS
new file mode 100644 (file)
index 0000000..0cfd950
--- /dev/null
@@ -0,0 +1,6 @@
+approvers:
+- mgoodness
+- gianrubio
+reviewers:
+- mgoodness
+- gianrubio
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/README.md b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/README.md
new file mode 100644 (file)
index 0000000..d39361e
--- /dev/null
@@ -0,0 +1,340 @@
+# Prometheus
+
+[Prometheus](https://prometheus.io/), a [Cloud Native Computing Foundation](https://cncf.io/) project, is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
+
+## TL;DR;
+
+```console
+$ helm install stable/prometheus
+```
+
+## Introduction
+
+This chart bootstraps a [Prometheus](https://prometheus.io/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+## Prerequisites
+
+- Kubernetes 1.3+ with Beta APIs enabled
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm install --name my-release stable/prometheus
+```
+
+The command deploys Prometheus on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
+
+> **Tip**: List all releases using `helm list`
+
+## Uninstalling the Chart
+
+To uninstall/delete the `my-release` deployment:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release.
+
+## Prometheus 2.x
+
+Prometheus version 2.x has made changes to alertmanager, storage and recording rules. Check out the migration guide [here](https://prometheus.io/docs/prometheus/2.0/migration/)
+
+Users of this chart will need to update their alerting rules to the new format before they can upgrade.
+
+## Upgrading from previous chart versions.
+
+As of version 5.0, this chart uses Prometheus 2.1. This version of prometheus introduces a new data format and is not compatible with prometheus 1.x. It is recommended to install this as a new release, as updating existing releases will not work. See the [prometheus docs](https://prometheus.io/docs/prometheus/latest/migration/#storage) for instructions on retaining your old data.
+
+### Example migration
+
+Assuming you have an existing release of the prometheus chart, named `prometheus-old`. In order to update to prometheus 2.1 while keeping your old data do the following:
+
+1. Update the `prometheus-old` release. Disable scraping on every component besides the prometheus server, similar to the configuration below:
+
+       ```
+       alertmanager:
+         enabled: false
+       alertmanagerFiles:
+         alertmanager.yml: ""
+       kubeStateMetrics:
+         enabled: false
+       nodeExporter:
+         enabled: false
+       pushgateway:
+         enabled: false
+       server:
+         extraArgs:
+           storage.local.retention: 720h
+       serverFiles:
+         alerts: ""
+         prometheus.yml: ""
+         rules: ""
+       ```
+
+1. Deploy a new release of the chart with version 5.0+ using prometheus 2.x. In the values.yaml set the scrape config as usual, and also add the `prometheus-old` instance as a remote-read target.
+
+   ```
+         prometheus.yml:
+           ...
+           remote_read:
+           - url: http://prometheus-old/api/v1/read
+           ...
+   ```
+
+   Old data will be available when you query the new prometheus instance.
+
+## Configuration
+
+The following table lists the configurable parameters of the Prometheus chart and their default values.
+
+Parameter | Description | Default
+--------- | ----------- | -------
+`alertmanager.enabled` | If true, create alertmanager | `true`
+`alertmanager.name` | alertmanager container name | `alertmanager`
+`alertmanager.image.repository` | alertmanager container image repository | `prom/alertmanager`
+`alertmanager.image.tag` | alertmanager container image tag | `v0.15.0`
+`alertmanager.image.pullPolicy` | alertmanager container image pull policy | `IfNotPresent`
+`alertmanager.prefixURL` | The prefix slug at which the server can be accessed | ``
+`alertmanager.baseURL` | The external url at which the server can be accessed | `/`
+`alertmanager.extraArgs` | Additional alertmanager container arguments | `{}`
+`alertmanager.configMapOverrideName` | Prometheus alertmanager ConfigMap override where full-name is `{{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}}` and setting this value will prevent the default alertmanager ConfigMap from being generated | `""`
+`alertmanager.ingress.enabled` | If true, alertmanager Ingress will be created | `false`
+`alertmanager.ingress.annotations` | alertmanager Ingress annotations | `{}`
+`alertmanager.ingress.extraLabels` | alertmanager Ingress additional labels | `{}`
+`alertmanager.ingress.hosts` | alertmanager Ingress hostnames | `[]`
+`alertmanager.ingress.tls` | alertmanager Ingress TLS configuration (YAML) | `[]`
+`alertmanager.nodeSelector` | node labels for alertmanager pod assignment | `{}`
+`alertmanager.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]`
+`alertmanager.schedulerName` | alertmanager alternate scheduler name | `nil`
+`alertmanager.persistentVolume.enabled` | If true, alertmanager will create a Persistent Volume Claim | `true`
+`alertmanager.persistentVolume.accessModes` | alertmanager data Persistent Volume access modes | `[ReadWriteOnce]`
+`alertmanager.persistentVolume.annotations` | Annotations for alertmanager Persistent Volume Claim | `{}`
+`alertmanager.persistentVolume.existingClaim` | alertmanager data Persistent Volume existing claim name | `""`
+`alertmanager.persistentVolume.mountPath` | alertmanager data Persistent Volume mount root path | `/data`
+`alertmanager.persistentVolume.size` | alertmanager data Persistent Volume size | `2Gi`
+`alertmanager.persistentVolume.storageClass` | alertmanager data Persistent Volume Storage Class | `unset`
+`alertmanager.persistentVolume.subPath` | Subdirectory of alertmanager data Persistent Volume to mount | `""`
+`alertmanager.podAnnotations` | annotations to be added to alertmanager pods | `{}`
+`alertmanager.replicaCount` | desired number of alertmanager pods | `1`
+`alertmanager.resources` | alertmanager pod resource requests & limits | `{}`
+`alertmanager.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for Alert Manager containers | `{}`
+`alertmanager.service.annotations` | annotations for alertmanager service | `{}`
+`alertmanager.service.clusterIP` | internal alertmanager cluster service IP | `""`
+`alertmanager.service.externalIPs` | alertmanager service external IP addresses | `[]`
+`alertmanager.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
+`alertmanager.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`
+`alertmanager.service.servicePort` | alertmanager service port | `80`
+`alertmanager.service.type` | type of alertmanager service to create | `ClusterIP`
+`alertmanagerFiles.alertmanager.yml` | Prometheus alertmanager configuration | example configuration
+`configmapReload.name` | configmap-reload container name | `configmap-reload`
+`configmapReload.image.repository` | configmap-reload container image repository | `jimmidyson/configmap-reload`
+`configmapReload.image.tag` | configmap-reload container image tag | `v0.2.2`
+`configmapReload.image.pullPolicy` | configmap-reload container image pull policy | `IfNotPresent`
+`configmapReload.extraArgs` | Additional configmap-reload container arguments | `{}`
+`configmapReload.extraConfigmapMounts` | Additional configmap-reload configMap mounts | `[]`
+`configmapReload.resources` | configmap-reload pod resource requests & limits | `{}`
+`initChownData.enabled`  | If false, don't reset data ownership at startup | true
+`initChownData.name` | init-chown-data container name | `init-chown-data`
+`initChownData.image.repository` | init-chown-data container image repository | `busybox`
+`initChownData.image.tag` | init-chown-data container image tag | `latest`
+`initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent`
+`initChownData.resources` | init-chown-data pod resource requests & limits | `{}`
+`kubeStateMetrics.enabled` | If true, create kube-state-metrics | `true`
+`kubeStateMetrics.name` | kube-state-metrics container name | `kube-state-metrics`
+`kubeStateMetrics.image.repository` | kube-state-metrics container image repository| `quay.io/coreos/kube-state-metrics`
+`kubeStateMetrics.image.tag` | kube-state-metrics container image tag | `v1.3.1`
+`kubeStateMetrics.image.pullPolicy` | kube-state-metrics container image pull policy | `IfNotPresent`
+`kubeStateMetrics.args` | kube-state-metrics container arguments | `{}`
+`kubeStateMetrics.nodeSelector` | node labels for kube-state-metrics pod assignment | `{}`
+`kubeStateMetrics.podAnnotations` | annotations to be added to kube-state-metrics pods | `{}`
+`kubeStateMetrics.deploymentAnnotations` | annotations to be added to kube-state-metrics deployment | `{}`
+`kubeStateMetrics.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]`
+`kubeStateMetrics.replicaCount` | desired number of kube-state-metrics pods | `1`
+`kubeStateMetrics.resources` | kube-state-metrics resource requests and limits (YAML) | `{}`
+`kubeStateMetrics.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for kube-state-metrics containers | `{}`
+`kubeStateMetrics.service.annotations` | annotations for kube-state-metrics service | `{prometheus.io/scrape: "true"}`
+`kubeStateMetrics.service.clusterIP` | internal kube-state-metrics cluster service IP | `None`
+`kubeStateMetrics.service.externalIPs` | kube-state-metrics service external IP addresses | `[]`
+`kubeStateMetrics.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
+`kubeStateMetrics.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`
+`kubeStateMetrics.service.servicePort` | kube-state-metrics service port | `80`
+`kubeStateMetrics.service.type` | type of kube-state-metrics service to create | `ClusterIP`
+`nodeExporter.enabled` | If true, create node-exporter | `true`
+`nodeExporter.name` | node-exporter container name | `node-exporter`
+`nodeExporter.image.repository` | node-exporter container image repository| `prom/node-exporter`
+`nodeExporter.image.tag` | node-exporter container image tag | `v0.16.0`
+`nodeExporter.image.pullPolicy` | node-exporter container image pull policy | `IfNotPresent`
+`nodeExporter.extraArgs` | Additional node-exporter container arguments | `{}`
+`nodeExporter.extraHostPathMounts` | Additional node-exporter hostPath mounts | `[]`
+`nodeExporter.extraConfigmapMounts` | Additional node-exporter configMap mounts | `[]`
+`nodeExporter.nodeSelector` | node labels for node-exporter pod assignment | `{}`
+`nodeExporter.podAnnotations` | annotations to be added to node-exporter pods | `{}`
+`nodeExporter.pod.labels` | labels to be added to node-exporter pods | `{}`
+`nodeExporter.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]`
+`nodeExporter.resources` | node-exporter resource requests and limits (YAML) | `{}`
+`nodeExporter.securityContext` | securityContext for containers in pod | `{}`
+`nodeExporter.service.annotations` | annotations for node-exporter service | `{prometheus.io/scrape: "true"}`
+`nodeExporter.service.clusterIP` | internal node-exporter cluster service IP | `None`
+`nodeExporter.service.externalIPs` | node-exporter service external IP addresses | `[]`
+`nodeExporter.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
+`nodeExporter.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`
+`nodeExporter.service.servicePort` | node-exporter service port | `9100`
+`nodeExporter.service.type` | type of node-exporter service to create | `ClusterIP`
+`pushgateway.enabled` | If true, create pushgateway | `true`
+`pushgateway.name` | pushgateway container name | `pushgateway`
+`pushgateway.image.repository` | pushgateway container image repository | `prom/pushgateway`
+`pushgateway.image.tag` | pushgateway container image tag | `v0.5.2`
+`pushgateway.image.pullPolicy` | pushgateway container image pull policy | `IfNotPresent`
+`pushgateway.extraArgs` | Additional pushgateway container arguments | `{}`
+`pushgateway.ingress.enabled` | If true, pushgateway Ingress will be created | `false`
+`pushgateway.ingress.annotations` | pushgateway Ingress annotations | `{}`
+`pushgateway.ingress.hosts` | pushgateway Ingress hostnames | `[]`
+`pushgateway.ingress.tls` | pushgateway Ingress TLS configuration (YAML) | `[]`
+`pushgateway.nodeSelector` | node labels for pushgateway pod assignment | `{}`
+`pushgateway.podAnnotations` | annotations to be added to pushgateway pods | `{}`
+`pushgateway.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]`
+`pushgateway.replicaCount` | desired number of pushgateway pods | `1`
+`pushgateway.resources` | pushgateway pod resource requests & limits | `{}`
+`pushgateway.service.annotations` | annotations for pushgateway service | `{}`
+`pushgateway.service.clusterIP` | internal pushgateway cluster service IP | `""`
+`pushgateway.service.externalIPs` | pushgateway service external IP addresses | `[]`
+`pushgateway.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
+`pushgateway.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`
+`pushgateway.service.servicePort` | pushgateway service port | `9091`
+`pushgateway.service.type` | type of pushgateway service to create | `ClusterIP`
+`rbac.create` | If true, create & use RBAC resources | `true`
+`server.name` | Prometheus server container name | `server`
+`server.image.repository` | Prometheus server container image repository | `prom/prometheus`
+`server.image.tag` | Prometheus server container image tag | `v2.3.1`
+`server.image.pullPolicy` | Prometheus server container image pull policy | `IfNotPresent`
+`server.enableAdminApi` |  If true, Prometheus administrative HTTP API will be enabled. Please note, that you should take care of administrative API access protection (ingress or some frontend Nginx with auth) before enabling it. | `false`
+`server.global.scrape_interval` | How frequently to scrape targets by default | `1m`
+`server.global.scrape_timeout` | How long until a scrape request times out | `10s`
+`server.global.evaluation_interval` | How frequently to evaluate rules | `1m`
+`server.extraArgs` | Additional Prometheus server container arguments | `{}`
+`server.prefixURL` | The prefix slug at which the server can be accessed | ``
+`server.baseURL` | The external url at which the server can be accessed | ``
+`server.extraHostPathMounts` | Additional Prometheus server hostPath mounts | `[]`
+`server.extraConfigmapMounts` | Additional Prometheus server configMap mounts | `[]`
+`server.extraSecretMounts` | Additional Prometheus server Secret mounts | `[]`
+`server.configMapOverrideName` | Prometheus server ConfigMap override where full-name is `{{.Release.Name}}-{{.Values.server.configMapOverrideName}}` and setting this value will prevent the default server ConfigMap from being generated | `""`
+`server.ingress.enabled` | If true, Prometheus server Ingress will be created | `false`
+`server.ingress.annotations` | Prometheus server Ingress annotations | `[]`
+`server.ingress.extraLabels` | Prometheus server Ingress additional labels | `{}`
+`server.ingress.hosts` | Prometheus server Ingress hostnames | `[]`
+`server.ingress.tls` | Prometheus server Ingress TLS configuration (YAML) | `[]`
+`server.nodeSelector` | node labels for Prometheus server pod assignment | `{}`
+`server.tolerations` | node taints to tolerate (requires Kubernetes >=1.6) | `[]`
+`server.schedulerName` | Prometheus server alternate scheduler name | `nil`
+`server.persistentVolume.enabled` | If true, Prometheus server will create a Persistent Volume Claim | `true`
+`server.persistentVolume.accessModes` | Prometheus server data Persistent Volume access modes | `[ReadWriteOnce]`
+`server.persistentVolume.annotations` | Prometheus server data Persistent Volume annotations | `{}`
+`server.persistentVolume.existingClaim` | Prometheus server data Persistent Volume existing claim name | `""`
+`server.persistentVolume.mountPath` | Prometheus server data Persistent Volume mount root path | `/data`
+`server.persistentVolume.size` | Prometheus server data Persistent Volume size | `8Gi`
+`server.persistentVolume.storageClass` | Prometheus server data Persistent Volume Storage Class |  `unset`
+`server.persistentVolume.subPath` | Subdirectory of Prometheus server data Persistent Volume to mount | `""`
+`server.podAnnotations` | annotations to be added to Prometheus server pods | `{}`
+`server.deploymentAnnotations` | annotations to be added to Prometheus server deployment | `{}'
+`server.replicaCount` | desired number of Prometheus server pods | `1`
+`server.resources` | Prometheus server resource requests and limits | `{}`
+`server.securityContext` | Custom [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for server containers | `{}`
+`server.service.annotations` | annotations for Prometheus server service | `{}`
+`server.service.clusterIP` | internal Prometheus server cluster service IP | `""`
+`server.service.externalIPs` | Prometheus server service external IP addresses | `[]`
+`server.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
+`server.service.loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | `[]`
+`server.service.nodePort` | Port to be used as the service NodePort (ignored if `server.service.type` is not `NodePort`) | `0`
+`server.service.servicePort` | Prometheus server service port | `80`
+`server.service.type` | type of Prometheus server service to create | `ClusterIP`
+`serviceAccounts.alertmanager.create` | If true, create the alertmanager service account | `true`
+`serviceAccounts.alertmanager.name` | name of the alertmanager service account to use or create | `{{ prometheus.alertmanager.fullname }}`
+`serviceAccounts.kubeStateMetrics.create` | If true, create the kubeStateMetrics service account | `true`
+`serviceAccounts.kubeStateMetrics.name` | name of the kubeStateMetrics service account to use or create | `{{ prometheus.kubeStateMetrics.fullname }}`
+`serviceAccounts.nodeExporter.create` | If true, create the nodeExporter service account | `true`
+`serviceAccounts.nodeExporter.name` | name of the nodeExporter service account to use or create | `{{ prometheus.nodeExporter.fullname }}`
+`serviceAccounts.pushgateway.create` | If true, create the pushgateway service account | `true`
+`serviceAccounts.pushgateway.name` | name of the pushgateway service account to use or create | `{{ prometheus.pushgateway.fullname }}`
+`serviceAccounts.server.create` | If true, create the server service account | `true`
+`serviceAccounts.server.name` | name of the server service account to use or create | `{{ prometheus.server.fullname }}`
+`server.terminationGracePeriodSeconds` | Prometheus server Pod termination grace period | `300`
+`server.retention` | (optional) Prometheus data retention | `""`
+`serverFiles.alerts` | Prometheus server alerts configuration | `{}`
+`serverFiles.rules` | Prometheus server rules configuration | `{}`
+`serverFiles.prometheus.yml` | Prometheus server scrape configuration | example configuration
+`networkPolicy.enabled` | Enable NetworkPolicy | `false` |
+
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+$ helm install stable/prometheus --name my-release \
+    --set server.terminationGracePeriodSeconds=360
+```
+
+Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install stable/prometheus --name my-release -f values.yaml
+```
+
+> **Tip**: You can use the default [values.yaml](values.yaml)
+
+### RBAC Configuration
+Roles and RoleBindings resources will be created automatically for `server` and `kubeStateMetrics` services.
+
+To manually setup RBAC you need to set the parameter `rbac.create=false` and specify the service account to be used for each service by setting the parameters: `serviceAccounts.{{ component }}.create` to `false` and `serviceAccounts.{{ component }}.name` to the name of a pre-existing service account.
+
+> **Tip**: You can refer to the default `*-clusterrole.yaml` and `*-clusterrolebinding.yaml` files in [templates](templates/) to customize your own.
+
+### ConfigMap Files
+AlertManager is configured through [alertmanager.yml](https://prometheus.io/docs/alerting/configuration/). This file (and any others listed in `alertmanagerFiles`) will be mounted into the `alertmanager` pod.
+
+Prometheus is configured through [prometheus.yml](https://prometheus.io/docs/operating/configuration/). This file (and any others listed in `serverFiles`) will be mounted into the `server` pod.
+
+### Ingress TLS
+If your cluster allows automatic creation/retrieval of TLS certificates (e.g. [kube-lego](https://github.com/jetstack/kube-lego)), please refer to the documentation for that mechanism.
+
+To manually configure TLS, first create/retrieve a key & certificate pair for the address(es) you wish to protect. Then create a TLS secret in the namespace:
+
+```console
+kubectl create secret tls prometheus-server-tls --cert=path/to/tls.cert --key=path/to/tls.key
+```
+
+Include the secret's name, along with the desired hostnames, in the alertmanager/server Ingress TLS section of your custom `values.yaml` file:
+
+```yaml
+server:
+  ingress:
+    ## If true, Prometheus server Ingress will be created
+    ##
+    enabled: true
+
+    ## Prometheus server Ingress hostnames
+    ## Must be provided if Ingress is enabled
+    ##
+    hosts:
+      - prometheus.domain.com
+
+    ## Prometheus server Ingress TLS configuration
+    ## Secrets must be manually created in the namespace
+    ##
+    tls:
+      - secretName: prometheus-server-tls
+        hosts:
+          - prometheus.domain.com
+```
+
+### NetworkPolicy
+
+Enabling Network Policy for Prometheus will secure connections to Alert Manager
+and Kube State Metrics by only accepting connections from Prometheus Server.
+All inbound connections to Prometheus Server are still allowed.
+
+To enable network policy for Prometheus, install a networking plugin that
+implements the Kubernetes NetworkPolicy spec, and set `networkPolicy.enabled` to true.
+
+If NetworkPolicy is enabled for Prometheus' scrape targets, you may also need
+to manually create a networkpolicy which allows it.
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..289e384
--- /dev/null
@@ -0,0 +1,100 @@
+The Prometheus server can be accessed via port {{ .Values.server.service.servicePort }} on the following DNS name from within your cluster:
+{{ template "prometheus.server.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
+
+{{ if .Values.server.ingress.enabled -}}
+From outside the cluster, the server URL(s) are:
+{{- range .Values.server.ingress.hosts }}
+http://{{ . }}
+{{- end }}
+{{- else }}
+Get the Prometheus server URL by running these commands in the same shell:
+{{- if contains "NodePort" .Values.server.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.server.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.server.service.type }}
+  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+        You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.server.fullname" . }}'
+
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.server.service.servicePort }}
+{{- else if contains "ClusterIP"  .Values.server.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.server.name }}" -o jsonpath="{.items[0].metadata.name}")
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090
+{{- end }}
+{{- end }}
+
+{{- if .Values.server.persistentVolume.enabled }}
+{{- else }}
+#################################################################################
+######   WARNING: Persistence is disabled!!! You will lose your data when   #####
+######            the Server pod is terminated.                             #####
+#################################################################################
+{{- end }}
+
+{{ if .Values.alertmanager.enabled }}
+The Prometheus alertmanager can be accessed via port {{ .Values.alertmanager.service.servicePort }} on the following DNS name from within your cluster:
+{{ template "prometheus.alertmanager.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
+
+{{ if .Values.alertmanager.ingress.enabled -}}
+From outside the cluster, the alertmanager URL(s) are:
+{{- range .Values.alertmanager.ingress.hosts }}
+http://{{ . }}
+{{- end }}
+{{- else }}
+Get the Alertmanager URL by running these commands in the same shell:
+{{- if contains "NodePort" .Values.alertmanager.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.alertmanager.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.alertmanager.service.type }}
+  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+        You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.alertmanager.fullname" . }}'
+
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.alertmanager.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.alertmanager.service.servicePort }}
+{{- else if contains "ClusterIP"  .Values.alertmanager.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.alertmanager.name }}" -o jsonpath="{.items[0].metadata.name}")
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9093
+{{- end }}
+{{- end }}
+
+{{- if .Values.alertmanager.persistentVolume.enabled }}
+{{- else }}
+#################################################################################
+######   WARNING: Persistence is disabled!!! You will lose your data when   #####
+######            the AlertManager pod is terminated.                       #####
+#################################################################################
+{{- end }}
+{{- end }}
+
+{{ if .Values.pushgateway.enabled }}
+The Prometheus PushGateway can be accessed via port {{ .Values.pushgateway.service.servicePort }} on the following DNS name from within your cluster:
+{{ template "prometheus.pushgateway.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
+
+{{ if .Values.pushgateway.ingress.enabled -}}
+From outside the cluster, the pushgateway URL(s) are:
+{{- range .Values.pushgateway.ingress.hosts }}
+http://{{ . }}
+{{- end }}
+{{- else }}
+Get the PushGateway URL by running these commands in the same shell:
+{{- if contains "NodePort" .Values.pushgateway.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.pushgateway.fullname" . }})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.pushgateway.service.type }}
+  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+        You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.pushgateway.fullname" . }}'
+
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.pushgateway.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.pushgateway.service.servicePort }}
+{{- else if contains "ClusterIP"  .Values.pushgateway.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.pushgateway.name }}" -o jsonpath="{.items[0].metadata.name}")
+  kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9091
+{{- end }}
+{{- end }}
+{{- end }}
+
+For more information on running Prometheus, visit:
+https://prometheus.io/
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..783c76e
--- /dev/null
@@ -0,0 +1,176 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "prometheus.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "prometheus.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified alertmanager name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+
+{{- define "prometheus.alertmanager.fullname" -}}
+{{- if .Values.alertmanager.fullnameOverride -}}
+{{- .Values.alertmanager.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf "%s-%s" .Release.Name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.alertmanager.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified kube-state-metrics name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "prometheus.kubeStateMetrics.fullname" -}}
+{{- if .Values.kubeStateMetrics.fullnameOverride -}}
+{{- .Values.kubeStateMetrics.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf "%s-%s" .Release.Name .Values.kubeStateMetrics.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.kubeStateMetrics.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified node-exporter name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "prometheus.nodeExporter.fullname" -}}
+{{- if .Values.nodeExporter.fullnameOverride -}}
+{{- .Values.nodeExporter.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf "%s-%s" .Release.Name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeExporter.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified Prometheus server name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "prometheus.server.fullname" -}}
+{{- if .Values.server.fullnameOverride -}}
+{{- .Values.server.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf "%s-%s" .Release.Name .Values.server.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.server.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create a fully qualified pushgateway name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "prometheus.pushgateway.fullname" -}}
+{{- if .Values.pushgateway.fullnameOverride -}}
+{{- .Values.pushgateway.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- printf "%s-%s" .Release.Name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s-%s" .Release.Name $name .Values.pushgateway.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the appropriate apiVersion for networkpolicy.
+*/}}
+{{- define "prometheus.networkPolicy.apiVersion" -}}
+{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
+{{- print "extensions/v1beta1" -}}
+{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}}
+{{- print "networking.k8s.io/v1" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the alertmanager component
+*/}}
+{{- define "prometheus.serviceAccountName.alertmanager" -}}
+{{- if .Values.serviceAccounts.alertmanager.create -}}
+    {{ default (include "prometheus.alertmanager.fullname" .) .Values.serviceAccounts.alertmanager.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccounts.alertmanager.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the kubeStateMetrics component
+*/}}
+{{- define "prometheus.serviceAccountName.kubeStateMetrics" -}}
+{{- if .Values.serviceAccounts.kubeStateMetrics.create -}}
+    {{ default (include "prometheus.kubeStateMetrics.fullname" .) .Values.serviceAccounts.kubeStateMetrics.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccounts.kubeStateMetrics.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the nodeExporter component
+*/}}
+{{- define "prometheus.serviceAccountName.nodeExporter" -}}
+{{- if .Values.serviceAccounts.nodeExporter.create -}}
+    {{ default (include "prometheus.nodeExporter.fullname" .) .Values.serviceAccounts.nodeExporter.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccounts.nodeExporter.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the pushgateway component
+*/}}
+{{- define "prometheus.serviceAccountName.pushgateway" -}}
+{{- if .Values.serviceAccounts.pushgateway.create -}}
+    {{ default (include "prometheus.pushgateway.fullname" .) .Values.serviceAccounts.pushgateway.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccounts.pushgateway.name }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use for the server component
+*/}}
+{{- define "prometheus.serviceAccountName.server" -}}
+{{- if .Values.serviceAccounts.server.create -}}
+    {{ default (include "prometheus.server.fullname" .) .Values.serviceAccounts.server.name }}
+{{- else -}}
+    {{ default "default" .Values.serviceAccounts.server.name }}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-configmap.yaml
new file mode 100644 (file)
index 0000000..0775a55
--- /dev/null
@@ -0,0 +1,18 @@
+{{- if and .Values.alertmanager.enabled (empty .Values.alertmanager.configMapOverrideName) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+data:
+{{- $root := . -}}
+{{- range $key, $value := .Values.alertmanagerFiles }}
+  {{ $key }}: |
+{{ toYaml $value | default "{}" | indent 4 }}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-deployment.yaml
new file mode 100644 (file)
index 0000000..34c27e6
--- /dev/null
@@ -0,0 +1,108 @@
+{{- if .Values.alertmanager.enabled -}}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+spec:
+  replicas: {{ .Values.alertmanager.replicaCount }}
+  {{- if .Values.server.strategy }}
+  strategy:
+{{ toYaml .Values.server.strategy | indent 4 }}
+  {{- end }}
+  template:
+    metadata:
+    {{- if .Values.alertmanager.podAnnotations }}
+      annotations:
+{{ toYaml .Values.alertmanager.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "prometheus.name" . }}
+        component: "{{ .Values.alertmanager.name }}"
+        release: {{ .Release.Name }}
+    spec:
+{{- if .Values.alertmanager.schedulerName }}
+      schedulerName: "{{ .Values.alertmanager.schedulerName }}"
+{{- end }}
+      serviceAccountName: {{ template "prometheus.serviceAccountName.alertmanager" . }}
+      containers:
+        - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}
+          image: "{{ .Values.alertmanager.image.repository }}:{{ .Values.alertmanager.image.tag }}"
+          imagePullPolicy: "{{ .Values.alertmanager.image.pullPolicy }}"
+          env:
+            {{- range $key, $value := .Values.alertmanager.extraEnv }}
+            - name: {{ $key }}
+              value: {{ $value }}
+            {{- end }}
+          args:
+            - --config.file=/etc/config/alertmanager.yml
+            - --storage.path={{ .Values.alertmanager.persistentVolume.mountPath }}
+          {{- range $key, $value := .Values.alertmanager.extraArgs }}
+            - --{{ $key }}={{ $value }}
+          {{- end }}
+          {{- if .Values.alertmanager.baseURL }}
+            - --web.external-url={{ .Values.alertmanager.baseURL }}
+          {{- end }}
+
+          ports:
+            - containerPort: 9093
+          readinessProbe:
+            httpGet:
+              path: {{ .Values.alertmanager.prefixURL }}/#/status
+              port: 9093
+            initialDelaySeconds: 30
+            timeoutSeconds: 30
+          resources:
+{{ toYaml .Values.alertmanager.resources | indent 12 }}
+          volumeMounts:
+            - name: config-volume
+              mountPath: /etc/config
+            - name: storage-volume
+              mountPath: "{{ .Values.alertmanager.persistentVolume.mountPath }}"
+              subPath: "{{ .Values.alertmanager.persistentVolume.subPath }}"
+
+        - name: {{ template "prometheus.name" . }}-{{ .Values.alertmanager.name }}-{{ .Values.configmapReload.name }}
+          image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
+          imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}"
+          args:
+            - --volume-dir=/etc/config
+            - --webhook-url=http://localhost:9093{{ .Values.alertmanager.prefixURL }}/-/reload
+          resources:
+{{ toYaml .Values.configmapReload.resources | indent 12 }}
+          volumeMounts:
+            - name: config-volume
+              mountPath: /etc/config
+              readOnly: true
+    {{- if .Values.alertmanager.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.alertmanager.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.alertmanager.securityContext }}
+      securityContext:
+{{ toYaml .Values.alertmanager.securityContext | indent 8 }}
+    {{- end }}
+    {{- if .Values.alertmanager.tolerations }}
+      tolerations:
+{{ toYaml .Values.alertmanager.tolerations | indent 8 }}
+    {{- end }}
+    {{- if .Values.alertmanager.affinity }}
+      affinity:
+{{ toYaml .Values.alertmanager.affinity | indent 8 }}
+    {{- end }}
+      volumes:
+        - name: config-volume
+          configMap:
+            name: {{ if .Values.alertmanager.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.alertmanager.configMapOverrideName }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }}
+        - name: storage-volume
+        {{- if .Values.alertmanager.persistentVolume.enabled }}
+          persistentVolumeClaim:
+            claimName: {{ if .Values.alertmanager.persistentVolume.existingClaim }}{{ .Values.alertmanager.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.alertmanager.fullname" . }}{{- end }}
+        {{- else }}
+          emptyDir: {}
+        {{- end -}}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-ingress.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-ingress.yaml
new file mode 100644 (file)
index 0000000..41adae8
--- /dev/null
@@ -0,0 +1,38 @@
+{{- if and .Values.alertmanager.enabled .Values.alertmanager.ingress.enabled -}}
+{{- $releaseName := .Release.Name -}}
+{{- $serviceName := include "prometheus.alertmanager.fullname" . }}
+{{- $servicePort := .Values.alertmanager.service.servicePort -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+{{- if .Values.alertmanager.ingress.annotations }}
+  annotations:
+{{ toYaml .Values.alertmanager.ingress.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- range $key, $value := .Values.alertmanager.ingress.extraLabels }}
+    {{ $key }}: {{ $value }}
+{{- end }}
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+spec:
+  rules:
+  {{- range .Values.alertmanager.ingress.hosts }}
+    {{- $url := splitList "/" . }}
+    - host: {{ first $url }}
+      http:
+        paths:
+          - path: /{{ rest $url | join "/" }}
+            backend:
+              serviceName: {{ $serviceName }}
+              servicePort: {{ $servicePort }}
+  {{- end -}}
+{{- if .Values.alertmanager.ingress.tls }}
+  tls:
+{{ toYaml .Values.alertmanager.ingress.tls | indent 4 }}
+  {{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-networkpolicy.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-networkpolicy.yaml
new file mode 100644 (file)
index 0000000..9f5a7ca
--- /dev/null
@@ -0,0 +1,26 @@
+{{- if .Values.networkPolicy.enabled }}
+apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }}
+kind: NetworkPolicy
+metadata:
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  podSelector:
+    matchLabels:
+      app: {{ template "prometheus.name" . }}
+      component: "{{ .Values.alertmanager.name }}"
+      release: {{ .Release.Name }}
+  ingress:
+    - from:
+      - podSelector:
+          matchLabels:
+            release: {{ .Release.Name }}
+            component: "{{ .Values.server.name }}"
+    - ports:
+      - port: 9093
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-pvc.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-pvc.yaml
new file mode 100644 (file)
index 0000000..c93db4c
--- /dev/null
@@ -0,0 +1,31 @@
+{{- if and .Values.alertmanager.enabled .Values.alertmanager.persistentVolume.enabled -}}
+{{- if not .Values.alertmanager.persistentVolume.existingClaim -}}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  {{- if .Values.alertmanager.persistentVolume.annotations }}
+  annotations:
+{{ toYaml .Values.alertmanager.persistentVolume.annotations | indent 4 }}
+  {{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+spec:
+  accessModes:
+{{ toYaml .Values.alertmanager.persistentVolume.accessModes | indent 4 }}
+{{- if .Values.alertmanager.persistentVolume.storageClass }}
+{{- if (eq "-" .Values.alertmanager.persistentVolume.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.alertmanager.persistentVolume.storageClass }}"
+{{- end }}
+{{- end }}
+  resources:
+    requests:
+      storage: "{{ .Values.alertmanager.persistentVolume.size }}"
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-service.yaml
new file mode 100644 (file)
index 0000000..28f1be8
--- /dev/null
@@ -0,0 +1,55 @@
+{{- if .Values.alertmanager.enabled -}}
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.alertmanager.service.annotations }}
+  annotations:
+{{ toYaml .Values.alertmanager.service.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.alertmanager.service.labels }}
+{{ toYaml .Values.alertmanager.service.labels | indent 4 }}
+{{- end }}
+  name: {{ template "prometheus.alertmanager.fullname" . }}
+spec:
+{{- if .Values.alertmanager.service.clusterIP }}
+  clusterIP: {{ .Values.alertmanager.service.clusterIP }}
+{{- end }}
+{{- if .Values.alertmanager.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.alertmanager.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+  {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+  {{- end }}
+{{- end }}
+  ports:
+    - name: http
+      port: {{ .Values.alertmanager.service.servicePort }}
+      protocol: TCP
+      targetPort: 9093
+    {{- if .Values.alertmanager.service.nodePort }}
+      nodePort: {{ .Values.alertmanager.service.nodePort }}
+    {{- end }}
+{{- if .Values.alertmanager.service.enableMeshPeer }}
+    - name: meshpeer
+      port: 6783
+      protocol: TCP
+      targetPort: 6783
+{{- end }}
+  selector:
+    app: {{ template "prometheus.name" . }}
+    component: "{{ .Values.alertmanager.name }}"
+    release: {{ .Release.Name }}
+  type: "{{ .Values.alertmanager.service.type }}"
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/alertmanager-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..3194374
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccounts.alertmanager.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.alertmanager.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.serviceAccountName.alertmanager" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrole.yaml
new file mode 100644 (file)
index 0000000..86f46ef
--- /dev/null
@@ -0,0 +1,64 @@
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - namespaces
+      - nodes
+      - persistentvolumeclaims
+      - pods
+      - services
+      - resourcequotas
+      - replicationcontrollers
+      - limitranges
+      - persistentvolumeclaims
+      - persistentvolumes
+      - endpoints
+      - secrets
+      - configmaps
+    verbs:
+      - list
+      - watch
+  - apiGroups:
+      - extensions
+    resources:
+      - daemonsets
+      - deployments
+      - replicasets
+    verbs:
+      - list
+      - watch
+  - apiGroups:
+      - apps
+    resources:
+      - statefulsets
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - batch
+    resources:
+      - cronjobs
+      - jobs
+    verbs:
+      - list
+      - watch
+  - apiGroups:
+      - autoscaling
+    resources:
+      - horizontalpodautoscalers
+    verbs:
+      - list
+      - watch
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-clusterrolebinding.yaml
new file mode 100644 (file)
index 0000000..00bf8d8
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }}
+    namespace: {{ .Release.Namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-deployment.yaml
new file mode 100644 (file)
index 0000000..d8715f6
--- /dev/null
@@ -0,0 +1,64 @@
+{{- if .Values.kubeStateMetrics.enabled -}}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+{{- if .Values.kubeStateMetrics.deploymentAnnotations }}
+  annotations:
+{{ toYaml .Values.kubeStateMetrics.deploymentAnnotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+spec:
+  replicas: {{ .Values.kubeStateMetrics.replicaCount }}
+  template:
+    metadata:
+    {{- if .Values.kubeStateMetrics.podAnnotations }}
+      annotations:
+{{ toYaml .Values.kubeStateMetrics.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "prometheus.name" . }}
+        component: "{{ .Values.kubeStateMetrics.name }}"
+        release: {{ .Release.Name }}
+{{- if .Values.kubeStateMetrics.pod.labels }}
+{{ toYaml .Values.kubeStateMetrics.pod.labels | indent 8 }}
+{{- end }}
+    spec:
+      serviceAccountName: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }}
+      containers:
+        - name: {{ template "prometheus.name" . }}-{{ .Values.kubeStateMetrics.name }}
+          image: "{{ .Values.kubeStateMetrics.image.repository }}:{{ .Values.kubeStateMetrics.image.tag }}"
+          imagePullPolicy: "{{ .Values.kubeStateMetrics.image.pullPolicy }}"
+        {{- if .Values.kubeStateMetrics.args }}
+          args:
+          {{- range $key, $value := .Values.kubeStateMetrics.args }}
+            - --{{ $key }}={{ $value }}
+          {{- end }}
+        {{- end }}
+          ports:
+            - name: metrics
+              containerPort: 8080
+          resources:
+{{ toYaml .Values.kubeStateMetrics.resources | indent 12 }}
+    {{- if .Values.kubeStateMetrics.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.kubeStateMetrics.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.kubeStateMetrics.securityContext }}
+      securityContext:
+{{ toYaml .Values.kubeStateMetrics.securityContext | indent 8 }}
+    {{- end }}
+    {{- if .Values.kubeStateMetrics.tolerations }}
+      tolerations:
+{{ toYaml .Values.kubeStateMetrics.tolerations | indent 8 }}
+    {{- end }}
+    {{- if .Values.kubeStateMetrics.affinity }}
+      affinity:
+{{ toYaml .Values.kubeStateMetrics.affinity | indent 8 }}
+    {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-networkpolicy.yaml
new file mode 100644 (file)
index 0000000..3fc62e2
--- /dev/null
@@ -0,0 +1,26 @@
+{{- if .Values.networkPolicy.enabled }}
+apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }}
+kind: NetworkPolicy
+metadata:
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  podSelector:
+    matchLabels:
+      app: {{ template "prometheus.name" . }}
+      component: "{{ .Values.kubeStateMetrics.name }}"
+      release: {{ .Release.Name }}
+  ingress:
+  - from:
+    - podSelector:
+        matchLabels:
+          release: {{ .Release.Name }}
+          component: "{{ .Values.server.name }}"
+  - ports:
+    - port: 8080
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..871a875
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccounts.kubeStateMetrics.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.serviceAccountName.kubeStateMetrics" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-svc.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/kube-state-metrics-svc.yaml
new file mode 100644 (file)
index 0000000..e11fa06
--- /dev/null
@@ -0,0 +1,46 @@
+{{- if .Values.kubeStateMetrics.enabled -}}
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.kubeStateMetrics.service.annotations }}
+  annotations:
+{{ toYaml .Values.kubeStateMetrics.service.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.kubeStateMetrics.service.labels }}
+{{ toYaml .Values.kubeStateMetrics.service.labels | indent 4 }}
+{{- end }}
+  name: {{ template "prometheus.kubeStateMetrics.fullname" . }}
+spec:
+{{- if .Values.kubeStateMetrics.service.clusterIP }}
+  clusterIP: {{ .Values.kubeStateMetrics.service.clusterIP }}
+{{- end }}
+{{- if .Values.kubeStateMetrics.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.kubeStateMetrics.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.kubeStateMetrics.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.kubeStateMetrics.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.kubeStateMetrics.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+  {{- range $cidr := .Values.kubeStateMetrics.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+  {{- end }}
+{{- end }}
+  ports:
+    - name: http
+      port: {{ .Values.kubeStateMetrics.service.servicePort }}
+      protocol: TCP
+      targetPort: 8080
+  selector:
+    app: {{ template "prometheus.name" . }}
+    component: "{{ .Values.kubeStateMetrics.name }}"
+    release: {{ .Release.Name }}
+  type: "{{ .Values.kubeStateMetrics.service.type }}"
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-daemonset.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-daemonset.yaml
new file mode 100644 (file)
index 0000000..8c2b59f
--- /dev/null
@@ -0,0 +1,105 @@
+{{- if .Values.nodeExporter.enabled -}}
+apiVersion: extensions/v1beta1
+kind: DaemonSet
+metadata:
+{{- if .Values.nodeExporter.deploymentAnnotations }}
+  annotations:
+{{ toYaml .Values.nodeExporter.deploymentAnnotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.nodeExporter.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.nodeExporter.fullname" . }}
+spec:
+  {{- if .Values.nodeExporter.updateStrategy }}
+  updateStrategy:
+{{ toYaml .Values.nodeExporter.updateStrategy | indent 4 }}
+  {{- end }}
+  template:
+    metadata:
+    {{- if .Values.nodeExporter.podAnnotations }}
+      annotations:
+{{ toYaml .Values.nodeExporter.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "prometheus.name" . }}
+        component: "{{ .Values.nodeExporter.name }}"
+        release: {{ .Release.Name }}
+{{- if .Values.nodeExporter.pod.labels }}
+{{ toYaml .Values.nodeExporter.pod.labels | indent 8 }}
+{{- end }}
+    spec:
+      serviceAccountName: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
+      containers:
+        - name: {{ template "prometheus.name" . }}-{{ .Values.nodeExporter.name }}
+          image: "{{ .Values.nodeExporter.image.repository }}:{{ .Values.nodeExporter.image.tag }}"
+          imagePullPolicy: "{{ .Values.nodeExporter.image.pullPolicy }}"
+          args:
+            - --path.procfs=/host/proc
+            - --path.sysfs=/host/sys
+          {{- range $key, $value := .Values.nodeExporter.extraArgs }}
+          {{- if $value }}
+            - --{{ $key }}={{ $value }}
+          {{- else }}
+            - --{{ $key }}
+          {{- end }}
+          {{- end }}
+          ports:
+            - name: metrics
+              containerPort: 9100
+              hostPort: {{ .Values.nodeExporter.service.hostPort }}
+          resources:
+{{ toYaml .Values.nodeExporter.resources | indent 12 }}
+          volumeMounts:
+            - name: proc
+              mountPath: /host/proc
+              readOnly:  true
+            - name: sys
+              mountPath: /host/sys
+              readOnly: true
+          {{- range .Values.nodeExporter.extraHostPathMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+          {{- range .Values.nodeExporter.extraConfigmapMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+      hostNetwork: true
+      hostPID: true
+    {{- if .Values.nodeExporter.tolerations }}
+      tolerations:
+{{ toYaml .Values.nodeExporter.tolerations | indent 8 }}
+    {{- end }}
+    {{- if .Values.nodeExporter.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.nodeExporter.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.nodeExporter.securityContext }}
+      securityContext:
+{{ toYaml .Values.nodeExporter.securityContext | indent 8 }}
+    {{- end }}
+      volumes:
+        - name: proc
+          hostPath:
+            path: /proc
+        - name: sys
+          hostPath:
+            path: /sys
+      {{- range .Values.nodeExporter.extraHostPathMounts }}
+        - name: {{ .name }}
+          hostPath:
+            path: {{ .hostPath }}
+      {{- end }}
+      {{- range .Values.nodeExporter.extraConfigmapMounts }}
+        - name: {{ .name }}
+          configMap:
+            name: {{ .configMap }}
+      {{- end }}
+
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-service.yaml
new file mode 100644 (file)
index 0000000..6af14c2
--- /dev/null
@@ -0,0 +1,46 @@
+{{- if .Values.nodeExporter.enabled -}}
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.nodeExporter.service.annotations }}
+  annotations:
+{{ toYaml .Values.nodeExporter.service.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.nodeExporter.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.nodeExporter.service.labels }}
+{{ toYaml .Values.nodeExporter.service.labels | indent 4 }}
+{{- end }}
+  name: {{ template "prometheus.nodeExporter.fullname" . }}
+spec:
+{{- if .Values.nodeExporter.service.clusterIP }}
+  clusterIP: {{ .Values.nodeExporter.service.clusterIP }}
+{{- end }}
+{{- if .Values.nodeExporter.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.nodeExporter.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.nodeExporter.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.nodeExporter.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.nodeExporter.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+  {{- range $cidr := .Values.nodeExporter.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+  {{- end }}
+{{- end }}
+  ports:
+    - name: metrics
+      port: {{ .Values.nodeExporter.service.servicePort }}
+      protocol: TCP
+      targetPort: 9100
+  selector:
+    app: {{ template "prometheus.name" . }}
+    component: "{{ .Values.nodeExporter.name }}"
+    release: {{ .Release.Name }}
+  type: "{{ .Values.nodeExporter.service.type }}"
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/node-exporter-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..da45088
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccounts.nodeExporter.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.nodeExporter.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.serviceAccountName.nodeExporter" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-deployment.yaml
new file mode 100644 (file)
index 0000000..652e4a7
--- /dev/null
@@ -0,0 +1,64 @@
+{{- if .Values.pushgateway.enabled -}}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.pushgateway.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.pushgateway.fullname" . }}
+spec:
+  replicas: {{ .Values.pushgateway.replicaCount }}
+  template:
+    metadata:
+    {{- if .Values.pushgateway.podAnnotations }}
+      annotations:
+{{ toYaml .Values.pushgateway.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "prometheus.name" . }}
+        component: "{{ .Values.pushgateway.name }}"
+        release: {{ .Release.Name }}
+    spec:
+      serviceAccountName: {{ template "prometheus.serviceAccountName.pushgateway" . }}
+      containers:
+        - name: {{ template "prometheus.name" . }}-{{ .Values.pushgateway.name }}
+          image: "{{ .Values.pushgateway.image.repository }}:{{ .Values.pushgateway.image.tag }}"
+          imagePullPolicy: "{{ .Values.pushgateway.image.pullPolicy }}"
+          args:
+          {{- range $key, $value := .Values.pushgateway.extraArgs }}
+            - --{{ $key }}={{ $value }}
+          {{- end }}
+          ports:
+            - containerPort: 9091
+          readinessProbe:
+            httpGet:
+            {{- if (index .Values "pushgateway" "extraArgs" "web.route-prefix") }}
+              path: /{{ index .Values "pushgateway" "extraArgs" "web.route-prefix" }}/#/status
+            {{- else }}
+              path: /#/status
+            {{- end }}
+              port: 9091
+            initialDelaySeconds: 10
+            timeoutSeconds: 10
+          resources:
+{{ toYaml .Values.pushgateway.resources | indent 12 }}
+    {{- if .Values.pushgateway.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.pushgateway.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.pushgateway.securityContext }}
+      securityContext:
+{{ toYaml .Values.pushgateway.securityContext | indent 8 }}
+    {{- end }}
+    {{- if .Values.pushgateway.tolerations }}
+      tolerations:
+{{ toYaml .Values.pushgateway.tolerations | indent 8 }}
+    {{- end }}
+    {{- if .Values.pushgateway.affinity }}
+      affinity:
+{{ toYaml .Values.pushgateway.affinity | indent 8 }}
+    {{- end }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-ingress.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-ingress.yaml
new file mode 100644 (file)
index 0000000..e0538fd
--- /dev/null
@@ -0,0 +1,35 @@
+{{- if and .Values.pushgateway.enabled .Values.pushgateway.ingress.enabled -}}
+{{- $releaseName := .Release.Name -}}
+{{- $serviceName := include "prometheus.pushgateway.fullname" . }}
+{{- $servicePort := .Values.pushgateway.service.servicePort -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+{{- if .Values.pushgateway.ingress.annotations }}
+  annotations:
+{{ toYaml .Values.pushgateway.ingress.annotations | indent 4}}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.pushgateway.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.pushgateway.fullname" . }}
+spec:
+  rules:
+  {{- range .Values.pushgateway.ingress.hosts }}
+    {{- $url := splitList "/" . }}
+    - host: {{ first $url }}
+      http:
+        paths:
+          - path: /{{ rest $url | join "/" }}
+            backend:
+              serviceName: {{ $serviceName }}
+              servicePort: {{ $servicePort }}
+  {{- end -}}
+{{- if .Values.pushgateway.ingress.tls }}
+  tls:
+{{ toYaml .Values.pushgateway.ingress.tls | indent 4 }}
+  {{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-service.yaml
new file mode 100644 (file)
index 0000000..9686319
--- /dev/null
@@ -0,0 +1,46 @@
+{{- if .Values.pushgateway.enabled -}}
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.pushgateway.service.annotations }}
+  annotations:
+{{ toYaml .Values.pushgateway.service.annotations | indent 4}}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.pushgateway.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.pushgateway.service.labels }}
+{{ toYaml .Values.pushgateway.service.labels | indent 4}}
+{{- end }}
+  name: {{ template "prometheus.pushgateway.fullname" . }}
+spec:
+{{- if .Values.pushgateway.service.clusterIP }}
+  clusterIP: {{ .Values.pushgateway.service.clusterIP }}
+{{- end }}
+{{- if .Values.pushgateway.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.pushgateway.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.pushgateway.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.pushgateway.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.pushgateway.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+  {{- range $cidr := .Values.pushgateway.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+  {{- end }}
+{{- end }}
+  ports:
+    - name: http
+      port: {{ .Values.pushgateway.service.servicePort }}
+      protocol: TCP
+      targetPort: 9091
+  selector:
+    app: {{ template "prometheus.name" . }}
+    component: "{{ .Values.pushgateway.name }}"
+    release: {{ .Release.Name }}
+  type: "{{ .Values.pushgateway.service.type }}"
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/pushgateway-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..dec1377
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccounts.pushgateway.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.pushgateway.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.serviceAccountName.pushgateway" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrole.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrole.yaml
new file mode 100644 (file)
index 0000000..2e56996
--- /dev/null
@@ -0,0 +1,45 @@
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.server.fullname" . }}
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - nodes
+      - nodes/proxy
+      - services
+      - endpoints
+      - pods
+      - ingresses
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    verbs:
+      - get
+  - apiGroups:
+      - "extensions"
+    resources:
+      - ingresses/status
+      - ingresses
+    verbs:
+      - get
+      - list
+      - watch
+  - nonResourceURLs:
+      - "/metrics"
+    verbs:
+      - get
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrolebinding.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-clusterrolebinding.yaml
new file mode 100644 (file)
index 0000000..776e869
--- /dev/null
@@ -0,0 +1,20 @@
+{{- if .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.server.fullname" . }}
+subjects:
+  - kind: ServiceAccount
+    name: {{ template "prometheus.serviceAccountName.server" . }}
+    namespace: {{ .Release.Namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ template "prometheus.server.fullname" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-configmap.yaml
new file mode 100644 (file)
index 0000000..2ba4b6b
--- /dev/null
@@ -0,0 +1,49 @@
+{{- if (empty .Values.server.configMapOverrideName) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.server.fullname" . }}
+data:
+{{- $root := . -}}
+{{- range $key, $value := .Values.serverFiles }}
+  {{ $key }}: |
+{{- if eq $key "prometheus.yml" }}
+    global:
+{{ $root.Values.server.global | toYaml | indent 6 }}
+{{- end }}
+{{ toYaml $value | default "{}" | indent 4 }}
+{{- if eq $key "prometheus.yml" -}}
+{{- if $root.Values.alertmanager.enabled }}
+    alerting:
+      alertmanagers:
+      - kubernetes_sd_configs:
+          - role: pod
+        tls_config:
+          ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+        {{- if $root.Values.alertmanager.prefixURL }}
+        path_prefix: {{ $root.Values.alertmanager.prefixURL }}
+        {{- end }}
+        relabel_configs:
+        - source_labels: [__meta_kubernetes_namespace]
+          regex: {{ $root.Release.Namespace }}
+          action: keep
+        - source_labels: [__meta_kubernetes_pod_label_app]
+          regex: prometheus
+          action: keep
+        - source_labels: [__meta_kubernetes_pod_label_component]
+          regex: alertmanager
+          action: keep
+        - source_labels: [__meta_kubernetes_pod_container_port_number]
+          regex:
+          action: drop
+{{- end -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-deployment.yaml
new file mode 100644 (file)
index 0000000..b5e7130
--- /dev/null
@@ -0,0 +1,182 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+{{- if .Values.server.deploymentAnnotations }}
+  annotations:
+{{ toYaml .Values.server.deploymentAnnotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.server.fullname" . }}
+spec:
+  replicas: {{ .Values.server.replicaCount }}
+  {{- if .Values.server.strategy }}
+  strategy:
+{{ toYaml .Values.server.strategy | indent 4 }}
+  {{- end }}
+  template:
+    metadata:
+    {{- if .Values.server.podAnnotations }}
+      annotations:
+{{ toYaml .Values.server.podAnnotations | indent 8 }}
+    {{- end }}
+      labels:
+        app: {{ template "prometheus.name" . }}
+        component: "{{ .Values.server.name }}"
+        release: {{ .Release.Name }}
+    spec:
+{{- if .Values.server.schedulerName }}
+      schedulerName: "{{ .Values.server.schedulerName }}"
+{{- end }}
+      serviceAccountName: {{ template "prometheus.serviceAccountName.server" . }}
+      {{- if .Values.initChownData.enabled }}
+      initContainers:
+      - name: "{{ .Values.initChownData.name }}"
+        image: "{{ .Values.initChownData.image.repository }}:{{ .Values.initChownData.image.tag }}"
+        imagePullPolicy: "{{ .Values.initChownData.image.pullPolicy }}"
+        resources:
+{{ toYaml .Values.initChownData.resources | indent 12 }}
+        # 65534 is the nobody user that prometheus uses.
+        command: ["chown", "-R", "65534:65534", "{{ .Values.server.persistentVolume.mountPath }}"]
+        volumeMounts:
+        - name: storage-volume
+          mountPath: {{ .Values.server.persistentVolume.mountPath }}
+          subPath: "{{ .Values.server.persistentVolume.subPath }}"
+      {{- end }}
+      containers:
+        - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}-{{ .Values.configmapReload.name }}
+          image: "{{ .Values.configmapReload.image.repository }}:{{ .Values.configmapReload.image.tag }}"
+          imagePullPolicy: "{{ .Values.configmapReload.image.pullPolicy }}"
+          args:
+            - --volume-dir=/etc/config
+            - --webhook-url=http://localhost:9090{{ .Values.server.prefixURL }}/-/reload
+          {{- range $key, $value := .Values.configmapReload.extraArgs }}
+            - --{{ $key }}={{ $value }}
+          {{- end }}
+          resources:
+{{ toYaml .Values.configmapReload.resources | indent 12 }}
+          volumeMounts:
+            - name: config-volume
+              mountPath: /etc/config
+              readOnly: true
+          {{- range .Values.configmapReload.extraConfigmapMounts }}
+            - name: {{ $.Values.configmapReload.name }}-{{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+
+        - name: {{ template "prometheus.name" . }}-{{ .Values.server.name }}
+          image: "{{ .Values.server.image.repository }}:{{ .Values.server.image.tag }}"
+          imagePullPolicy: "{{ .Values.server.image.pullPolicy }}"
+          args:
+          {{- if .Values.server.retention }}
+            - --storage.tsdb.retention={{ .Values.server.retention }}
+          {{- end }}
+            - --config.file=/etc/config/prometheus.yml
+            - --storage.tsdb.path={{ .Values.server.persistentVolume.mountPath }}
+            - --web.console.libraries=/etc/prometheus/console_libraries
+            - --web.console.templates=/etc/prometheus/consoles
+            - --web.enable-lifecycle
+          {{- range $key, $value := .Values.server.extraArgs }}
+            - --{{ $key }}={{ $value }}
+          {{- end }}
+          {{- if .Values.server.baseURL }}
+            - --web.external-url={{ .Values.server.baseURL }}
+          {{- end }}
+          {{- if .Values.server.enableAdminApi }}
+            - --web.enable-admin-api
+          {{- end }}
+          ports:
+            - containerPort: 9090
+          readinessProbe:
+            httpGet:
+              path: {{ .Values.server.prefixURL }}/-/ready
+              port: 9090
+            initialDelaySeconds: 30
+            timeoutSeconds: 30
+          livenessProbe:
+            httpGet:
+              path: {{ .Values.server.prefixURL }}/-/healthy
+              port: 9090
+            initialDelaySeconds: 30
+            timeoutSeconds: 30
+          resources:
+{{ toYaml .Values.server.resources | indent 12 }}
+          volumeMounts:
+            - name: config-volume
+              mountPath: /etc/config
+            - name: storage-volume
+              mountPath: {{ .Values.server.persistentVolume.mountPath }}
+              subPath: "{{ .Values.server.persistentVolume.subPath }}"
+          {{- range .Values.server.extraHostPathMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+          {{- range .Values.server.extraConfigmapMounts }}
+            - name: {{ $.Values.server.name }}-{{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+          {{- range .Values.server.extraSecretMounts }}
+            - name: {{ .name }}
+              mountPath: {{ .mountPath }}
+              readOnly: {{ .readOnly }}
+          {{- end }}
+    {{- if .Values.server.nodeSelector }}
+      nodeSelector:
+{{ toYaml .Values.server.nodeSelector | indent 8 }}
+    {{- end }}
+    {{- if .Values.server.securityContext }}
+      securityContext:
+{{ toYaml .Values.server.securityContext | indent 8 }}
+    {{- end }}
+    {{- if .Values.server.tolerations }}
+      tolerations:
+{{ toYaml .Values.server.tolerations | indent 8 }}
+    {{- end }}
+    {{- if .Values.server.affinity }}
+      affinity:
+{{ toYaml .Values.server.affinity | indent 8 }}
+    {{- end }}
+      terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
+      volumes:
+        - name: config-volume
+          configMap:
+            name: {{ if .Values.server.configMapOverrideName }}{{ .Release.Name }}-{{ .Values.server.configMapOverrideName }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }}
+        - name: storage-volume
+        {{- if .Values.server.persistentVolume.enabled }}
+          persistentVolumeClaim:
+            claimName: {{ if .Values.server.persistentVolume.existingClaim }}{{ .Values.server.persistentVolume.existingClaim }}{{- else }}{{ template "prometheus.server.fullname" . }}{{- end }}
+        {{- else }}
+          emptyDir: {}
+        {{- end -}}
+      {{- range .Values.server.extraHostPathMounts }}
+        - name: {{ .name }}
+          hostPath:
+            path: {{ .hostPath }}
+      {{- end }}
+      {{- range .Values.configmapReload.extraConfigmapMounts }}
+        - name: {{ $.Values.configmapReload.name }}-{{ .name }}
+          configMap:
+            name: {{ .configMap }}
+      {{- end }}
+      {{- range .Values.server.extraConfigmapMounts }}
+        - name: {{ $.Values.server.name }}-{{ .name }}
+          configMap:
+            name: {{ .configMap }}
+      {{- end }}
+      {{- range .Values.server.extraSecretMounts }}
+        - name: {{ .name }}
+          secret:
+            secretName: {{ .secretName }}
+      {{- end }}
+      {{- range .Values.configmapReload.extraConfigmapMounts }}
+        - name: {{ .name }}
+          configMap:
+            name: {{ .configMap }}
+      {{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-ingress.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-ingress.yaml
new file mode 100644 (file)
index 0000000..db828ab
--- /dev/null
@@ -0,0 +1,38 @@
+{{- if .Values.server.ingress.enabled -}}
+{{- $releaseName := .Release.Name -}}
+{{- $serviceName := include "prometheus.server.fullname" . }}
+{{- $servicePort := .Values.server.service.servicePort -}}
+apiVersion: extensions/v1beta1
+kind: Ingress
+metadata:
+{{- if .Values.server.ingress.annotations }}
+  annotations:
+{{ toYaml .Values.server.ingress.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- range $key, $value := .Values.server.ingress.extraLabels }}
+    {{ $key }}: {{ $value }}
+{{- end }}
+  name: {{ template "prometheus.server.fullname" . }}
+spec:
+  rules:
+  {{- range .Values.server.ingress.hosts }}
+    {{- $url := splitList "/" . }}
+    - host: {{ first $url }}
+      http:
+        paths:
+          - path: /{{ rest $url | join "/" }}
+            backend:
+              serviceName: {{ $serviceName }}
+              servicePort: {{ $servicePort }}
+  {{- end -}}
+{{- if .Values.server.ingress.tls }}
+  tls:
+{{ toYaml .Values.server.ingress.tls | indent 4 }}
+  {{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-networkpolicy.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-networkpolicy.yaml
new file mode 100644 (file)
index 0000000..3f1cdcc
--- /dev/null
@@ -0,0 +1,21 @@
+{{- if .Values.networkPolicy.enabled }}
+apiVersion: {{ template "prometheus.networkPolicy.apiVersion" . }}
+kind: NetworkPolicy
+metadata:
+  name: {{ template "prometheus.server.fullname" . }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+spec:
+  podSelector:
+    matchLabels:
+      app: {{ template "prometheus.name" . }}
+      component: "{{ .Values.server.name }}"
+      release: {{ .Release.Name }}
+  ingress:
+    - ports:
+      - port: 9090
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-pvc.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-pvc.yaml
new file mode 100644 (file)
index 0000000..c4711e9
--- /dev/null
@@ -0,0 +1,31 @@
+{{- if .Values.server.persistentVolume.enabled -}}
+{{- if not .Values.server.persistentVolume.existingClaim -}}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  {{- if .Values.server.persistentVolume.annotations }}
+  annotations:
+{{ toYaml .Values.server.persistentVolume.annotations | indent 4 }}
+  {{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.server.fullname" . }}
+spec:
+  accessModes:
+{{ toYaml .Values.server.persistentVolume.accessModes | indent 4 }}
+{{- if .Values.server.persistentVolume.storageClass }}
+{{- if (eq "-" .Values.server.persistentVolume.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.server.persistentVolume.storageClass }}"
+{{- end }}
+{{- end }}
+  resources:
+    requests:
+      storage: "{{ .Values.server.persistentVolume.size }}"
+{{- end -}}
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-service.yaml
new file mode 100644 (file)
index 0000000..be81694
--- /dev/null
@@ -0,0 +1,47 @@
+apiVersion: v1
+kind: Service
+metadata:
+{{- if .Values.server.service.annotations }}
+  annotations:
+{{ toYaml .Values.server.service.annotations | indent 4 }}
+{{- end }}
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+{{- if .Values.server.service.labels }}
+{{ toYaml .Values.server.service.labels | indent 4 }}
+{{- end }}
+  name: {{ template "prometheus.server.fullname" . }}
+spec:
+{{- if .Values.server.service.clusterIP }}
+  clusterIP: {{ .Values.server.service.clusterIP }}
+{{- end }}
+{{- if .Values.server.service.externalIPs }}
+  externalIPs:
+{{ toYaml .Values.server.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.server.service.loadBalancerIP }}
+  loadBalancerIP: {{ .Values.server.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.server.service.loadBalancerSourceRanges }}
+  loadBalancerSourceRanges:
+  {{- range $cidr := .Values.server.service.loadBalancerSourceRanges }}
+    - {{ $cidr }}
+  {{- end }}
+{{- end }}
+  ports:
+    - name: http
+      port: {{ .Values.server.service.servicePort }}
+      protocol: TCP
+      targetPort: 9090
+    {{- if .Values.server.service.nodePort }}
+      nodePort: {{ .Values.server.service.nodePort }}
+    {{- end }}
+  selector:
+    app: {{ template "prometheus.name" . }}
+    component: "{{ .Values.server.name }}"
+    release: {{ .Release.Name }}
+  type: "{{ .Values.server.service.type }}"
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-serviceaccount.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/templates/server-serviceaccount.yaml
new file mode 100644 (file)
index 0000000..c688ee4
--- /dev/null
@@ -0,0 +1,12 @@
+{{- if .Values.serviceAccounts.server.create }}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  labels:
+    app: {{ template "prometheus.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
+    component: "{{ .Values.server.name }}"
+    heritage: {{ .Release.Service }}
+    release: {{ .Release.Name }}
+  name: {{ template "prometheus.serviceAccountName.server" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/values.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/charts/prometheus/values.yaml
new file mode 100644 (file)
index 0000000..dd356ec
--- /dev/null
@@ -0,0 +1,1023 @@
+rbac:
+  create: true
+
+## Define serviceAccount names for components. Defaults to component's fully qualified name.
+##
+serviceAccounts:
+  alertmanager:
+    create: true
+    name:
+  kubeStateMetrics:
+    create: true
+    name:
+  nodeExporter:
+    create: true
+    name:
+  pushgateway:
+    create: true
+    name:
+  server:
+    create: true
+    name:
+
+alertmanager:
+  ## If false, alertmanager will not be installed
+  ##
+  enabled: true
+
+  ## alertmanager container name
+  ##
+  name: alertmanager
+
+  ## alertmanager container image
+  ##
+  image:
+    repository: akrainoenea/alertmanager
+    tag: v0.15.0
+    pullPolicy: IfNotPresent
+
+  ## Additional alertmanager container arguments
+  ##
+  extraArgs: {}
+
+  ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
+  ## so that the various internal URLs are still able to access as they are in the default case.
+  ## (Optional)
+  prefixURL: ""
+
+  ## External URL which can access alertmanager
+  ## Maybe same with Ingress host name
+  baseURL: "/"
+
+  ## Additional alertmanager container environment variable
+  ## For instance to add a http_proxy
+  ##
+  extraEnv: {}
+
+  ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.alertmanager.configMapOverrideName}}
+  ## Defining configMapOverrideName will cause templates/alertmanager-configmap.yaml
+  ## to NOT generate a ConfigMap resource
+  ##
+  configMapOverrideName: ""
+
+  ingress:
+    ## If true, alertmanager Ingress will be created
+    ##
+    enabled: false
+
+    ## alertmanager Ingress annotations
+    ##
+    annotations: {}
+    #   kubernetes.io/ingress.class: nginx
+    #   kubernetes.io/tls-acme: 'true'
+
+    ## alertmanager Ingress additional labels
+    ##
+    extraLabels: {}
+
+    ## alertmanager Ingress hostnames with optional path
+    ## Must be provided if Ingress is enabled
+    ##
+    hosts: []
+    #   - alertmanager.domain.com
+    #   - domain.com/alertmanager
+
+    ## alertmanager Ingress TLS configuration
+    ## Secrets must be manually created in the namespace
+    ##
+    tls: []
+    #   - secretName: prometheus-alerts-tls
+    #     hosts:
+    #       - alertmanager.domain.com
+
+  ## Alertmanager Deployment Strategy type
+  # strategy:
+  #   type: Recreate
+
+  ## Node tolerations for alertmanager scheduling to nodes with taints
+  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+  ##
+  tolerations: []
+    # - key: "key"
+    #   operator: "Equal|Exists"
+    #   value: "value"
+    #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
+
+  ## Node labels for alertmanager pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  ##
+  nodeSelector: {}
+
+  ## Use an alternate scheduler, e.g. "stork".
+  ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+  ##
+  # schedulerName:
+
+  persistentVolume:
+    ## If true, alertmanager will create/use a Persistent Volume Claim
+    ## If false, use emptyDir
+    ##
+    enabled: true
+
+    ## alertmanager data Persistent Volume access modes
+    ## Must match those of existing PV or dynamic provisioner
+    ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
+    ##
+    accessModes:
+      - ReadWriteOnce
+
+    ## alertmanager data Persistent Volume Claim annotations
+    ##
+    annotations: {}
+
+    ## alertmanager data Persistent Volume existing claim name
+    ## Requires alertmanager.persistentVolume.enabled: true
+    ## If defined, PVC must be created manually before volume will be bound
+    existingClaim: ""
+
+    ## alertmanager data Persistent Volume mount root path
+    ##
+    mountPath: /data
+
+    ## alertmanager data Persistent Volume size
+    ##
+    size: 2Gi
+
+    ## alertmanager data Persistent Volume Storage Class
+    ## If defined, storageClassName: <storageClass>
+    ## If set to "-", storageClassName: "", which disables dynamic provisioning
+    ## If undefined (the default) or set to null, no storageClassName spec is
+    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+    ##   GKE, AWS & OpenStack)
+    ##
+    # storageClass: "-"
+
+    ## Subdirectory of alertmanager data Persistent Volume to mount
+    ## Useful if the volume's root directory is not empty
+    ##
+    subPath: ""
+
+  ## Annotations to be added to alertmanager pods
+  ##
+  podAnnotations: {}
+
+  replicaCount: 1
+
+  ## alertmanager resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+    # limits:
+    #   cpu: 10m
+    #   memory: 32Mi
+    # requests:
+    #   cpu: 10m
+    #   memory: 32Mi
+
+  ## Security context to be added to alertmanager pods
+  ##
+  securityContext: {}
+
+  service:
+    annotations: {}
+    labels: {}
+    clusterIP: ""
+
+    ## Enabling peer mesh service end points for enabling the HA alert manager
+    ## Ref: https://github.com/prometheus/alertmanager/blob/master/README.md
+    # enableMeshPeer : true
+
+    ## List of IP addresses at which the alertmanager service is available
+    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
+    ##
+    externalIPs: []
+
+    loadBalancerIP: ""
+    loadBalancerSourceRanges: []
+    servicePort: 80
+    # nodePort: 30000
+    type: ClusterIP
+
+## Monitors ConfigMap changes and POSTs to a URL
+## Ref: https://github.com/carlosedp/configmap-reload
+##
+configmapReload:
+  ## configmap-reload container name
+  ##
+  name: configmap-reload
+
+  ## configmap-reload container image
+  ##
+  image:
+    repository: carlosedp/configmap-reload
+    tag: v0.2.2
+    pullPolicy: IfNotPresent
+
+  ## Additional configmap-reload container arguments
+  ##
+  extraArgs: {}
+
+  ## Additional configmap-reload mounts
+  ##
+  extraConfigmapMounts: []
+    # - name: prometheus-alerts
+    #   mountPath: /etc/alerts.d
+    #   configMap: prometheus-alerts
+    #   readOnly: true
+
+
+  ## configmap-reload resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+
+initChownData:
+  ## If false, data ownership will not be reset at startup
+  ## This allows the prometheus-server to be run with an arbitrary user
+  ##
+  enabled: true
+
+  ## initChownData container name
+  ##
+  name: init-chown-data
+
+  ## initChownData container image
+  ##
+  image:
+    repository: busybox
+    tag: latest
+    pullPolicy: IfNotPresent
+
+  ## initChownData resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+
+kubeStateMetrics:
+  ## If false, kube-state-metrics will not be installed
+  ##
+  enabled: true
+
+  ## kube-state-metrics container name
+  ##
+  name: kube-state-metrics
+
+  ## kube-state-metrics container image
+  ##
+  image:
+    repository: akrainoenea/kube-state-metrics
+    tag: v1.3.1
+    pullPolicy: IfNotPresent
+
+  ## kube-state-metrics container arguments
+  ##
+  args: {}
+
+  ## Node tolerations for kube-state-metrics scheduling to nodes with taints
+  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+  ##
+  tolerations: []
+    # - key: "key"
+    #   operator: "Equal|Exists"
+    #   value: "value"
+    #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
+
+  ## Node labels for kube-state-metrics pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  ##
+  nodeSelector: {}
+
+  ## Annotations to be added to kube-state-metrics pods
+  ##
+  podAnnotations: {}
+
+  pod:
+    labels: {}
+
+  replicaCount: 1
+
+  ## kube-state-metrics resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+    # limits:
+    #   cpu: 10m
+    #   memory: 16Mi
+    # requests:
+    #   cpu: 10m
+    #   memory: 16Mi
+
+  ## Security context to be added to kube-state-metrics pods
+  ##
+  securityContext: {}
+
+  service:
+    annotations:
+      prometheus.io/scrape: "true"
+    labels: {}
+
+    # Exposed as a headless service:
+    # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
+    clusterIP: None
+
+    ## List of IP addresses at which the kube-state-metrics service is available
+    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
+    ##
+    externalIPs: []
+
+    loadBalancerIP: ""
+    loadBalancerSourceRanges: []
+    servicePort: 80
+    type: ClusterIP
+
+nodeExporter:
+  ## If false, node-exporter will not be installed
+  ##
+  enabled: true
+
+  ## node-exporter container name
+  ##
+  name: node-exporter
+
+  ## node-exporter container image
+  ##
+  image:
+    repository: akrainoenea/node-exporter
+    tag: v0.16.0
+    pullPolicy: IfNotPresent
+
+  ## Custom Update Strategy
+  ##
+  updateStrategy:
+    type: OnDelete
+
+  ## Additional node-exporter container arguments
+  ##
+  extraArgs: {}
+
+  ## Additional node-exporter hostPath mounts
+  ##
+  extraHostPathMounts: []
+    # - name: textfile-dir
+    #   mountPath: /srv/txt_collector
+    #   hostPath: /var/lib/node-exporter
+    #   readOnly: true
+
+  extraConfigmapMounts: []
+    # - name: certs-configmap
+    #   mountPath: /prometheus
+    #   configMap: certs-configmap
+    #   readOnly: true
+
+  ## Node tolerations for node-exporter scheduling to nodes with taints
+  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+  ##
+  tolerations: []
+    # - key: "key"
+    #   operator: "Equal|Exists"
+    #   value: "value"
+    #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
+
+  ## Node labels for node-exporter pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  ##
+  nodeSelector: {}
+
+  ## Annotations to be added to node-exporter pods
+  ##
+  podAnnotations: {}
+
+  ## Labels to be added to node-exporter pods
+  ##
+  pod:
+    labels: {}
+
+  ## node-exporter resource limits & requests
+  ## Ref: https://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+    # limits:
+    #   cpu: 200m
+    #   memory: 50Mi
+    # requests:
+    #   cpu: 100m
+    #   memory: 30Mi
+
+  ## Security context to be added to node-exporter pods
+  ##
+  securityContext: {}
+    # runAsUser: 0
+
+  service:
+    annotations:
+      prometheus.io/scrape: "true"
+    labels: {}
+
+    # Exposed as a headless service:
+    # https://kubernetes.io/docs/concepts/services-networking/service/#headless-services
+    clusterIP: None
+
+    ## List of IP addresses at which the node-exporter service is available
+    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
+    ##
+    externalIPs: []
+
+    hostPort: 9100
+    loadBalancerIP: ""
+    loadBalancerSourceRanges: []
+    servicePort: 9100
+    type: ClusterIP
+
+server:
+  ## Prometheus server container name
+  ##
+  name: server
+
+  ## Prometheus server container image
+  ##
+  image:
+    repository: akrainoenea/prometheus
+    tag: v2.3.1
+    pullPolicy: IfNotPresent
+
+  ## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
+  ## so that the various internal URLs are still able to access as they are in the default case.
+  ## (Optional)
+  prefixURL: ""
+
+  ## External URL which can access alertmanager
+  ## Maybe same with Ingress host name
+  baseURL: ""
+
+  ## This flag controls access to the administrative HTTP API which includes functionality such as deleting time
+  ## series. This is disabled by default.
+  enableAdminApi: false
+
+  global:
+    ## How frequently to scrape targets by default
+    ##
+    scrape_interval: 1m
+    ## How long until a scrape request times out
+    ##
+    scrape_timeout: 10s
+    ## How frequently to evaluate rules
+    ##
+    evaluation_interval: 1m
+
+  ## Additional Prometheus server container arguments
+  ##
+  extraArgs: {}
+
+  ## Additional Prometheus server hostPath mounts
+  ##
+  extraHostPathMounts: []
+    # - name: certs-dir
+    #   mountPath: /etc/kubernetes/certs
+    #   hostPath: /etc/kubernetes/certs
+    #   readOnly: true
+
+  extraConfigmapMounts: []
+    # - name: certs-configmap
+    #   mountPath: /prometheus
+    #   configMap: certs-configmap
+    #   readOnly: true
+
+  ## Additional Prometheus server Secret mounts
+  # Defines additional mounts with secrets. Secrets must be manually created in the namespace.
+  extraSecretMounts: []
+    # - name: secret-files
+    #   mountPath: /etc/secrets
+    #   secretName: prom-secret-files
+    #   readOnly: true
+
+  ## ConfigMap override where fullname is {{.Release.Name}}-{{.Values.server.configMapOverrideName}}
+  ## Defining configMapOverrideName will cause templates/server-configmap.yaml
+  ## to NOT generate a ConfigMap resource
+  ##
+  configMapOverrideName: ""
+
+  ingress:
+    ## If true, Prometheus server Ingress will be created
+    ##
+    enabled: false
+
+    ## Prometheus server Ingress annotations
+    ##
+    annotations: {}
+    #   kubernetes.io/ingress.class: nginx
+    #   kubernetes.io/tls-acme: 'true'
+
+    ## Prometheus server Ingress additional labels
+    ##
+    extraLabels: {}
+
+    ## Prometheus server Ingress hostnames with optional path
+    ## Must be provided if Ingress is enabled
+    ##
+    hosts: []
+    #   - prometheus.domain.com
+    #   - domain.com/prometheus
+
+    ## Prometheus server Ingress TLS configuration
+    ## Secrets must be manually created in the namespace
+    ##
+    tls: []
+    #   - secretName: prometheus-server-tls
+    #     hosts:
+    #       - prometheus.domain.com
+
+  ## Server Deployment Strategy type
+  # strategy:
+  #   type: Recreate
+
+  ## Node tolerations for server scheduling to nodes with taints
+  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+  ##
+  tolerations: []
+    # - key: "key"
+    #   operator: "Equal|Exists"
+    #   value: "value"
+    #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
+
+  ## Node labels for Prometheus server pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  ##
+  nodeSelector: {}
+
+  ## Use an alternate scheduler, e.g. "stork".
+  ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
+  ##
+  # schedulerName:
+
+  persistentVolume:
+    ## If true, Prometheus server will create/use a Persistent Volume Claim
+    ## If false, use emptyDir
+    ##
+    enabled: true
+
+    ## Prometheus server data Persistent Volume access modes
+    ## Must match those of existing PV or dynamic provisioner
+    ## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
+    ##
+    accessModes:
+      - ReadWriteOnce
+
+    ## Prometheus server data Persistent Volume annotations
+    ##
+    annotations: {}
+
+    ## Prometheus server data Persistent Volume existing claim name
+    ## Requires server.persistentVolume.enabled: true
+    ## If defined, PVC must be created manually before volume will be bound
+    existingClaim: ""
+
+    ## Prometheus server data Persistent Volume mount root path
+    ##
+    mountPath: /data
+
+    ## Prometheus server data Persistent Volume size
+    ##
+    size: 8Gi
+
+    ## Prometheus server data Persistent Volume Storage Class
+    ## If defined, storageClassName: <storageClass>
+    ## If set to "-", storageClassName: "", which disables dynamic provisioning
+    ## If undefined (the default) or set to null, no storageClassName spec is
+    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+    ##   GKE, AWS & OpenStack)
+    ##
+    # storageClass: "-"
+
+    ## Subdirectory of Prometheus server data Persistent Volume to mount
+    ## Useful if the volume's root directory is not empty
+    ##
+    subPath: ""
+
+  ## Annotations to be added to Prometheus server pods
+  ##
+  podAnnotations: {}
+    # iam.amazonaws.com/role: prometheus
+
+  replicaCount: 1
+
+  ## Prometheus server resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+    # limits:
+    #   cpu: 500m
+    #   memory: 512Mi
+    # requests:
+    #   cpu: 500m
+    #   memory: 512Mi
+
+  ## Security context to be added to server pods
+  ##
+  securityContext: {}
+
+  service:
+    annotations: {}
+    labels: {}
+    clusterIP: ""
+
+    ## List of IP addresses at which the Prometheus server service is available
+    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
+    ##
+    externalIPs: []
+
+    loadBalancerIP: ""
+    loadBalancerSourceRanges: []
+    servicePort: 80
+    type: ClusterIP
+
+  ## Prometheus server pod termination grace period
+  ##
+  terminationGracePeriodSeconds: 300
+
+  ## Prometheus data retention period (i.e 360h)
+  ##
+  retention: ""
+
+pushgateway:
+  ## If false, pushgateway will not be installed
+  ##
+  enabled: true
+
+  ## pushgateway container name
+  ##
+  name: pushgateway
+
+  ## pushgateway container image
+  ##
+  image:
+    repository: akrainoenea/pushgateway
+    tag: v0.5.2
+    pullPolicy: IfNotPresent
+
+  ## Additional pushgateway container arguments
+  ##
+  extraArgs: {}
+
+  ingress:
+    ## If true, pushgateway Ingress will be created
+    ##
+    enabled: false
+
+    ## pushgateway Ingress annotations
+    ##
+    annotations: {}
+    #   kubernetes.io/ingress.class: nginx
+    #   kubernetes.io/tls-acme: 'true'
+
+    ## pushgateway Ingress hostnames with optional path
+    ## Must be provided if Ingress is enabled
+    ##
+    hosts: []
+    #   - pushgateway.domain.com
+    #   - domain.com/pushgateway
+
+    ## pushgateway Ingress TLS configuration
+    ## Secrets must be manually created in the namespace
+    ##
+    tls: []
+    #   - secretName: prometheus-alerts-tls
+    #     hosts:
+    #       - pushgateway.domain.com
+
+  ## Node tolerations for pushgateway scheduling to nodes with taints
+  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
+  ##
+  tolerations: []
+    # - key: "key"
+    #   operator: "Equal|Exists"
+    #   value: "value"
+    #   effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"
+
+  ## Node labels for pushgateway pod assignment
+  ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
+  ##
+  nodeSelector: {}
+
+  ## Annotations to be added to pushgateway pods
+  ##
+  podAnnotations: {}
+
+  replicaCount: 1
+
+  ## pushgateway resource requests and limits
+  ## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  ##
+  resources: {}
+    # limits:
+    #   cpu: 10m
+    #   memory: 32Mi
+    # requests:
+    #   cpu: 10m
+    #   memory: 32Mi
+
+  ## Security context to be added to push-gateway pods
+  ##
+  securityContext: {}
+
+  service:
+    annotations:
+      prometheus.io/probe: pushgateway
+    labels: {}
+    clusterIP: ""
+
+    ## List of IP addresses at which the pushgateway service is available
+    ## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
+    ##
+    externalIPs: []
+
+    loadBalancerIP: ""
+    loadBalancerSourceRanges: []
+    servicePort: 9091
+    type: ClusterIP
+
+## alertmanager ConfigMap entries
+##
+alertmanagerFiles:
+  alertmanager.yml:
+    global: {}
+      # slack_api_url: ''
+
+    receivers:
+      - name: default-receiver
+        # slack_configs:
+        #  - channel: '@you'
+        #    send_resolved: true
+
+    route:
+      group_wait: 10s
+      group_interval: 5m
+      receiver: default-receiver
+      repeat_interval: 3h
+
+## Prometheus server ConfigMap entries
+##
+serverFiles:
+  alerts: {}
+  rules: {}
+
+  prometheus.yml:
+    rule_files:
+      - /etc/config/rules
+      - /etc/config/alerts
+
+    scrape_configs:
+      - job_name: prometheus
+        static_configs:
+          - targets:
+            - localhost:9090
+
+      # A scrape configuration for running Prometheus on a Kubernetes cluster.
+      # This uses separate scrape configs for cluster components (i.e. API server, node)
+      # and services to allow each to use different authentication configs.
+      #
+      # Kubernetes labels will be added as Prometheus labels on metrics via the
+      # `labelmap` relabeling action.
+
+      # Scrape config for API servers.
+      #
+      # Kubernetes exposes API servers as endpoints to the default/kubernetes
+      # service so this uses `endpoints` role and uses relabelling to only keep
+      # the endpoints associated with the default/kubernetes service using the
+      # default named port `https`. This works for single API server deployments as
+      # well as HA API server deployments.
+      - job_name: 'kubernetes-apiservers'
+
+        kubernetes_sd_configs:
+          - role: endpoints
+
+        # Default to scraping over https. If required, just disable this or change to
+        # `http`.
+        scheme: https
+
+        # This TLS & bearer token file config is used to connect to the actual scrape
+        # endpoints for cluster components. This is separate to discovery auth
+        # configuration because discovery & scraping are two separate concerns in
+        # Prometheus. The discovery auth config is automatic if Prometheus runs inside
+        # the cluster. Otherwise, more config options have to be provided within the
+        # <kubernetes_sd_config>.
+        tls_config:
+          ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+          # If your node certificates are self-signed or use a different CA to the
+          # master CA, then disable certificate verification below. Note that
+          # certificate verification is an integral part of a secure infrastructure
+          # so this should only be disabled in a controlled environment. You can
+          # disable certificate verification by uncommenting the line below.
+          #
+          insecure_skip_verify: true
+        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+
+        # Keep only the default/kubernetes service endpoints for the https port. This
+        # will add targets for each API server which Kubernetes adds an endpoint to
+        # the default/kubernetes service.
+        relabel_configs:
+          - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
+            action: keep
+            regex: default;kubernetes;https
+
+      - job_name: 'kubernetes-nodes'
+
+        # Default to scraping over https. If required, just disable this or change to
+        # `http`.
+        scheme: https
+
+        # This TLS & bearer token file config is used to connect to the actual scrape
+        # endpoints for cluster components. This is separate to discovery auth
+        # configuration because discovery & scraping are two separate concerns in
+        # Prometheus. The discovery auth config is automatic if Prometheus runs inside
+        # the cluster. Otherwise, more config options have to be provided within the
+        # <kubernetes_sd_config>.
+        tls_config:
+          ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+          # If your node certificates are self-signed or use a different CA to the
+          # master CA, then disable certificate verification below. Note that
+          # certificate verification is an integral part of a secure infrastructure
+          # so this should only be disabled in a controlled environment. You can
+          # disable certificate verification by uncommenting the line below.
+          #
+          insecure_skip_verify: true
+        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+
+        kubernetes_sd_configs:
+          - role: node
+
+        relabel_configs:
+          - action: labelmap
+            regex: __meta_kubernetes_node_label_(.+)
+          - target_label: __address__
+            replacement: kubernetes.default.svc:443
+          - source_labels: [__meta_kubernetes_node_name]
+            regex: (.+)
+            target_label: __metrics_path__
+            replacement: /api/v1/nodes/${1}/proxy/metrics
+
+
+      - job_name: 'kubernetes-nodes-cadvisor'
+
+        # Default to scraping over https. If required, just disable this or change to
+        # `http`.
+        scheme: https
+
+        # This TLS & bearer token file config is used to connect to the actual scrape
+        # endpoints for cluster components. This is separate to discovery auth
+        # configuration because discovery & scraping are two separate concerns in
+        # Prometheus. The discovery auth config is automatic if Prometheus runs inside
+        # the cluster. Otherwise, more config options have to be provided within the
+        # <kubernetes_sd_config>.
+        tls_config:
+          ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+          # If your node certificates are self-signed or use a different CA to the
+          # master CA, then disable certificate verification below. Note that
+          # certificate verification is an integral part of a secure infrastructure
+          # so this should only be disabled in a controlled environment. You can
+          # disable certificate verification by uncommenting the line below.
+          #
+          insecure_skip_verify: true
+        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+
+        kubernetes_sd_configs:
+          - role: node
+
+        # This configuration will work only on kubelet 1.7.3+
+        # As the scrape endpoints for cAdvisor have changed
+        # if you are using older version you need to change the replacement to
+        # replacement: /api/v1/nodes/${1}:4194/proxy/metrics
+        # more info here https://github.com/coreos/prometheus-operator/issues/633
+        relabel_configs:
+          - action: labelmap
+            regex: __meta_kubernetes_node_label_(.+)
+          - target_label: __address__
+            replacement: kubernetes.default.svc:443
+          - source_labels: [__meta_kubernetes_node_name]
+            regex: (.+)
+            target_label: __metrics_path__
+            replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
+
+      # Scrape config for service endpoints.
+      #
+      # The relabeling allows the actual service scrape endpoint to be configured
+      # via the following annotations:
+      #
+      # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
+      # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
+      # to set this to `https` & most likely set the `tls_config` of the scrape config.
+      # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
+      # * `prometheus.io/port`: If the metrics are exposed on a different port to the
+      # service then set this appropriately.
+      - job_name: 'kubernetes-service-endpoints'
+
+        kubernetes_sd_configs:
+          - role: endpoints
+
+        relabel_configs:
+          - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
+            action: keep
+            regex: true
+          - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
+            action: replace
+            target_label: __scheme__
+            regex: (https?)
+          - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
+            action: replace
+            target_label: __metrics_path__
+            regex: (.+)
+          - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
+            action: replace
+            target_label: __address__
+            regex: ([^:]+)(?::\d+)?;(\d+)
+            replacement: $1:$2
+          - action: labelmap
+            regex: __meta_kubernetes_service_label_(.+)
+          - source_labels: [__meta_kubernetes_namespace]
+            action: replace
+            target_label: kubernetes_namespace
+          - source_labels: [__meta_kubernetes_service_name]
+            action: replace
+            target_label: kubernetes_name
+
+      - job_name: 'prometheus-pushgateway'
+        honor_labels: true
+
+        kubernetes_sd_configs:
+          - role: service
+
+        relabel_configs:
+          - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
+            action: keep
+            regex: pushgateway
+
+      # Example scrape config for probing services via the Blackbox Exporter.
+      #
+      # The relabeling allows the actual service scrape endpoint to be configured
+      # via the following annotations:
+      #
+      # * `prometheus.io/probe`: Only probe services that have a value of `true`
+      - job_name: 'kubernetes-services'
+
+        metrics_path: /probe
+        params:
+          module: [http_2xx]
+
+        kubernetes_sd_configs:
+          - role: service
+
+        relabel_configs:
+          - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
+            action: keep
+            regex: true
+          - source_labels: [__address__]
+            target_label: __param_target
+          - target_label: __address__
+            replacement: blackbox
+          - source_labels: [__param_target]
+            target_label: instance
+          - action: labelmap
+            regex: __meta_kubernetes_service_label_(.+)
+          - source_labels: [__meta_kubernetes_namespace]
+            target_label: kubernetes_namespace
+          - source_labels: [__meta_kubernetes_service_name]
+            target_label: kubernetes_name
+
+      # Example scrape config for pods
+      #
+      # The relabeling allows the actual pod scrape endpoint to be configured via the
+      # following annotations:
+      #
+      # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
+      # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
+      # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
+      - job_name: 'kubernetes-pods'
+
+        kubernetes_sd_configs:
+          - role: pod
+
+        relabel_configs:
+          - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
+            action: keep
+            regex: true
+          - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
+            action: replace
+            target_label: __metrics_path__
+            regex: (.+)
+          - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
+            action: replace
+            regex: ([^:]+)(?::\d+)?;(\d+)
+            replacement: $1:$2
+            target_label: __address__
+          - action: labelmap
+            regex: __meta_kubernetes_pod_label_(.+)
+          - source_labels: [__meta_kubernetes_namespace]
+            action: replace
+            target_label: kubernetes_namespace
+          - source_labels: [__meta_kubernetes_pod_name]
+            action: replace
+            target_label: kubernetes_pod_name
+
+networkPolicy:
+  ## Enable creation of NetworkPolicy resources.
+  ##
+  enabled: false
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/examples/nem-monitoring-minikube.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/examples/nem-monitoring-minikube.yaml
new file mode 100644 (file)
index 0000000..a8aa763
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# 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.
+
+prometheus:
+  rbac:
+    create: false
+grafana:
+  rbac:
+    create: false
+  serviceAccount:
+    create: false
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/kb8s-app-metrics.json b/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/kb8s-app-metrics.json
new file mode 100644 (file)
index 0000000..9b5d28f
--- /dev/null
@@ -0,0 +1,1400 @@
+{
+    "__inputs": [
+      {
+        "name": "DS_PROMETHEUS",
+        "label": "prometheus",
+        "description": "",
+        "type": "datasource",
+        "pluginId": "prometheus",
+        "pluginName": "Prometheus"
+      }
+    ],
+    "__requires": [
+      {
+        "type": "grafana",
+        "id": "grafana",
+        "name": "Grafana",
+        "version": "4.1.1"
+      },
+      {
+        "type": "panel",
+        "id": "graph",
+        "name": "Graph",
+        "version": ""
+      },
+      {
+        "type": "datasource",
+        "id": "prometheus",
+        "name": "Prometheus",
+        "version": "1.0.0"
+      }
+    ],
+    "annotations": {
+      "list": []
+    },
+    "editable": true,
+    "gnetId": 1471,
+    "graphTooltip": 1,
+    "hideControls": false,
+    "id": null,
+    "links": [],
+    "refresh": "30s",
+    "rows": [
+      {
+        "collapse": false,
+        "height": "250px",
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "grid": {},
+            "id": 3,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 2,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(http_requests_total{app=\"$container\", handler!=\"prometheus\", kubernetes_namespace=\"$namespace\"}[30s])) by (kubernetes_namespace,app,code)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "native | {{code}}",
+                "refId": "A",
+                "step": 10
+              },
+              {
+                "expr": "sum(irate(nginx_http_requests_total{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (kubernetes_namespace,app,status)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "nginx | {{status}}",
+                "refId": "B",
+                "step": 10
+              },
+              {
+                "expr": "sum(irate(haproxy_backend_http_responses_total{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,code)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "haproxy | {{code}}",
+                "refId": "C",
+                "step": 10
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Request rate",
+            "tooltip": {
+              "msResolution": true,
+              "shared": false,
+              "sort": 0,
+              "value_type": "cumulative"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "ops",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          },
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "fill": 1,
+            "id": 15,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "null",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(haproxy_backend_http_responses_total{app=\"$container\", kubernetes_namespace=\"$namespace\",code=\"5xx\"}[30s])) by (app,kubernetes_namespace) / sum(irate(haproxy_backend_http_responses_total{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace)",
+                "interval": "",
+                "intervalFactor": 2,
+                "legendFormat": "haproxy",
+                "refId": "A",
+                "step": 20
+              },
+              {
+                "expr": "sum(irate(http_requests_total{app=\"$container\", handler!=\"prometheus\", kubernetes_namespace=\"$namespace\", code=~\"5[0-9]+\"}[30s])) by (kubernetes_namespace,app) / sum(irate(http_requests_total{app=\"$container\", handler!=\"prometheus\", kubernetes_namespace=\"$namespace\"}[30s])) by (kubernetes_namespace,app)",
+                "intervalFactor": 2,
+                "legendFormat": "native",
+                "refId": "B",
+                "step": 20
+              },
+              {
+                "expr": "sum(irate(nginx_http_requests_total{app=\"$container\", kubernetes_namespace=\"$namespace\", status=~\"5[0-9]+\"}[30s])) by (kubernetes_namespace,app) / sum(irate(nginx_http_requests_total{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (kubernetes_namespace,app)",
+                "intervalFactor": 2,
+                "legendFormat": "nginx",
+                "refId": "C",
+                "step": 20
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Error rate",
+            "tooltip": {
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "percentunit",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Request rate",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": true,
+        "height": 224,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "grid": {},
+            "id": 5,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "max",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 2,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 12,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "intervalFactor": 1,
+                "legendFormat": "native | 0.99",
+                "refId": "A",
+                "step": 1
+              },
+              {
+                "expr": "histogram_quantile(0.90, sum(rate(http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "intervalFactor": 1,
+                "legendFormat": "native | 0.90",
+                "refId": "B",
+                "step": 1
+              },
+              {
+                "expr": "histogram_quantile(0.5, sum(rate(http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "native | 0.50",
+                "refId": "C",
+                "step": 1
+              },
+              {
+                "expr": "histogram_quantile(0.99, sum(rate(nginx_http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "intervalFactor": 1,
+                "legendFormat": "nginx | 0.99",
+                "refId": "D",
+                "step": 1
+              },
+              {
+                "expr": "histogram_quantile(0.9, sum(rate(nginx_http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "intervalFactor": 1,
+                "legendFormat": "nginx | 0.90",
+                "refId": "E",
+                "step": 1
+              },
+              {
+                "expr": "histogram_quantile(0.5, sum(rate(nginx_http_request_duration_seconds_bucket{app=\"$container\", kubernetes_namespace=\"$namespace\"}[30s])) by (app,kubernetes_namespace,le))",
+                "intervalFactor": 1,
+                "legendFormat": "nginx | 0.50",
+                "refId": "F",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Response time percentiles",
+            "tooltip": {
+              "msResolution": true,
+              "shared": true,
+              "sort": 0,
+              "value_type": "cumulative"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "s",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Response time",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": false,
+        "height": 250,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 7,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 12,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "count(count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (pod_name))",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "pods",
+                "refId": "A",
+                "step": 5
+              },
+              {
+                "expr": "count(count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (kubernetes_io_hostname))",
+                "interval": "",
+                "intervalFactor": 2,
+                "legendFormat": "hosts",
+                "refId": "B",
+                "step": 10
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Number of pods",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Pod count",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": false,
+        "height": 250,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 12,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [
+              {
+                "alias": "elasticsearch-logging-data-20170207a (logging) - system",
+                "color": "#BF1B00"
+              },
+              {
+                "alias": "elasticsearch-logging-data-20170207a (logging) - user",
+                "color": "#508642"
+              }
+            ],
+            "span": 12,
+            "stack": true,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(container_cpu_system_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (namespace,container_name) / sum(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container_name)",
+                "intervalFactor": 2,
+                "legendFormat": "system",
+                "refId": "C",
+                "step": 10
+              },
+              {
+                "expr": "sum(irate(container_cpu_user_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (namespace,container_name) / sum(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container_name)",
+                "interval": "",
+                "intervalFactor": 2,
+                "legendFormat": "user",
+                "refId": "B",
+                "step": 10
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Cpu usage (relative to request)",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "percentunit",
+                "label": "",
+                "logBase": 1,
+                "max": "1",
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Usage relative to request",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": true,
+        "height": 250,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 10,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(container_cpu_usage_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (namespace,container_name) / sum(container_spec_cpu_quota{container_name=\"$container\", namespace=\"$namespace\"} / container_spec_cpu_period{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "metric": "",
+                "refId": "A",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Cpu usage (relative to limit)",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "percentunit",
+                "label": "",
+                "logBase": 1,
+                "max": "1",
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          },
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 11,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / sum(container_spec_memory_limit_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "refId": "A",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Memory usage (relative to limit)",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "percentunit",
+                "label": null,
+                "logBase": 1,
+                "max": "1",
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Usage relative to limit",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": true,
+        "height": 250,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "fill": 1,
+            "id": 13,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "null",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(container_cpu_usage_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (id,pod_name)",
+                "interval": "",
+                "intervalFactor": 2,
+                "legendFormat": "{{pod_name}}",
+                "refId": "A",
+                "step": 2
+              },
+              {
+                "expr": "sum(container_spec_cpu_quota{container_name=\"$container\", namespace=\"$namespace\"} / container_spec_cpu_period{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "intervalFactor": 2,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 2
+              },
+              {
+                "expr": "sum(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container_name) / count(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "intervalFactor": 2,
+                "legendFormat": "request",
+                "refId": "C",
+                "step": 2
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Cpu usage (per pod)",
+            "tooltip": {
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "short",
+                "label": "cores",
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          },
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "fill": 1,
+            "id": 14,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "null",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (id,pod_name)",
+                "interval": "",
+                "intervalFactor": 2,
+                "legendFormat": "{{pod_name}}",
+                "refId": "A",
+                "step": 2
+              },
+              {
+                "expr": "sum(container_spec_memory_limit_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (container_name,namespace)",
+                "intervalFactor": 2,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 2
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Memory usage (per pod)",
+            "tooltip": {
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "bytes",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Usage per pod",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": true,
+        "height": 250,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 8,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(container_cpu_usage_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "refId": "A",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_cpu_quota{container_name=\"$container\", namespace=\"$namespace\"} / container_spec_cpu_period{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container_name) / count(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "request",
+                "refId": "C",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Cpu usage (avg per pod)",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "none",
+                "label": "cores",
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          },
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "id": 9,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 1,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "metric": "",
+                "refId": "A",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_memory_limit_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) / count(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name) ",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Memory usage (avg per pod)",
+            "tooltip": {
+              "msResolution": false,
+              "shared": true,
+              "sort": 0,
+              "value_type": "individual"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "bytes",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Usage per pod (average)",
+        "titleSize": "h6"
+      },
+      {
+        "collapse": true,
+        "height": 259.4375,
+        "panels": [
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "grid": {},
+            "id": 1,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 2,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(irate(container_cpu_usage_seconds_total{container_name=\"$container\", namespace=\"$namespace\"}[30s])) by (namespace,container_name)",
+                "hide": false,
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "metric": "",
+                "refId": "A",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_cpu_quota{container_name=\"$container\", namespace=\"$namespace\"} / container_spec_cpu_period{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name)",
+                "intervalFactor": 1,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_cpu_shares{container_name=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container_name) ",
+                "intervalFactor": 1,
+                "legendFormat": "request",
+                "refId": "C",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Cpu usage (total)",
+            "tooltip": {
+              "msResolution": true,
+              "shared": false,
+              "sort": 0,
+              "value_type": "cumulative"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "none",
+                "label": "cores",
+                "logBase": 1,
+                "max": null,
+                "min": 0,
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          },
+          {
+            "aliasColors": {},
+            "bars": false,
+            "datasource": "Prometheus",
+            "editable": true,
+            "error": false,
+            "fill": 1,
+            "grid": {},
+            "id": 2,
+            "legend": {
+              "alignAsTable": true,
+              "avg": true,
+              "current": false,
+              "max": true,
+              "min": false,
+              "rightSide": true,
+              "show": true,
+              "sort": "avg",
+              "sortDesc": true,
+              "total": false,
+              "values": true
+            },
+            "lines": true,
+            "linewidth": 2,
+            "links": [],
+            "nullPointMode": "connected",
+            "percentage": false,
+            "pointradius": 5,
+            "points": false,
+            "renderer": "flot",
+            "seriesOverrides": [],
+            "span": 6,
+            "stack": false,
+            "steppedLine": false,
+            "targets": [
+              {
+                "expr": "sum(container_memory_usage_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name)",
+                "interval": "",
+                "intervalFactor": 1,
+                "legendFormat": "actual",
+                "refId": "A",
+                "step": 1
+              },
+              {
+                "expr": "sum(container_spec_memory_limit_bytes{container_name=\"$container\", namespace=\"$namespace\"}) by (namespace,container_name)",
+                "intervalFactor": 1,
+                "legendFormat": "limit",
+                "refId": "B",
+                "step": 1
+              }
+            ],
+            "thresholds": [],
+            "timeFrom": null,
+            "timeShift": null,
+            "title": "Memory usage (total)",
+            "tooltip": {
+              "msResolution": true,
+              "shared": false,
+              "sort": 0,
+              "value_type": "cumulative"
+            },
+            "type": "graph",
+            "xaxis": {
+              "mode": "time",
+              "name": null,
+              "show": true,
+              "values": []
+            },
+            "yaxes": [
+              {
+                "format": "bytes",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": "0",
+                "show": true
+              },
+              {
+                "format": "short",
+                "label": null,
+                "logBase": 1,
+                "max": null,
+                "min": null,
+                "show": true
+              }
+            ]
+          }
+        ],
+        "repeat": null,
+        "repeatIteration": null,
+        "repeatRowId": null,
+        "showTitle": false,
+        "title": "Usage total",
+        "titleSize": "h6"
+      }
+    ],
+    "schemaVersion": 14,
+    "style": "dark",
+    "tags": [],
+    "templating": {
+      "list": [
+        {
+          "allValue": ".+",
+          "current": {},
+          "datasource": "Prometheus",
+          "hide": 0,
+          "includeAll": false,
+          "label": null,
+          "multi": false,
+          "name": "namespace",
+          "options": [],
+          "query": "label_values(container_memory_usage_bytes{namespace=~\".+\",container_name!=\"POD\"},namespace)",
+          "refresh": 1,
+          "regex": "",
+          "sort": 1,
+          "tagValuesQuery": null,
+          "tags": [],
+          "tagsQuery": null,
+          "type": "query",
+          "useTags": false
+        },
+        {
+          "allValue": ".+",
+          "current": {},
+          "datasource": "Prometheus",
+          "hide": 0,
+          "includeAll": false,
+          "label": null,
+          "multi": false,
+          "name": "container",
+          "options": [],
+          "query": "label_values(container_memory_usage_bytes{namespace=~\"$namespace\",container_name!=\"POD\"},container_name)",
+          "refresh": 1,
+          "regex": "",
+          "sort": 1,
+          "tagValuesQuery": null,
+          "tags": [],
+          "tagsQuery": null,
+          "type": "query",
+          "useTags": false
+        }
+      ]
+    },
+    "time": {
+      "from": "now-3h",
+      "to": "now"
+    },
+    "timepicker": {
+      "refresh_intervals": [
+        "5s",
+        "10s",
+        "30s",
+        "1m",
+        "5m",
+        "15m",
+        "30m",
+        "1h",
+        "2h",
+        "1d"
+      ],
+      "time_options": [
+        "5m",
+        "15m",
+        "1h",
+        "6h",
+        "12h",
+        "24h",
+        "2d",
+        "7d",
+        "30d"
+      ]
+    },
+    "timezone": "browser",
+    "title": "Kubernetes App Metrics",
+    "version": 37,
+    "description": "After selecting your namespace and container you get a wealth of metrics like request rate, error rate, response times, pod count, cpu and memory usage. You can view cpu and memory usage in a variety of ways, compared to the limit, compared to the request, per pod, average per pod, etc."
+  }
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/onos-kpi.json b/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/onos-kpi.json
new file mode 100644 (file)
index 0000000..a1e2c0e
--- /dev/null
@@ -0,0 +1,652 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "$$hashKey": "object:204",
+        "builtIn": 1,
+        "datasource": "-- Grafana --",
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "type": "dashboard"
+      }
+    ]
+  },
+  "editable": true,
+  "gnetId": null,
+  "graphTooltip": 0,
+  "iteration": 1541038643440,
+  "links": [],
+  "panels": [
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 5,
+      "panels": [],
+      "repeat": "device",
+      "scopedVars": {
+        "device": {
+          "$$hashKey": "object:861",
+          "selected": false,
+          "text": "of:0000000000000001",
+          "value": "of:0000000000000001"
+        }
+      },
+      "title": "Device $device",
+      "type": "row"
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 1
+      },
+      "id": 6,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeatDirection": "h",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_rx_bytes_total{device_id=\"$device\"} / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received MB",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 1
+      },
+      "id": 7,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeatDirection": "h",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_tx_bytes_total{device_id=\"$device\"} / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted MB",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 9
+      },
+      "id": 2,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "scopedVars": {
+        "device": {
+          "$$hashKey": "object:861",
+          "selected": false,
+          "text": "of:0000000000000001",
+          "value": "of:0000000000000001"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_rx_packets_total{device_id=\"$device\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received Packets",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 9
+      },
+      "id": 3,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "scopedVars": {
+        "device": {
+          "$$hashKey": "object:861",
+          "selected": false,
+          "text": "of:0000000000000001",
+          "value": "of:0000000000000001"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_tx_packets_total{device_id=\"$device\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted Packets",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 0,
+        "y": 17
+      },
+      "id": 8,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeatDirection": "h",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_rx_drop_packets_total{device_id=\"$device\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received Packets Dropped",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 8,
+        "w": 12,
+        "x": 12,
+        "y": 17
+      },
+      "id": 9,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeatDirection": "h",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:335",
+          "expr": "onos_tx_drop_packets_total{device_id=\"$device\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{ device_id }}:{{ port_id }}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted Packets Dropped",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    }
+  ],
+  "refresh": "10s",
+  "schemaVersion": 16,
+  "style": "dark",
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "allValue": null,
+        "current": {
+          "tags": [],
+          "text": "All",
+          "value": [
+            "$__all"
+          ]
+        },
+        "datasource": "Prometheus",
+        "hide": 0,
+        "includeAll": true,
+        "label": null,
+        "multi": true,
+        "name": "device",
+        "options": [],
+        "query": "label_values(onos_rx_packets_total, device_id)",
+        "refresh": 1,
+        "regex": "",
+        "sort": 0,
+        "tagValuesQuery": "",
+        "tags": [],
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      }
+    ]
+  },
+  "time": {
+    "from": "now-5m",
+    "to": "now"
+  },
+  "timepicker": {
+    "refresh_intervals": [
+      "5s",
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "",
+  "title": "ONOS KPIs",
+  "uid": "kqqYHvaiz",
+  "version": 1
+}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/voltha-kpi.json b/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/voltha-kpi.json
new file mode 100644 (file)
index 0000000..b76bb2f
--- /dev/null
@@ -0,0 +1,1172 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "$$hashKey": "object:894",
+        "builtIn": 1,
+        "datasource": "-- Grafana --",
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "type": "dashboard"
+      }
+    ]
+  },
+  "description": "Display KPIs as collected by VOLTHA",
+  "editable": true,
+  "gnetId": null,
+  "graphTooltip": 0,
+  "iteration": 1541700702670,
+  "links": [],
+  "panels": [
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 7,
+      "panels": [],
+      "title": "Bytes",
+      "type": "row"
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "Count the tx bytes on the NNI ports by device",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 0,
+        "y": 1
+      },
+      "id": 9,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:187",
+          "expr": "sum(voltha_tx_bytes_total{title=\"Ethernet\"})by(logical_device_id)  / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{logical_device_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted MB by device",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "Count the rx bytes on the NNI ports by device",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 12,
+        "y": 1
+      },
+      "id": 10,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:241",
+          "expr": "sum(voltha_rx_bytes_total{title=\"Ethernet\"})by(logical_device_id) / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{logical_device_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received MB by device",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 10
+      },
+      "id": 2,
+      "panels": [],
+      "title": "Packets",
+      "type": "row"
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "Count the tx packets on the NNI ports by device",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 0,
+        "y": 11
+      },
+      "id": 4,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:295",
+          "expr": "sum(voltha_tx_packets_total{title=\"Ethernet\"})by(logical_device_id)",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{logical_device_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted packets by device",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "Count the rx packets on the NNI ports by device",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 12,
+        "y": 11
+      },
+      "id": 5,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:349",
+          "expr": "sum(voltha_rx_packets_total{title=\"Ethernet\"})by(logical_device_id)",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{logical_device_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received packets by device",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 20
+      },
+      "id": 14,
+      "panels": [],
+      "title": "Realtime Traffic Data",
+      "type": "row"
+    },
+    {
+      "alert": {
+        "conditions": [
+          {
+            "evaluator": {
+              "params": [
+                5
+              ],
+              "type": "gt"
+            },
+            "operator": {
+              "type": "and"
+            },
+            "query": {
+              "params": [
+                "A",
+                "1m",
+                "now"
+              ]
+            },
+            "reducer": {
+              "params": [],
+              "type": "sum"
+            },
+            "type": "query"
+          }
+        ],
+        "executionErrorState": "alerting",
+        "frequency": "60s",
+        "handler": 1,
+        "name": "Realtime Incoming MB by NNI port alert",
+        "noDataState": "no_data",
+        "notifications": []
+      },
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 10,
+        "w": 24,
+        "x": 0,
+        "y": 21
+      },
+      "id": 12,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "hideEmpty": true,
+        "hideZero": true,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:362",
+          "expr": "delta(voltha_rx_bytes_total{title=\"Ethernet\"}[30s]) / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{logical_device_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [
+        {
+          "colorMode": "critical",
+          "fill": true,
+          "line": true,
+          "op": "gt",
+          "value": 5
+        }
+      ],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Realtime Incoming MB by NNI port",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "$$hashKey": "object:421",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "$$hashKey": "object:422",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 31
+      },
+      "id": 19,
+      "panels": [],
+      "title": "Per device informations",
+      "type": "row"
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 0,
+        "y": 32
+      },
+      "id": 21,
+      "legend": {
+        "alignAsTable": false,
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 12,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": "olt",
+      "repeatDirection": "v",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:987",
+          "expr": "voltha_rx_bytes_total{title=\"PON\", logical_device_id=\"$olt\"} / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{pon_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Received MB per PON on device $olt",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "$$hashKey": "object:1472",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "$$hashKey": "object:1473",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 12,
+        "y": 32
+      },
+      "id": 26,
+      "legend": {
+        "alignAsTable": false,
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 12,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": "olt",
+      "repeatDirection": "v",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:987",
+          "expr": "voltha_tx_bytes_total{title=\"PON\", logical_device_id=\"$olt\"} / 1024 / 1024",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{pon_id}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Transmitted MB per PON on device $olt",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "$$hashKey": "object:1472",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "$$hashKey": "object:1473",
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 0,
+        "y": 41
+      },
+      "id": 32,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:637",
+          "expr": "voltha_tx_bytes_total{title=\"Ethernet_Bridge_Port_History\", serial_number=\"$onu\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{serial_number}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "ONU Transmitted Bytes on $onu",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 12,
+        "y": 41
+      },
+      "id": 28,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:432",
+          "expr": "voltha_tx_packets_total{title=\"Ethernet_Bridge_Port_History\", serial_number=\"$onu\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{serial_number}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "ONU Transmitted Packets on $onu",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 0,
+        "y": 50
+      },
+      "id": 34,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:836",
+          "expr": "voltha_rx_bytes_total{title=\"Ethernet_Bridge_Port_History\", serial_number=\"$onu\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{serial_number}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "ONU Received Bytes on $onu",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 12,
+        "x": 12,
+        "y": 50
+      },
+      "id": 30,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:537",
+          "expr": "voltha_rx_packets_total{title=\"Ethernet_Bridge_Port_History\", serial_number=\"$onu\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{serial_number}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "ONU Received Packets on $onu",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    }
+  ],
+  "refresh": "15s",
+  "schemaVersion": 16,
+  "style": "dark",
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "allValue": null,
+        "current": {
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": "Prometheus",
+        "hide": 0,
+        "includeAll": true,
+        "label": "OLT Device",
+        "multi": false,
+        "name": "olt",
+        "options": [],
+        "query": "label_values(voltha_tx_bytes_total, logical_device_id)",
+        "refresh": 1,
+        "regex": "",
+        "sort": 0,
+        "tagValuesQuery": "",
+        "tags": [],
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "allValue": null,
+        "current": {
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": "Prometheus",
+        "hide": 0,
+        "includeAll": true,
+        "label": null,
+        "multi": false,
+        "name": "onu",
+        "options": [
+          {
+            "$$hashKey": "object:232",
+            "selected": true,
+            "text": "All",
+            "value": "$__all"
+          },
+          {
+            "$$hashKey": "object:233",
+            "selected": false,
+            "text": "ISKT71e801a0",
+            "value": "ISKT71e801a0"
+          }
+        ],
+        "query": "label_values(voltha_tx_packets_total{title=\"Ethernet_Bridge_Port_History\"}, serial_number)",
+        "refresh": 0,
+        "regex": "",
+        "sort": 0,
+        "tagValuesQuery": "",
+        "tags": [],
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      }
+    ]
+  },
+  "time": {
+    "from": "now-1h",
+    "to": "now"
+  },
+  "timepicker": {
+    "refresh_intervals": [
+      "5s",
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "",
+  "title": "Voltha",
+  "uid": "i9V9JtOmz",
+  "version": 1
+}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/xos.json b/src/seba_charts/cord-platform/charts/nem-monitoring/grafana-dashboards/xos.json
new file mode 100644 (file)
index 0000000..7e4da5c
--- /dev/null
@@ -0,0 +1,7959 @@
+{
+  "annotations": {
+    "list": [
+      {
+        "$$hashKey": "object:297",
+        "builtIn": 1,
+        "datasource": "-- Grafana --",
+        "enable": true,
+        "hide": true,
+        "iconColor": "rgba(0, 211, 255, 1)",
+        "name": "Annotations & Alerts",
+        "type": "dashboard"
+      }
+    ]
+  },
+  "description": "Monitoring XOS Activities",
+  "editable": true,
+  "gnetId": null,
+  "graphTooltip": 0,
+  "iteration": 1538693445200,
+  "links": [],
+  "panels": [
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": null,
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 24,
+        "x": 0,
+        "y": 0
+      },
+      "id": 234,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:1453",
+          "expr": "rate(grpc_request_latency_seconds_sum[5m]) / rate(grpc_request_latency_seconds_count[5m])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{model_name}} - {{endpoint}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Average request duration in the last 5 minutes",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 9
+      },
+      "id": 152,
+      "panels": [],
+      "title": "Requests by status",
+      "type": "row"
+    },
+    {
+      "cacheTimeout": null,
+      "colorBackground": false,
+      "colorValue": false,
+      "colors": [
+        "#299c46",
+        "rgba(237, 129, 40, 0.89)",
+        "#d44a3a"
+      ],
+      "datasource": null,
+      "format": "none",
+      "gauge": {
+        "maxValue": 100,
+        "minValue": 0,
+        "show": false,
+        "thresholdLabels": false,
+        "thresholdMarkers": true
+      },
+      "gridPos": {
+        "h": 9,
+        "w": 8,
+        "x": 0,
+        "y": 10
+      },
+      "id": 227,
+      "interval": null,
+      "links": [],
+      "mappingType": 1,
+      "mappingTypes": [
+        {
+          "name": "value to text",
+          "value": 1
+        },
+        {
+          "name": "range to text",
+          "value": 2
+        }
+      ],
+      "maxDataPoints": 100,
+      "minSpan": 4,
+      "nullPointMode": "connected",
+      "nullText": null,
+      "postfix": "",
+      "postfixFontSize": "50%",
+      "prefix": "",
+      "prefixFontSize": "50%",
+      "rangeMaps": [
+        {
+          "from": "null",
+          "text": "N/A",
+          "to": "null"
+        }
+      ],
+      "repeat": "request_status",
+      "repeatDirection": "h",
+      "scopedVars": {
+        "request_status": {
+          "$$hashKey": "object:807",
+          "selected": false,
+          "text": "OK",
+          "value": "OK"
+        }
+      },
+      "sparkline": {
+        "fillColor": "rgba(31, 118, 189, 0.18)",
+        "full": false,
+        "lineColor": "rgb(31, 120, 193)",
+        "show": false
+      },
+      "tableColumn": "",
+      "targets": [
+        {
+          "$$hashKey": "object:1071",
+          "expr": "sum(grpc_request_count_total{status=\"StatusCode.$request_status\"})",
+          "format": "time_series",
+          "hide": false,
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "thresholds": "",
+      "title": "Total requests resulted in $request_status",
+      "type": "singlestat",
+      "valueFontSize": "80%",
+      "valueMaps": [
+        {
+          "op": "=",
+          "text": "N/A",
+          "value": "null"
+        }
+      ],
+      "valueName": "avg"
+    },
+    {
+      "cacheTimeout": null,
+      "colorBackground": false,
+      "colorValue": false,
+      "colors": [
+        "#299c46",
+        "rgba(237, 129, 40, 0.89)",
+        "#d44a3a"
+      ],
+      "datasource": null,
+      "format": "none",
+      "gauge": {
+        "maxValue": 100,
+        "minValue": 0,
+        "show": false,
+        "thresholdLabels": false,
+        "thresholdMarkers": true
+      },
+      "gridPos": {
+        "h": 9,
+        "w": 8,
+        "x": 8,
+        "y": 10
+      },
+      "id": 235,
+      "interval": null,
+      "links": [],
+      "mappingType": 1,
+      "mappingTypes": [
+        {
+          "name": "value to text",
+          "value": 1
+        },
+        {
+          "name": "range to text",
+          "value": 2
+        }
+      ],
+      "maxDataPoints": 100,
+      "minSpan": 4,
+      "nullPointMode": "connected",
+      "nullText": null,
+      "postfix": "",
+      "postfixFontSize": "50%",
+      "prefix": "",
+      "prefixFontSize": "50%",
+      "rangeMaps": [
+        {
+          "from": "null",
+          "text": "N/A",
+          "to": "null"
+        }
+      ],
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 227,
+      "scopedVars": {
+        "request_status": {
+          "$$hashKey": "object:808",
+          "selected": false,
+          "text": "PERMISSION_DENIED",
+          "value": "PERMISSION_DENIED"
+        }
+      },
+      "sparkline": {
+        "fillColor": "rgba(31, 118, 189, 0.18)",
+        "full": false,
+        "lineColor": "rgb(31, 120, 193)",
+        "show": false
+      },
+      "tableColumn": "",
+      "targets": [
+        {
+          "$$hashKey": "object:1071",
+          "expr": "sum(grpc_request_count_total{status=\"StatusCode.$request_status\"})",
+          "format": "time_series",
+          "hide": false,
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "thresholds": "",
+      "title": "Total requests resulted in $request_status",
+      "type": "singlestat",
+      "valueFontSize": "80%",
+      "valueMaps": [
+        {
+          "op": "=",
+          "text": "N/A",
+          "value": "null"
+        }
+      ],
+      "valueName": "avg"
+    },
+    {
+      "cacheTimeout": null,
+      "colorBackground": false,
+      "colorValue": false,
+      "colors": [
+        "#299c46",
+        "rgba(237, 129, 40, 0.89)",
+        "#d44a3a"
+      ],
+      "datasource": null,
+      "format": "none",
+      "gauge": {
+        "maxValue": 100,
+        "minValue": 0,
+        "show": false,
+        "thresholdLabels": false,
+        "thresholdMarkers": true
+      },
+      "gridPos": {
+        "h": 9,
+        "w": 8,
+        "x": 16,
+        "y": 10
+      },
+      "id": 236,
+      "interval": null,
+      "links": [],
+      "mappingType": 1,
+      "mappingTypes": [
+        {
+          "name": "value to text",
+          "value": 1
+        },
+        {
+          "name": "range to text",
+          "value": 2
+        }
+      ],
+      "maxDataPoints": 100,
+      "minSpan": 4,
+      "nullPointMode": "connected",
+      "nullText": null,
+      "postfix": "",
+      "postfixFontSize": "50%",
+      "prefix": "",
+      "prefixFontSize": "50%",
+      "rangeMaps": [
+        {
+          "from": "null",
+          "text": "N/A",
+          "to": "null"
+        }
+      ],
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 227,
+      "scopedVars": {
+        "request_status": {
+          "$$hashKey": "object:809",
+          "selected": false,
+          "text": "UNAUTHENTICATED",
+          "value": "UNAUTHENTICATED"
+        }
+      },
+      "sparkline": {
+        "fillColor": "rgba(31, 118, 189, 0.18)",
+        "full": false,
+        "lineColor": "rgb(31, 120, 193)",
+        "show": false
+      },
+      "tableColumn": "",
+      "targets": [
+        {
+          "$$hashKey": "object:1071",
+          "expr": "sum(grpc_request_count_total{status=\"StatusCode.$request_status\"})",
+          "format": "time_series",
+          "hide": false,
+          "intervalFactor": 1,
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "thresholds": "",
+      "title": "Total requests resulted in $request_status",
+      "type": "singlestat",
+      "valueFontSize": "80%",
+      "valueMaps": [
+        {
+          "op": "=",
+          "text": "N/A",
+          "value": "null"
+        }
+      ],
+      "valueName": "avg"
+    },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 19
+      },
+      "id": 77,
+      "panels": [],
+      "title": "Requests per model",
+      "type": "row"
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 20
+      },
+      "id": 2,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": "model",
+      "repeatDirection": "h",
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "AddressPool",
+          "value": "AddressPool"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 20
+      },
+      "id": 237,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "AttWorkflowDriverService",
+          "value": "AttWorkflowDriverService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 20
+      },
+      "id": 238,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "AttWorkflowDriverServiceInstance",
+          "value": "AttWorkflowDriverServiceInstance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 20
+      },
+      "id": 239,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "AttWorkflowDriverWhiteListEntry",
+          "value": "AttWorkflowDriverWhiteListEntry"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 29
+      },
+      "id": 240,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "BNGPortMapping",
+          "value": "BNGPortMapping"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 29
+      },
+      "id": 241,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ComputeServiceInstance",
+          "value": "ComputeServiceInstance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 29
+      },
+      "id": 242,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Controller",
+          "value": "Controller"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 29
+      },
+      "id": 243,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerNetwork",
+          "value": "ControllerNetwork"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 38
+      },
+      "id": 244,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerRole",
+          "value": "ControllerRole"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 38
+      },
+      "id": 245,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerSite",
+          "value": "ControllerSite"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 38
+      },
+      "id": 246,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerSitePrivilege",
+          "value": "ControllerSitePrivilege"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 38
+      },
+      "id": 247,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerSlice",
+          "value": "ControllerSlice"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 47
+      },
+      "id": 248,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerSlicePrivilege",
+          "value": "ControllerSlicePrivilege"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 47
+      },
+      "id": 249,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ControllerUser",
+          "value": "ControllerUser"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 47
+      },
+      "id": 250,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Deployment",
+          "value": "Deployment"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 47
+      },
+      "id": 251,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "DynamicLoad",
+          "value": "DynamicLoad"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 56
+      },
+      "id": 252,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "FabricCrossconnectService",
+          "value": "FabricCrossconnectService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 56
+      },
+      "id": 253,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "FabricCrossconnectServiceInstance",
+          "value": "FabricCrossconnectServiceInstance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 56
+      },
+      "id": 254,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "FabricService",
+          "value": "FabricService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 56
+      },
+      "id": 255,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Flavor",
+          "value": "Flavor"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 65
+      },
+      "id": 256,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Image",
+          "value": "Image"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 65
+      },
+      "id": 257,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ImageDeployments",
+          "value": "ImageDeployments"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 65
+      },
+      "id": 258,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Instance",
+          "value": "Instance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 65
+      },
+      "id": 259,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "InterfaceType",
+          "value": "InterfaceType"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 74
+      },
+      "id": 260,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Modeldefs",
+          "value": "Modeldefs"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 74
+      },
+      "id": 261,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Network",
+          "value": "Network"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 74
+      },
+      "id": 262,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NetworkParameter",
+          "value": "NetworkParameter"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 74
+      },
+      "id": 263,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NetworkParameterType",
+          "value": "NetworkParameterType"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 83
+      },
+      "id": 264,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NetworkSlice",
+          "value": "NetworkSlice"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 83
+      },
+      "id": 265,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NetworkTemplate",
+          "value": "NetworkTemplate"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 83
+      },
+      "id": 266,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NNIPort",
+          "value": "NNIPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 83
+      },
+      "id": 267,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Node",
+          "value": "Node"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 92
+      },
+      "id": 268,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NodeLabel",
+          "value": "NodeLabel"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 92
+      },
+      "id": 269,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "NodeToSwitchPort",
+          "value": "NodeToSwitchPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 92
+      },
+      "id": 270,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "OLTDevice",
+          "value": "OLTDevice"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 92
+      },
+      "id": 271,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ONOSApp",
+          "value": "ONOSApp"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 101
+      },
+      "id": 272,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ONOSService",
+          "value": "ONOSService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 101
+      },
+      "id": 273,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ONUDevice",
+          "value": "ONUDevice"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 101
+      },
+      "id": 274,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "PONONUPort",
+          "value": "PONONUPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 101
+      },
+      "id": 275,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "PONPort",
+          "value": "PONPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 110
+      },
+      "id": 276,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Port",
+          "value": "Port"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 110
+      },
+      "id": 277,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "PortInterface",
+          "value": "PortInterface"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 110
+      },
+      "id": 278,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Principal",
+          "value": "Principal"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 110
+      },
+      "id": 279,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Privilege",
+          "value": "Privilege"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 119
+      },
+      "id": 280,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "RCORDService",
+          "value": "RCORDService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 119
+      },
+      "id": 281,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "RCORDSubscriber",
+          "value": "RCORDSubscriber"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 119
+      },
+      "id": 282,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Role",
+          "value": "Role"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 119
+      },
+      "id": 283,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Service",
+          "value": "Service"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 128
+      },
+      "id": 284,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceAttribute",
+          "value": "ServiceAttribute"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 128
+      },
+      "id": 285,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceDependency",
+          "value": "ServiceDependency"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 128
+      },
+      "id": 286,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceGraphConstraint",
+          "value": "ServiceGraphConstraint"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 128
+      },
+      "id": 287,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceInstance",
+          "value": "ServiceInstance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 137
+      },
+      "id": 288,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceInstanceAttribute",
+          "value": "ServiceInstanceAttribute"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 137
+      },
+      "id": 289,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceInstanceLink",
+          "value": "ServiceInstanceLink"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 137
+      },
+      "id": 290,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServiceInterface",
+          "value": "ServiceInterface"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 137
+      },
+      "id": 291,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "ServicePort",
+          "value": "ServicePort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 146
+      },
+      "id": 292,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Site",
+          "value": "Site"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 146
+      },
+      "id": 293,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SiteDeployment",
+          "value": "SiteDeployment"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 146
+      },
+      "id": 294,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SitePrivilege",
+          "value": "SitePrivilege"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 146
+      },
+      "id": 295,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SiteRole",
+          "value": "SiteRole"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 155
+      },
+      "id": 296,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Slice",
+          "value": "Slice"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 155
+      },
+      "id": 297,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SlicePrivilege",
+          "value": "SlicePrivilege"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 155
+      },
+      "id": 298,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SliceRole",
+          "value": "SliceRole"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 155
+      },
+      "id": 299,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Switch",
+          "value": "Switch"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 164
+      },
+      "id": 300,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "SwitchPort",
+          "value": "SwitchPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 164
+      },
+      "id": 301,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Tag",
+          "value": "Tag"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 164
+      },
+      "id": 302,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "TenantWithContainer",
+          "value": "TenantWithContainer"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 164
+      },
+      "id": 303,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "TrustDomain",
+          "value": "TrustDomain"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 173
+      },
+      "id": 304,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "UNIPort",
+          "value": "UNIPort"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 173
+      },
+      "id": 305,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "User",
+          "value": "User"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 173
+      },
+      "id": 306,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "Utilities",
+          "value": "Utilities"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 18,
+        "y": 173
+      },
+      "id": 307,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "VOLTService",
+          "value": "VOLTService"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 0,
+        "y": 182
+      },
+      "id": 308,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "VOLTServiceInstance",
+          "value": "VOLTServiceInstance"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 6,
+        "y": 182
+      },
+      "id": 309,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "XOSCore",
+          "value": "XOSCore"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    },
+    {
+      "aliasColors": {},
+      "bars": false,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "Prometheus",
+      "description": "List all the request related to this model",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 6,
+        "x": 12,
+        "y": 182
+      },
+      "id": 310,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": true,
+        "total": false,
+        "values": false
+      },
+      "lines": true,
+      "linewidth": 1,
+      "links": [],
+      "minSpan": 6,
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "repeat": null,
+      "repeatDirection": "h",
+      "repeatIteration": 1538693445200,
+      "repeatPanelId": 2,
+      "scopedVars": {
+        "model": {
+          "selected": false,
+          "text": "XOSGuiExtension",
+          "value": "XOSGuiExtension"
+        }
+      },
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "$$hashKey": "object:492",
+          "expr": "grpc_request_count_total{model_name=\"$model\"}",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "{{endpoint}} - {{status}}",
+          "refId": "A"
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Requests for model $model",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "transparent": false,
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ],
+      "yaxis": {
+        "align": false,
+        "alignLevel": null
+      }
+    }
+  ],
+  "refresh": "10s",
+  "schemaVersion": 16,
+  "style": "dark",
+  "tags": [],
+  "templating": {
+    "list": [
+      {
+        "allValue": null,
+        "current": {
+          "selected": true,
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": "Prometheus",
+        "hide": 0,
+        "includeAll": true,
+        "label": null,
+        "multi": true,
+        "name": "model",
+        "options": [],
+        "query": "label_values(grpc_request_count_total, model_name)",
+        "refresh": 2,
+        "regex": "",
+        "sort": 5,
+        "tagValuesQuery": "",
+        "tags": [],
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      },
+      {
+        "allValue": null,
+        "current": {
+          "$$hashKey": "object:806",
+          "selected": true,
+          "text": "All",
+          "value": "$__all"
+        },
+        "datasource": "Prometheus",
+        "hide": 0,
+        "includeAll": true,
+        "label": null,
+        "multi": true,
+        "name": "request_status",
+        "options": [
+          {
+            "$$hashKey": "object:806",
+            "selected": true,
+            "text": "All",
+            "value": "$__all"
+          },
+          {
+            "$$hashKey": "object:807",
+            "selected": false,
+            "text": "OK",
+            "value": "OK"
+          },
+          {
+            "$$hashKey": "object:808",
+            "selected": false,
+            "text": "PERMISSION_DENIED",
+            "value": "PERMISSION_DENIED"
+          },
+          {
+            "$$hashKey": "object:809",
+            "selected": false,
+            "text": "UNAUTHENTICATED",
+            "value": "UNAUTHENTICATED"
+          }
+        ],
+        "query": "label_values(grpc_request_count_total, status)",
+        "refresh": 0,
+        "regex": ".+\\.(.+)",
+        "sort": 0,
+        "tagValuesQuery": "",
+        "tags": [],
+        "tagsQuery": "",
+        "type": "query",
+        "useTags": false
+      }
+    ]
+  },
+  "time": {
+    "from": "now-5m",
+    "to": "now"
+  },
+  "timepicker": {
+    "refresh_intervals": [
+      "5s",
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ]
+  },
+  "timezone": "",
+  "title": "XOS",
+  "uid": "vE-iQRJiz",
+  "version": 14
+}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/requirements.lock b/src/seba_charts/cord-platform/charts/nem-monitoring/requirements.lock
new file mode 100644 (file)
index 0000000..90bbf3c
--- /dev/null
@@ -0,0 +1,9 @@
+dependencies:
+- name: prometheus
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 6.8.1
+- name: grafana
+  repository: https://kubernetes-charts.storage.googleapis.com/
+  version: 1.12.0
+digest: sha256:c96c852dace815094c76692796eb2e7203c12c92619ebb63d39168e657960dcd
+generated: 2018-08-31T15:33:33.982770005-07:00
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/requirements.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/requirements.yaml
new file mode 100644 (file)
index 0000000..a55e7ea
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2017-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.
+
+dependencies:
+- name: prometheus
+  version: 6.8.1
+  repository: https://kubernetes-charts.storage.googleapis.com/
+- name: grafana
+  version: 1.12.0
+  repository: https://kubernetes-charts.storage.googleapis.com/
+
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..1838249
--- /dev/null
@@ -0,0 +1,12 @@
+Thank you for installing {{ .Chart.Name }}.
+
+Your release is named {{ .Release.Name }}.
+
+You can now access Grafana at: <cluster-ip>:{{ .Values.grafana.service.nodePort }}
+using:
+
+username: {{ .Values.grafana.adminUser}}
+password: {{ .Values.grafana.adminPassword}}
+
+and Prometheus at: <cluster-ip>:{{ .Values.prometheus.server.service.nodePort }}
+
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-deployment.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-deployment.yaml
new file mode 100644 (file)
index 0000000..530d952
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: kpi-exporter
+  labels:
+    release: {{ .Release.Name }}
+spec:
+  replicas: {{ .Values.nem_voltha_kpi_exporter_replicas }}
+  template:
+    metadata:
+      labels:
+        app: kpi-exporter
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: kpi-exporter
+          image:  "{{ .Values.global.registry }}{{ .Values.images.voltha_kpi_exporter.repository }}:{{ tpl .Values.images.voltha_kpi_exporter.tag . }}"
+          imagePullPolicy: "{{ .Values.images.voltha_kpi_exporter.pullPolicy }}"
+          args: ["-broker={{ .Values.args.voltha_kpi_broker }}"]
+          ports:
+            - containerPort: 8080
+              port: 8080
+              protocol: TCP
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-service.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/exporter-service.yaml
new file mode 100644 (file)
index 0000000..f5fcee2
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: kpi-exporter
+  labels:
+    release: {{ .Release.Name }}
+spec:
+  type: NodePort
+  ports:
+    - port: 8080
+      targetPort: 8080
+      nodePort: {{ .Values.nem_voltha_kpi_exporter_nodePort }}
+      protocol: TCP
+  selector:
+    app: "kpi-exporter"
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-kb8s-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-kb8s-configmap.yaml
new file mode 100644 (file)
index 0000000..3334c51
--- /dev/null
@@ -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: grafana-dashboard-kb8s
+  labels:
+     grafana_dashboard: "1"
+data:
+  kb8s.json: |
+{{ .Files.Get "grafana-dashboards/kb8s-app-metrics.json" | indent 4 }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-onos-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-onos-configmap.yaml
new file mode 100644 (file)
index 0000000..25d270e
--- /dev/null
@@ -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: grafana-dashboard-onos
+  labels:
+     grafana_dashboard: "1"
+data:
+  onos.json: |
+{{ .Files.Get "grafana-dashboards/onos-kpi.json" | indent 4 }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-voltha-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-voltha-configmap.yaml
new file mode 100644 (file)
index 0000000..efbb0dd
--- /dev/null
@@ -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: grafana-dashboard-voltha
+  labels:
+     grafana_dashboard: "1"
+data:
+  voltha.json: |
+{{ .Files.Get "grafana-dashboards/voltha-kpi.json" | indent 4 }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-xos-configmap.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/templates/grafana-dashboard-xos-configmap.yaml
new file mode 100644 (file)
index 0000000..13b99ef
--- /dev/null
@@ -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: grafana-dashboard-xos
+  labels:
+     grafana_dashboard: "1"
+data:
+  xos.json: |
+{{ .Files.Get "grafana-dashboards/xos.json" | indent 4 }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/nem-monitoring/values.yaml b/src/seba_charts/cord-platform/charts/nem-monitoring/values.yaml
new file mode 100644 (file)
index 0000000..8fc92e3
--- /dev/null
@@ -0,0 +1,221 @@
+---
+# 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.
+
+global:
+  registry: ''
+
+images:
+  voltha_kpi_exporter:
+    repository: 'akrainoenea/kafka-topic-exporter'
+    tag: '1.1.2'
+    pullPolicy: 'Always'
+
+nem_voltha_kpi_exporter_nodePort: 31080
+nem_voltha_kpi_exporter_replicas: 2
+
+args:
+  voltha_kpi_broker: cord-kafka:9092
+
+prometheus:
+  alertmanager:
+    persistentVolume:
+      enabled: false
+  server:
+    persistentVolume:
+      enabled: false
+    service:
+      type: NodePort
+      nodePort: 31301
+  serverFiles:
+    alerts: {}
+    rules: {}
+
+    prometheus.yml:
+      rule_files:
+        - /etc/config/rules
+        - /etc/config/alerts
+
+      scrape_configs:
+        # voltha KPI
+        - job_name: 'voltha-kpi'
+          metrics_path: /metrics
+          scrape_interval: 15s
+          static_configs:
+            - targets:
+              - kpi-exporter:8080
+
+        # XOS-Core
+        - job_name: 'xos-core'
+          metrics_path: /metrics
+          scrape_interval: 15s
+          static_configs:
+            - targets:
+              - xos-core-prometheus:8000
+
+        # KB8s monitoring jobs
+        - job_name: prometheus
+          static_configs:
+            - targets:
+              - localhost:9090
+        - job_name: 'kubernetes-apiservers'
+          kubernetes_sd_configs:
+            - role: endpoints
+          scheme: https
+          tls_config:
+            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+            insecure_skip_verify: true
+          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+          relabel_configs:
+            - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
+              action: keep
+              regex: default;kubernetes;https
+        - job_name: 'kubernetes-nodes'
+          # Default to scraping over https. If required, just disable this or change to
+          # `http`.
+          scheme: https
+          tls_config:
+            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+            insecure_skip_verify: true
+          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+          kubernetes_sd_configs:
+            - role: node
+          relabel_configs:
+            - action: labelmap
+              regex: __meta_kubernetes_node_label_(.+)
+            - target_label: __address__
+              replacement: kubernetes.default.svc:443
+            - source_labels: [__meta_kubernetes_node_name]
+              regex: (.+)
+              target_label: __metrics_path__
+              replacement: /api/v1/nodes/${1}/proxy/metrics
+        - job_name: 'kubernetes-nodes-cadvisor'
+          scheme: https
+          tls_config:
+            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
+            insecure_skip_verify: true
+          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
+          kubernetes_sd_configs:
+            - role: node
+          relabel_configs:
+            - action: labelmap
+              regex: __meta_kubernetes_node_label_(.+)
+            - target_label: __address__
+              replacement: kubernetes.default.svc:443
+            - source_labels: [__meta_kubernetes_node_name]
+              regex: (.+)
+              target_label: __metrics_path__
+              replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor
+        - job_name: 'kubernetes-service-endpoints'
+          kubernetes_sd_configs:
+            - role: endpoints
+          relabel_configs:
+            - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
+              action: keep
+              regex: true
+            - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
+              action: replace
+              target_label: __scheme__
+              regex: (https?)
+            - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
+              action: replace
+              target_label: __metrics_path__
+              regex: (.+)
+            - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
+              action: replace
+              target_label: __address__
+              regex: ([^:]+)(?::\d+)?;(\d+)
+              replacement: $1:$2
+            - action: labelmap
+              regex: __meta_kubernetes_service_label_(.+)
+            - source_labels: [__meta_kubernetes_namespace]
+              action: replace
+              target_label: kubernetes_namespace
+            - source_labels: [__meta_kubernetes_service_name]
+              action: replace
+              target_label: kubernetes_name
+        - job_name: 'prometheus-pushgateway'
+          honor_labels: true
+          kubernetes_sd_configs:
+            - role: service
+          relabel_configs:
+            - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
+              action: keep
+              regex: pushgateway
+        - job_name: 'kubernetes-services'
+          metrics_path: /probe
+          params:
+            module: [http_2xx]
+          kubernetes_sd_configs:
+            - role: service
+          relabel_configs:
+            - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
+              action: keep
+              regex: true
+            - source_labels: [__address__]
+              target_label: __param_target
+            - target_label: __address__
+              replacement: blackbox
+            - source_labels: [__param_target]
+              target_label: instance
+            - action: labelmap
+              regex: __meta_kubernetes_service_label_(.+)
+            - source_labels: [__meta_kubernetes_namespace]
+              target_label: kubernetes_namespace
+            - source_labels: [__meta_kubernetes_service_name]
+              target_label: kubernetes_name
+        - job_name: 'kubernetes-pods'
+          kubernetes_sd_configs:
+            - role: pod
+          relabel_configs:
+            - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
+              action: keep
+              regex: true
+            - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
+              action: replace
+              target_label: __metrics_path__
+              regex: (.+)
+            - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
+              action: replace
+              regex: ([^:]+)(?::\d+)?;(\d+)
+              replacement: $1:$2
+              target_label: __address__
+            - action: labelmap
+              regex: __meta_kubernetes_pod_label_(.+)
+            - source_labels: [__meta_kubernetes_namespace]
+              action: replace
+              target_label: kubernetes_namespace
+            - source_labels: [__meta_kubernetes_pod_name]
+              action: replace
+              target_label: kubernetes_pod_name
+
+grafana:
+  adminUser: admin
+  adminPassword: strongpassword
+  service:
+    type: NodePort
+    nodePort: 31300
+  sidecar:
+    dashboards:
+      enabled: true
+      label: grafana_dashboard
+  datasources:
+    datasources.yaml:
+      apiVersion: 1
+      datasources:
+        - name: Prometheus
+          type: prometheus
+          url: http://nem-monitoring-prometheus-server.default.svc.cluster.local
+          access: proxy
+          isDefault: true
diff --git a/src/seba_charts/cord-platform/charts/onos/.helmignore b/src/seba_charts/cord-platform/charts/onos/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/onos/Chart.yaml b/src/seba_charts/cord-platform/charts/onos/Chart.yaml
new file mode 100644 (file)
index 0000000..ff5200c
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.13.5
+description: Open Network Operating System
+icon: https://guide.opencord.org/logos/onos.svg
+name: onos
+version: 1.1.0
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/onos/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..1dab05a
--- /dev/null
@@ -0,0 +1,110 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "onos.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "onos.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "onos.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "onos.logCfg" -}}
+################################################################################
+#
+#    Licensed to the Apache Software Foundation (ASF) under one or more
+#    contributor license agreements.  See the NOTICE file distributed with
+#    this work for additional information regarding copyright ownership.
+#    The ASF licenses this file to You 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.
+#
+################################################################################
+
+# Root logger
+log4j.rootLogger=INFO, out, json, osgi:*, stdout
+log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
+
+# CONSOLE appender not used by default
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+
+# File appender
+log4j.appender.out=org.apache.log4j.RollingFileAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
+log4j.appender.out.file=${karaf.data}/log/karaf.log
+log4j.appender.out.append=true
+log4j.appender.out.maxFileSize=10MB
+log4j.appender.out.maxBackupIndex=10
+
+# JSON-ish appender (doesn't handle quotes in fields correctly)
+# docs: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
+log4j.appender.json=org.apache.log4j.RollingFileAppender
+log4j.appender.json.layout=org.apache.log4j.PatternLayout
+log4j.appender.json.layout.ConversionPattern={"@timestamp":"%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z'}","levelname":"%p","threadName":"%t","category":"%c{1}","bundle.id":"%X{bundle.id}","bundle.name":"%X{bundle.name}","bundle.version":"%X{bundle.version}","message":"%m"}%n
+log4j.appender.json.file=${karaf.data}/log/karaf_json.log
+log4j.appender.json.append=true
+log4j.appender.json.maxFileSize=10MB
+log4j.appender.json.maxBackupIndex=10
+
+# Sift appender - one logfile per bundle ID
+log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
+log4j.appender.sift.key=bundle.name
+log4j.appender.sift.default=karaf
+log4j.appender.sift.appender=org.apache.log4j.FileAppender
+log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
+log4j.appender.sift.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
+log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
+log4j.appender.sift.appender.append=true
+
+# Application logs
+{{ .Values.application_logs }}
+
+{{- end -}}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/configmap.yaml b/src/seba_charts/cord-platform/charts/onos/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..0aaec49
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: onos
+data:
+  logCfg: |
+{{ include "onos.logCfg" . | indent 4 }}
\ No newline at end of file
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/debugger-service.yaml b/src/seba_charts/cord-platform/charts/onos/templates/debugger-service.yaml
new file mode 100644 (file)
index 0000000..79f266b
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: {{ template "onos.fullname" . }}-debugger
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.services.debuggerServiceType }}
+  ports:
+  - name: debugger
+{{ toYaml .Values.services.debugger | indent 4 }}
+  selector:
+    app: {{ template "onos.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/deployment.yaml b/src/seba_charts/cord-platform/charts/onos/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..f463c1d
--- /dev/null
@@ -0,0 +1,133 @@
+---
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "onos.fullname" . }}
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+{{- if .Values.xos_service_label }}
+    xos_service: {{ .Values.xos_service_label }}
+{{- end }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "onos.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "onos.name" . }}
+        release: {{ .Release.Name }}
+{{- if .Values.xos_service_label }}
+        xos_service: {{ .Values.xos_service_label }}
+{{- end }}
+    spec:
+      serviceAccount: {{ .Values.serviceAccountName }}
+      serviceAccountName: {{ .Values.serviceAccountName }}
+      containers:
+        - name: {{ .Chart.Name }}
+          image:  "{{ .Values.global.registry }}{{ .Values.images.onos.repository }}:{{ tpl .Values.images.onos.tag . }}"
+          imagePullPolicy: {{ .Values.images.onos.pullPolicy }}
+          command: ["./bin/onos-service", "server", "debug"]
+          env:
+{{ toYaml .Values.onos_env | indent 12 }}
+          ports:
+            - name: ovsdb
+              containerPort: {{ .Values.services.ovsdb.port }}
+            - name: openflow
+              containerPort: {{ .Values.services.openflow.port }}
+            - name: ssh
+              containerPort: {{ .Values.services.ssh.port }}
+            - name: ui
+              containerPort: {{ .Values.services.ui.port }}
+            - name: cluster
+              containerPort: {{ .Values.services.cluster.port }}
+            - name: debugger
+              containerPort: {{ .Values.services.debugger.port }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: node-key
+              mountPath: /root/vtn
+              readOnly: true
+            - name: onos-logs-cfg
+              mountPath: /root/onos/apache-karaf-3.0.8/etc/org.ops4j.pax.logging.cfg
+              subPath: org.ops4j.pax.logging.cfg
+            - name: onos-logs
+              mountPath: /root/onos/apache-karaf-3.0.8/data/log
+{{- if .Values.log_agent.enabled }}
+        - name: {{ .Chart.Name }}-log-agent
+          image: "{{ .Values.global.registry }}{{ .Values.images.log_agent.repository }}:{{ .Values.images.log_agent.tag }}"
+          imagePullPolicy: {{ .Values.images.log_agent.pullPolicy }}
+          args: [ "-c", "/conf/filebeat.yml", "-e" ]
+          env:
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+            - name: NODE_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: spec.nodeName
+          volumeMounts:
+            - name: onos-logs
+              mountPath: /onos_logs
+            - name: log-agent-configmap-volume
+              mountPath: /conf
+{{- end }}
+      volumes:
+        - name: node-key
+          secret:
+            secretName: node-key
+            defaultMode: 256
+            optional: true
+        - name: onos-logs-cfg
+          configMap:
+            name: onos
+            items:
+              - key: logCfg
+                path: org.ops4j.pax.logging.cfg
+        - name: onos-logs
+          emptyDir: {}
+{{- if .Values.log_agent.enabled }}
+        - name: log-agent-configmap-volume
+          configMap:
+            name: log-agent-configmap
+            items:
+              - key: config
+                path: filebeat.yml
+{{- end }}
+{{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+{{- if .Values.log_agent.enabled }}
+{{- include "onos.log-agent-configmap" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/log-agent-configmap.yaml b/src/seba_charts/cord-platform/charts/onos/templates/log-agent-configmap.yaml
new file mode 100644 (file)
index 0000000..44e2763
--- /dev/null
@@ -0,0 +1,53 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+{{- define "onos.log-agent-configmap" }}
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: log-agent-configmap
+data:
+  config: |
+    ---
+    # filebeat configuration for ONOS
+    filebeat.inputs:
+      - type: log
+        paths:
+          - "/onos_logs/karaf_json.log"
+
+        fields_under_root: true
+
+        json.keys_under_root: true
+        json.add_error_key: true
+        json.overwrite_keys: true
+        json.message_key: "message"
+
+        multiline.pattern: '^[[:space:]]'
+        multiline.negate: false
+        multiline.match: after
+
+    # remove unneeded fields
+    processors:
+      - drop_fields:
+          fields: ["host", "prospector", "input"]
+
+    output.kafka:
+      hosts: {{ .Values.log_agent.kafka_brokers | toJson }}
+      topic: 'onos.log'
+      key: '%{[bundle.name]}'
+
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/openflow-service.yaml b/src/seba_charts/cord-platform/charts/onos/templates/openflow-service.yaml
new file mode 100644 (file)
index 0000000..05fadeb
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: {{ template "onos.fullname" . }}-openflow
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.services.openflowServiceType }}
+  ports:
+  - name: openflow
+{{ toYaml .Values.services.openflow | indent 4 }}
+  selector:
+    app: {{ template "onos.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/ovsdb-service.yaml b/src/seba_charts/cord-platform/charts/onos/templates/ovsdb-service.yaml
new file mode 100644 (file)
index 0000000..f0760fe
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: {{ template "onos.fullname" . }}-ovsdb
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.services.ovsdbServiceType }}
+  ports:
+  - name: ovsdb
+{{ toYaml .Values.services.ovsdb | indent 4 }}
+  selector:
+    app: {{ template "onos.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/ssh-service.yaml b/src/seba_charts/cord-platform/charts/onos/templates/ssh-service.yaml
new file mode 100644 (file)
index 0000000..bf0b8a0
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: {{ template "onos.fullname" . }}-ssh
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.services.sshServiceType }}
+  ports:
+  - name: ssh
+{{ toYaml .Values.services.ssh | indent 4 }}
+  selector:
+    app: {{ template "onos.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/onos/templates/ui-service.yaml b/src/seba_charts/cord-platform/charts/onos/templates/ui-service.yaml
new file mode 100644 (file)
index 0000000..4c05f4d
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: {{ template "onos.fullname" . }}-ui
+  namespace: {{ .Values.namespace }}
+  labels:
+    app: {{ template "onos.name" . }}
+    chart: {{ template "onos.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.services.uiServiceType }}
+  ports:
+  - name: ui
+{{ toYaml .Values.services.ui | indent 4 }}
+  selector:
+    app: {{ template "onos.name" . }}
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/cord-platform/charts/onos/values.yaml b/src/seba_charts/cord-platform/charts/onos/values.yaml
new file mode 100644 (file)
index 0000000..95320b1
--- /dev/null
@@ -0,0 +1,97 @@
+---
+# 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.
+
+# Default values for ONOS
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+images:
+  onos:
+    repository: 'cachengo/onos'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  # keep in sync with: https://github.com/helm/charts/blob/master/stable/filebeat/values.yaml
+  log_agent:
+    repository: akrainoenea/filebeat-oss
+    tag: 6.4.2
+    pullPolicy: IfNotPresent
+
+global:
+  registry: ''
+
+log_agent:
+  enabled: True
+  kafka_brokers: ['cord-kafka:9092']
+
+nameOverride: ''
+fullnameOverride: ''
+
+xos_service_label: ONOS
+
+namespace: default
+serviceAccountName: default
+
+services:
+  openflowServiceType: NodePort
+  openflow:
+    port: 6653
+    nodePort: 31653
+
+  sshServiceType: NodePort
+  ssh:
+    port: 8101
+    nodePort: 30115
+
+  uiServiceType: NodePort
+  ui:
+    port: 8181
+    nodePort: 30120
+
+  debuggerServiceType: NodePort
+  debugger:
+    port: 5005
+    nodePort: 30555
+
+  ovsdbServiceType: ClusterIP
+  ovsdb:
+    port: 6640
+
+  cluster:
+    port: 9876
+
+onos_env:
+- name: POD_IP
+  valueFrom:
+  fieldRef:
+    fieldPath: status.podIP
+- name: NAMESPACE
+  valueFrom:
+  fieldRef:
+    fieldPath: metadata.namespace
+- name: ONOS_APPS
+  value: "drivers,openflow-base"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
+
+application_logs: ''
diff --git a/src/seba_charts/cord-platform/charts/xos-core/Chart.yaml b/src/seba_charts/cord-platform/charts/xos-core/Chart.yaml
new file mode 100644 (file)
index 0000000..c29eb81
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 2.1.25
+description: XOS - An Extensible Cloud Operating System
+icon: https://guide.opencord.org/logos/xos.svg
+name: xos-core
+version: 2.3.2
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/Chart.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/Chart.yaml
new file mode 100644 (file)
index 0000000..7258e0e
--- /dev/null
@@ -0,0 +1,4 @@
+appVersion: 10.3-alpine
+icon: https://www.postgresql.org/media/img/about/press/elephant.png
+name: xos-db
+version: 1.0.0
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..ad2a2b5
--- /dev/null
@@ -0,0 +1,24 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-db.release_labels" }}
+app: {{ printf "%s-%s" .Release.Name .Chart.Name | trunc 63 }}
+chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+release: {{ .Release.Name }}
+heritage: {{ .Release.Service }}
+version: {{ .Chart.Version }}
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_persist.tpl b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/_persist.tpl
new file mode 100644 (file)
index 0000000..ee6fb9b
--- /dev/null
@@ -0,0 +1,30 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+{{- define "xos-db.persistent-volume-claim" }}
+---
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ .Values.pvClaimName }}
+spec:
+  accessModes:
+    - ReadWriteOnce
+  storageClassName: {{ .Values.storageClassName }}
+  resources:
+    requests:
+      storage: 1Gi
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-deployment.yaml
new file mode 100644 (file)
index 0000000..9814677
--- /dev/null
@@ -0,0 +1,57 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-db
+  labels:
+    app: xos-db
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-db
+    spec:
+      containers:
+        - name: xos-db
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - containerPort: 5432
+              protocol: TCP
+          env:
+            - name: POSTGRES_DB
+              value: {{ .Values.xosDBName | quote }}
+            - name: POSTGRES_USER
+              value: {{ .Values.xosDBUser | quote }}
+            - name: POSTGRES_PASSWORD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-db-secrets
+                  key: password
+            - name: PGDATA
+              value: "/var/lib/postgresql/data/pgdata"
+{{- if .Values.needDBPersistence }}
+          volumeMounts:
+            - name: db-pv-storage
+              mountPath: "/var/lib/postgresql/data"
+      volumes:
+        - name: db-pv-storage
+          persistentVolumeClaim:
+            claimName: {{ .Values.pvClaimName }}
+{{- include "xos-db.persistent-volume-claim" . }}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-secrets.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-secrets.yaml
new file mode 100644 (file)
index 0000000..9f41343
--- /dev/null
@@ -0,0 +1,23 @@
+---
+# Copyright 2017-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: Secret
+metadata:
+  name: xos-db-secrets
+  namespace: default
+type: Opaque
+data:
+  password: {{ .Values.xosDBPassword | b64enc }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/templates/db-service.yaml
new file mode 100644 (file)
index 0000000..fe8f3b7
--- /dev/null
@@ -0,0 +1,29 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-db"
+  labels:
+    {{- include "xos-db.release_labels" . | indent 4 }}
+spec:
+  type: ClusterIP
+  selector:
+    app: "xos-db"
+  ports:
+    - port: 5432
+      targetPort: 5432
+      protocol: TCP
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/values.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-db/values.yaml
new file mode 100644 (file)
index 0000000..8428769
--- /dev/null
@@ -0,0 +1,34 @@
+---
+# Copyright 2017-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.
+
+# XOS Postgres database related values
+
+image:
+  repository: 'postgres'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+# Database name/username/password
+xosDBName: 'xos'
+xosDBUser: 'postgres'
+xosDBPassword: 'password'
+
+# DB persistence related vars
+needDBPersistence: false
+pvClaimName: xosdb-pv-claim
+storageClassName: ""
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/.helmignore b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/Chart.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/Chart.yaml
new file mode 100644 (file)
index 0000000..4266a99
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.0.3
+description: Web GUI for XOS
+icon: https://guide.opencord.org/logos/xos.svg
+name: xos-gui
+version: 1.2.1
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..74a28cc
--- /dev/null
@@ -0,0 +1,62 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-gui.release_labels" }}
+app: {{ printf "%s-%s" .Release.Name .Chart.Name | trunc 63 }}
+chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+release: {{ .Release.Name }}
+heritage: {{ .Release.Service }}
+version: {{ .Chart.Version }}
+{{- end }}
+
+{{- define "xos-gui.app_config" }}
+angular.module('app')
+.constant('AppConfig', {
+  apiEndpoint: '/xosapi/v1',
+  websocketClient: '/'
+});
+{{- end }}
+
+{{- define "xos-gui.style_config" }}
+angular.module('app')
+.constant('StyleConfig', {
+  projectName: {{ .Values.xos_projectName | quote }},
+  favicon: 'cord-favicon.png',
+  background: 'cord-bg.jpg',
+  payoff: 'Your VNF orchestrator',
+  logo: 'cord-logo.png',
+  routes: [
+      {
+          label: 'Slices',
+          state: 'xos.core.slice',
+      },
+      {
+          label: 'Nodes',
+          state: 'xos.core.node',
+      },
+      {
+          label: 'Instances',
+          state: 'xos.core.instance',
+      },
+  ]
+});
+{{- end }}
+
+{{- define "xos-gui.cord_version" }}
+{
+    "version": {{ .Values.cord_version | quote }}
+}
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_ws.tpl b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/_ws.tpl
new file mode 100644 (file)
index 0000000..0975fe0
--- /dev/null
@@ -0,0 +1,26 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-ws.gateway_config" }}
+default:
+  kafka_bootstrap_servers: {{ .Values.platformKafka | quote }}
+  xos:
+    host: xost
+    port: 9000
+  gateway:
+    port: 3000
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-configmap.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-configmap.yaml
new file mode 100644 (file)
index 0000000..16d588c
--- /dev/null
@@ -0,0 +1,51 @@
+---
+# Copyright 2017-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: gui-app-config
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-gui.app_config" . | indent 4 }}
+
+...
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: gui-style-config
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-gui.style_config" . | indent 4 }}
+
+...
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: gui-cord-version
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-gui.cord_version" . | indent 4 }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-deployment.yaml
new file mode 100644 (file)
index 0000000..d8d8b13
--- /dev/null
@@ -0,0 +1,69 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-gui
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-gui
+    spec:
+      containers:
+        - name: xos-gui
+          image: {{ .Values.global.registry }}{{ .Values.images.xos_gui.repository }}:{{ tpl .Values.images.xos_gui.tag . }}
+          imagePullPolicy: {{ .Values.images.xos_gui.pullPolicy }}
+          ports:
+            - containerPort: 4000
+              port: 4000
+              protocol: TCP
+          volumeMounts:
+            - name: style-config
+              mountPath: /var/www/dist/style.config.js
+              subPath: style/style.config.js
+            - name: app-config
+              mountPath: /var/www/dist/app.config.js
+              subPath: app/app.config.js
+            - name: cord-version
+              mountPath: /var/www/dist/version.json
+              subPath: version.json
+            - name: extensions-volume
+              mountPath: /var/www/dist/extensions
+      volumes:
+        - name: style-config
+          configMap:
+            name: gui-style-config
+            items:
+              - key: config
+                path: style/style.config.js
+        - name: app-config
+          configMap:
+            name: gui-app-config
+            items:
+              - key: config
+                path: app/app.config.js
+        - name: cord-version
+          configMap:
+            name: gui-cord-version
+            items:
+              - key: config
+                path: version.json
+        - name: extensions-volume
+          emptyDir: {}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/gui-service.yaml
new file mode 100644 (file)
index 0000000..2504f58
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-gui"
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: 4000
+      targetPort: 4000
+      nodePort: {{ .Values.xos_guiNodePort }}
+      protocol: TCP
+  selector:
+    app: "xos-gui"
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-configmap.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-configmap.yaml
new file mode 100644 (file)
index 0000000..f2caa68
--- /dev/null
@@ -0,0 +1,25 @@
+---
+# Copyright 2017-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: xos-ws
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-ws.gateway_config" . | indent 4 }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-deployment.yaml
new file mode 100644 (file)
index 0000000..e10d0f8
--- /dev/null
@@ -0,0 +1,48 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-ws
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-ws
+    spec:
+      containers:
+        - name: xos-ws
+          image: {{ .Values.global.registry }}{{ .Values.images.xos_ws.repository }}:{{ tpl .Values.images.xos_ws.tag . }}
+          imagePullPolicy: {{ .Values.images.xos_ws.pullPolicy }}
+          command: ["npm", "start", "--", "--config", "gateway-config.yml"]
+          ports:
+            - containerPort: 3000
+              port: 3000
+              protocol: TCP
+          volumeMounts:
+            - name: gateway-config
+              mountPath: /var/www/src/config/gateway-config.yml
+              subPath: config/gateway-config.yml
+      volumes:
+        - name: gateway-config
+          configMap:
+            name: xos-ws
+            items:
+              - key: config
+                path: config/gateway-config.yml
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/templates/ws-service.yaml
new file mode 100644 (file)
index 0000000..41c1a07
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-ws"
+  labels:
+    {{- include "xos-gui.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: 3000
+      targetPort: 3000
+      nodePort: {{ .Values.xos_wsNodePort }}
+      protocol: TCP
+  selector:
+    app: "xos-ws"
diff --git a/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/values.yaml b/src/seba_charts/cord-platform/charts/xos-core/charts/xos-gui/values.yaml
new file mode 100644 (file)
index 0000000..9c9b691
--- /dev/null
@@ -0,0 +1,39 @@
+---
+# Copyright 2017-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.
+
+# Docker Images
+images:
+  xos_gui:
+    repository: 'cachengo/xos-gui'
+    tag: "{{ .Chart.AppVersion }}"
+    pullPolicy: 'Always'
+
+  xos_ws:
+    repository: 'cachengo/xos-ws'
+    tag: '2.0.1'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+# NodePorts
+xos_guiNodePort: 30001
+xos_wsNodePort: 30008
+
+platformKafka: cord-kafka:9092
+
+xos_projectName: "CORD"
+
+cord_version: 6.1.0
diff --git a/src/seba_charts/cord-platform/charts/xos-core/pki/xos-CA.pem b/src/seba_charts/cord-platform/charts/xos-core/pki/xos-CA.pem
new file mode 100644 (file)
index 0000000..655dc29
--- /dev/null
@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID1jCCAr6gAwIBAgIJAIWmwLL7nulVMA0GCSqGSIb3DQEBCwUAMHgxCzAJBgNV
+BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQHDApNZW5sbyBQYXJr
+MQwwCgYDVQQKDANPTkYxFTATBgNVBAsMDFRlc3RpbmcgT25seTEaMBgGA1UEAwwR
+Q09SRCBUZXN0IFJvb3QgQ0EwHhcNMTgxMjE0MTgyNTE5WhcNMTkxMjE1MTgyNTE5
+WjB4MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTETMBEGA1UEBwwK
+TWVubG8gUGFyazEMMAoGA1UECgwDT05GMRUwEwYDVQQLDAxUZXN0aW5nIE9ubHkx
+GjAYBgNVBAMMEUNPUkQgVGVzdCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEAokxdd5vyy83NPQYQK/wsz6VLrunv/3FNSbUv9dC4MC5zZyMd
+oxrYCfM38rypbrB5PIVlFdndfDzoYORmlC9gxJnFUmAztyU2JIZrcxk1sQ+lBWj+
+Bytwh1TKT0OSfEWjB/LV1FGLAuspJGBn2T0E35bGhhzOL8Cgm0e8akeAfs2s9akO
+Xcj+4osnAkXynKl+HhCTBkcrmg1YsTB3+0ug0vM5xuHMU5tVVKpn9DinZ3enuHle
+ICyiMF8JyEibjGl0cjnGhw1lPzT7lsjxuoZhr3NaIlI/zUXBDTJbJ6T6gUa1Npa/
+lurbEn/9pUMQcUIOnIfzbmzVjPmd0AL9fEcAlQIDAQABo2MwYTAdBgNVHQ4EFgQU
+xYhJSu6N6DF7C39G1hAvF7JOC54wHwYDVR0jBBgwFoAUxYhJSu6N6DF7C39G1hAv
+F7JOC54wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcN
+AQELBQADggEBAJc7J+ZVhp7ti+YN2Smv/jtz79NyF1J6Eb3M/BC/A5Eo8Cp2hklC
+NI00+con2Dvvbmj6lOgKXPL6C8LgxiZ5gVDtSvK8zuoIzkIDod4IovxcwLrvlIH4
+BpG6Sm1d7EbwAHKFGc0qvVdRN48P884KnzW27eLtsdqrkUPuqz9Ph1JJmAzy3v5p
+pKtL6zfn706pcad5NuAcoz0782T+wszHmBv0SBboLdo9NyUciJBQCjIDaSEOpqze
+upzRp50aDMq3nxd7yZ3VGA52ECNQ4gWgWAHomDS22RdCHsedbUofnrl6TW88j+Aa
++4AJR9CmhoP1CnKHb5wVCBScw9T8gu3aLe0=
+-----END CERTIFICATE-----
diff --git a/src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.key b/src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.key
new file mode 100644 (file)
index 0000000..61d1b95
--- /dev/null
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA2EuSUdVkDQBJsjf7ZK7NYOVlt6IR16TI3hXQYQr29ajvaHzJ
+KRel7hRpy6m1JPy7lXNIF5ad2ooK5e7xxi8tiUGXJrTxchgeAslI2AJaNqsWP/iy
+gGJ+UXnvqd1PGILpkucxumRlQEXEF77SVTSPvodffxsrp+Xt2LnNmn8a9RSJMV61
+uRSgFAvgpIlw2LEr6nS9QQLuN/E0uXihMFu5/MJNjjnWhmpVVfvraCAGLB1azU7p
+2XC7XfmanNaNT2nUDVooXWp07J0JDeS+zQNzlNNHgyd36JGI7BVHDl7NBUucTfds
+EQK1aYY5zgP+nt4zzZMmaVlS8oBJCBWq3j7g/wIDAQABAoIBAFITk0mUZSv90Plc
+/vt8zZiYVBnz2TtwX3zO4E0C4SXlXjvTJm5+d8u5WVAcbQ3FDdWvckrpL6tvOKV6
+H6rp2ii8iAP7I6f8+N5rzUWS1vLpxz6tO+c1+OMoF0bpIQuXGdVR/+/QCw/xqXCt
+S5ljoaxWKGnOQKmsua3FC/01gGBBIRtd5Vmn6m1R7IYQP6AZjNbE8trb7Q8TO66t
+QK3h5oTv36hL7qC2a2L6WiSOOyul7f9wzn2/x6fyNW43nYV3jvf79nKuiv8ZkVjK
+qYIlmLSlXwbq7N3eI6mcP6AqyeL9OFAkh0JBoiPsCND9sZV7KpiTieh8mUelxnQr
+8qG4c7ECgYEA7HqZTjfhb04s0rihlbHJX7JOP407tOCZCI2QlNL+M29UpBgbx5z3
+jfX0hlj5Vkq/GWvMm288gpBgfKSzh29mpO21GEmWNFqsNdls+f0/DgWs0TYRe9uQ
+w4CSfNpvx3LRmh2y0b7BaoDd6X5Rma533zmyiAuDcPZdHfbl+FVZ/+cCgYEA6iZw
+kyp4hPRQXyavufXyF6Ej88k5BjtU5CqURcXKmJbP+SfDoHOH4V+erFsgeOl1TAAc
+GTXGL4/d4xLBp78U0CgLm0k78kcuKXmKQ5AWeMkn4tPAbxEuqpi2ZrfLd0gE+T/q
+mUiphmRL00qIymJQpopn1beAMsowy96L2cybUykCgYBipPmSYUkOryOPeykcUp9X
+5f8yD24ak54CrVrkWedj+UrrcIsWB2pUs4afDDpmPqPcrNUa+ZnaNPOqyuGA232L
+ywTB7uBTUoeHpv0IgxVsef2O/+jnK74Fb3qrzkrWfhTlHwJa8CGqlbr8DY9odhjW
+6zCIA5V+56YMO9POdXwnfQKBgF2wedT45nZUh6A7C48+ENtRl+AhANc0gFg3jVKJ
+vPHnTlokhgs6jwEn0Iaog8q9pzh8xsFzmdRIHYGRbLlhJMPRcit1Vy4vOxJPVnqI
+OeWkn3gMQHBwkJqkNj/NhPU6dPsCjy08PNDQauKlbSyFwD2THc8O+JXZ/0JjztOc
+If5ZAoGAAefyJ6cAs6p8QMBG0nYYtJMeW5cXwGhFMLJTW3B2qMVsDsOL2sp1T3ou
+Emn2I02ogmtmmHNxOQY3kRQ5S0PPAraoXxywjB4BaH/VNJgdEntmWI1woPI8j2qq
+8RCyi2O5T9YpO2cWRJSXGd6rNFmRQjM+FuznUpqe1BYxLT15bJw=
+-----END RSA PRIVATE KEY-----
diff --git a/src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.pem b/src/seba_charts/cord-platform/charts/xos-core/pki/xos-core.pem
new file mode 100644 (file)
index 0000000..92c26f2
--- /dev/null
@@ -0,0 +1,93 @@
+Certificate:
+    Data:
+        Version: 3 (0x2)
+        Serial Number: 4096 (0x1000)
+    Signature Algorithm: sha256WithRSAEncryption
+        Issuer: C=US, ST=California, L=Menlo Park, O=ONF, OU=Testing Only, CN=CORD Test Root CA
+        Validity
+            Not Before: Dec 14 18:25:19 2018 GMT
+            Not After : Dec 15 18:25:19 2019 GMT
+        Subject: C=US, ST=California, L=Menlo Park, O=ONF, OU=Testing Only, CN=xos-core
+        Subject Public Key Info:
+            Public Key Algorithm: rsaEncryption
+                Public-Key: (2048 bit)
+                Modulus:
+                    00:d8:4b:92:51:d5:64:0d:00:49:b2:37:fb:64:ae:
+                    cd:60:e5:65:b7:a2:11:d7:a4:c8:de:15:d0:61:0a:
+                    f6:f5:a8:ef:68:7c:c9:29:17:a5:ee:14:69:cb:a9:
+                    b5:24:fc:bb:95:73:48:17:96:9d:da:8a:0a:e5:ee:
+                    f1:c6:2f:2d:89:41:97:26:b4:f1:72:18:1e:02:c9:
+                    48:d8:02:5a:36:ab:16:3f:f8:b2:80:62:7e:51:79:
+                    ef:a9:dd:4f:18:82:e9:92:e7:31:ba:64:65:40:45:
+                    c4:17:be:d2:55:34:8f:be:87:5f:7f:1b:2b:a7:e5:
+                    ed:d8:b9:cd:9a:7f:1a:f5:14:89:31:5e:b5:b9:14:
+                    a0:14:0b:e0:a4:89:70:d8:b1:2b:ea:74:bd:41:02:
+                    ee:37:f1:34:b9:78:a1:30:5b:b9:fc:c2:4d:8e:39:
+                    d6:86:6a:55:55:fb:eb:68:20:06:2c:1d:5a:cd:4e:
+                    e9:d9:70:bb:5d:f9:9a:9c:d6:8d:4f:69:d4:0d:5a:
+                    28:5d:6a:74:ec:9d:09:0d:e4:be:cd:03:73:94:d3:
+                    47:83:27:77:e8:91:88:ec:15:47:0e:5e:cd:05:4b:
+                    9c:4d:f7:6c:11:02:b5:69:86:39:ce:03:fe:9e:de:
+                    33:cd:93:26:69:59:52:f2:80:49:08:15:aa:de:3e:
+                    e0:ff
+                Exponent: 65537 (0x10001)
+        X509v3 extensions:
+            X509v3 Subject Key Identifier: 
+                30:AC:5D:59:D7:FD:7D:47:BB:F1:EF:2F:22:2B:4B:D6:8E:66:54:69
+            X509v3 Authority Key Identifier: 
+                keyid:C5:88:49:4A:EE:8D:E8:31:7B:0B:7F:46:D6:10:2F:17:B2:4E:0B:9E
+                DirName:/C=US/ST=California/L=Menlo Park/O=ONF/OU=Testing Only/CN=CORD Test Root CA
+                serial:85:A6:C0:B2:FB:9E:E9:55
+
+            X509v3 Basic Constraints: 
+                CA:FALSE
+            X509v3 Key Usage: critical
+                Digital Signature, Key Encipherment
+            X509v3 Extended Key Usage: 
+                TLS Web Server Authentication
+            X509v3 Subject Alternative Name: 
+                DNS:xos-core, DNS:xos-core.default, DNS:xos-core.default.svc.cluster.local
+    Signature Algorithm: sha256WithRSAEncryption
+         15:cd:7b:ba:21:f0:79:30:8a:be:b9:04:d1:39:d8:ad:de:0f:
+         44:eb:64:39:dc:79:7e:57:b7:29:36:a1:dc:66:7b:38:6d:55:
+         89:98:d8:3a:eb:cb:8a:08:46:81:69:6a:95:b7:24:02:b1:55:
+         3a:cf:0a:18:d5:15:92:77:7d:01:c4:f3:72:65:d9:1a:ef:1c:
+         dd:87:ab:eb:a3:1b:2e:a3:2c:e8:d9:7f:a9:a7:49:47:83:84:
+         99:f7:ea:10:48:6b:3a:4b:be:c4:08:d3:ac:3f:b8:a7:a7:b6:
+         d6:74:d1:ad:c6:b1:75:42:d8:2b:5e:ee:ed:30:39:0f:f1:2d:
+         30:24:1d:3d:46:4b:4b:db:d2:3c:d4:d2:68:ff:d9:29:1e:b4:
+         8b:06:e4:c9:02:bd:23:02:36:1f:8d:1e:1e:8f:16:19:e4:17:
+         34:8c:e1:a7:a6:25:0b:e8:b0:bd:f7:51:b8:1b:6f:fd:6a:3d:
+         6b:09:9d:05:18:ac:77:02:62:bb:91:5a:15:79:d9:11:22:8a:
+         e9:b7:c3:b4:83:ab:5b:71:25:df:d0:e1:6a:ad:43:dc:5d:cb:
+         f5:5d:49:2b:53:25:8b:64:f8:33:44:df:d2:44:ec:03:72:32:
+         da:77:75:cf:67:83:be:3c:6e:75:72:2f:f3:31:39:7f:e3:60:
+         cb:0e:57:f8
+-----BEGIN CERTIFICATE-----
+MIIEsDCCA5igAwIBAgICEAAwDQYJKoZIhvcNAQELBQAweDELMAkGA1UEBhMCVVMx
+EzARBgNVBAgMCkNhbGlmb3JuaWExEzARBgNVBAcMCk1lbmxvIFBhcmsxDDAKBgNV
+BAoMA09ORjEVMBMGA1UECwwMVGVzdGluZyBPbmx5MRowGAYDVQQDDBFDT1JEIFRl
+c3QgUm9vdCBDQTAeFw0xODEyMTQxODI1MTlaFw0xOTEyMTUxODI1MTlaMG8xCzAJ
+BgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQHDApNZW5sbyBQ
+YXJrMQwwCgYDVQQKDANPTkYxFTATBgNVBAsMDFRlc3RpbmcgT25seTERMA8GA1UE
+AwwIeG9zLWNvcmUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDYS5JR
+1WQNAEmyN/tkrs1g5WW3ohHXpMjeFdBhCvb1qO9ofMkpF6XuFGnLqbUk/LuVc0gX
+lp3aigrl7vHGLy2JQZcmtPFyGB4CyUjYAlo2qxY/+LKAYn5Ree+p3U8YgumS5zG6
+ZGVARcQXvtJVNI++h19/Gyun5e3Yuc2afxr1FIkxXrW5FKAUC+CkiXDYsSvqdL1B
+Au438TS5eKEwW7n8wk2OOdaGalVV++toIAYsHVrNTunZcLtd+Zqc1o1PadQNWihd
+anTsnQkN5L7NA3OU00eDJ3fokYjsFUcOXs0FS5xN92wRArVphjnOA/6e3jPNkyZp
+WVLygEkIFarePuD/AgMBAAGjggFLMIIBRzAdBgNVHQ4EFgQUMKxdWdf9fUe78e8v
+IitL1o5mVGkwgaoGA1UdIwSBojCBn4AUxYhJSu6N6DF7C39G1hAvF7JOC56hfKR6
+MHgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRMwEQYDVQQHDApN
+ZW5sbyBQYXJrMQwwCgYDVQQKDANPTkYxFTATBgNVBAsMDFRlc3RpbmcgT25seTEa
+MBgGA1UEAwwRQ09SRCBUZXN0IFJvb3QgQ0GCCQCFpsCy+57pVTAJBgNVHRMEAjAA
+MA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBJBgNVHREEQjBA
+ggh4b3MtY29yZYIQeG9zLWNvcmUuZGVmYXVsdIIieG9zLWNvcmUuZGVmYXVsdC5z
+dmMuY2x1c3Rlci5sb2NhbDANBgkqhkiG9w0BAQsFAAOCAQEAFc17uiHweTCKvrkE
+0TnYrd4PROtkOdx5fle3KTah3GZ7OG1ViZjYOuvLighGgWlqlbckArFVOs8KGNUV
+knd9AcTzcmXZGu8c3Yer66MbLqMs6Nl/qadJR4OEmffqEEhrOku+xAjTrD+4p6e2
+1nTRrcaxdULYK17u7TA5D/EtMCQdPUZLS9vSPNTSaP/ZKR60iwbkyQK9IwI2H40e
+Ho8WGeQXNIzhp6YlC+iwvfdRuBtv/Wo9awmdBRisdwJiu5FaFXnZESKK6bfDtIOr
+W3El39Dhaq1D3F3L9V1JK1Mli2T4M0Tf0kTsA3Iy2nd1z2eDvjxudXIv8zE5f+Ng
+yw5X+A==
+-----END CERTIFICATE-----
diff --git a/src/seba_charts/cord-platform/charts/xos-core/requirements.lock b/src/seba_charts/cord-platform/charts/xos-core/requirements.lock
new file mode 100644 (file)
index 0000000..8e00a62
--- /dev/null
@@ -0,0 +1,9 @@
+dependencies:
+- name: xos-db
+  repository: file://../xos-db
+  version: 1.0.0
+- name: xos-gui
+  repository: file://../xos-gui
+  version: 1.2.1
+digest: sha256:2d9bc1f52feaa2af495a1e770344d5ae7a66cbf7bbc9ae3631f8d852a31bd1ce
+generated: 2018-12-19T11:26:37.24503981-07:00
diff --git a/src/seba_charts/cord-platform/charts/xos-core/requirements.yaml b/src/seba_charts/cord-platform/charts/xos-core/requirements.yaml
new file mode 100644 (file)
index 0000000..00edc4b
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# Copyright 2017-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.
+
+dependencies:
+- name: xos-db
+  version: 1.0.0
+  repository: file://../xos-db
+- name: xos-gui
+  version: 1.2.1
+  repository: file://../xos-gui
+  condition: xos-gui.enabled
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/50-rbac.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/50-rbac.yaml
new file mode 100644 (file)
index 0000000..7e983b4
--- /dev/null
@@ -0,0 +1,35 @@
+---
+# Copyright 2017-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: ServiceAccount
+metadata:
+  name: kubernetes-synchronizer
+
+...
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name: kubernetes-synchronizer-cluster-admin
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: cluster-admin
+subjects:
+  - kind: ServiceAccount
+    name: kubernetes-synchronizer
+    namespace: default
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/NOTES.txt b/src/seba_charts/cord-platform/charts/xos-core/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..cb50ff5
--- /dev/null
@@ -0,0 +1,4 @@
+Thank you for installing {{ .Chart.Name }}.
+
+Your release is named {{ .Release.Name }}.
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/_core.tpl b/src/seba_charts/cord-platform/charts/xos-core/templates/_core.tpl
new file mode 100644 (file)
index 0000000..fe59e60
--- /dev/null
@@ -0,0 +1,76 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-core.config" }}
+name: xos-core
+xos_dir: /opt/xos
+kafka_bootstrap_servers:
+  - {{ .Values.platformKafka }}
+database:
+  name: {{ .Values.xosDBName | quote }}
+  username: {{ .Values.xosDBUser | quote }}
+  password: {{ .Values.xosDBPassword | quote }}
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - {{ .Values.platformKafka }}
+      topic: xos.log.core
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: {{ .Values.loglevel }}
+{{- end }}
+
+{{- define "xos-core.initial_data" }}
+- model: core.Site
+  fields:
+    name: {{ .Values.cordSiteName | quote }}
+    abbreviated_name: {{ .Values.cordSiteName | quote }}
+    login_base: {{ .Values.cordSiteName | quote }}
+    site_url: "http://opencord.org/"
+    hosts_nodes: true
+
+- model: core.User
+  fields:
+    email: {{ .Values.xosAdminUser | quote }}
+    password: {{ .Values.xosAdminPassword | quote }}
+    firstname: {{ .Values.xosAdminFirstname | quote }}
+    lastname:  {{ .Values.xosAdminLastname | quote }}
+    is_admin: true
+  relations:
+    site:
+      fields:
+        name: {{ .Values.cordSiteName | quote }}
+      model: core.Site
+{{- end }}
+
+{{- define "xos-core.ca_cert_chain" }}
+{{ (.Files.Get "pki/xos-CA.pem")}}
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/_helpers.tpl b/src/seba_charts/cord-platform/charts/xos-core/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..f55e3be
--- /dev/null
@@ -0,0 +1,24 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-core.release_labels" }}
+app: {{ printf "%s-%s" .Release.Name .Chart.Name | trunc 63 }}
+chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+release: {{ .Release.Name }}
+heritage: {{ .Release.Service }}
+version: {{ .Chart.Version }}
+{{- end }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/_tosca.tpl b/src/seba_charts/cord-platform/charts/xos-core/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..98e7d13
--- /dev/null
@@ -0,0 +1,43 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "xos-tosca.config" }}
+name: xos-tosca
+gprc_endpoint: "xos-core"
+local_cert: /usr/local/share/ca-certificates/local_certs.crt
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - {{ .Values.platformKafka }}
+      topic: xos.log.tosca
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-deployment.yaml
new file mode 100644 (file)
index 0000000..a715a98
--- /dev/null
@@ -0,0 +1,37 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-chameleon
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-chameleon
+    spec:
+      containers:
+        - name: xos-chameleon
+          image: {{ .Values.global.registry }}{{ .Values.images.xos_chameleon.repository }}:{{ tpl .Values.images.xos_chameleon.tag . }}
+          imagePullPolicy: {{ .Values.images.xos_chameleon.pullPolicy }}
+          command: ["python", "chameleon/chameleon/main.py", "-R", "9101", "-G", "xos-core:50055", "--swagger-url", "/apidocs", "-r"]
+          ports:
+            - containerPort: 9101
+              port: 9101
+              protocol: TCP
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/chameleon-service.yaml
new file mode 100644 (file)
index 0000000..97e78c4
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-chameleon"
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: 9101
+      targetPort: 9101
+      nodePort: {{ .Values.xos_chameleonNodePort }}
+      protocol: TCP
+  selector:
+    app: "xos-chameleon"
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/core-configmap.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/core-configmap.yaml
new file mode 100644 (file)
index 0000000..b9d1e7d
--- /dev/null
@@ -0,0 +1,51 @@
+---
+# Copyright 2017-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: xos-core
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-core.config" . | indent 4 }}
+
+...
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: xos-initial-data
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-core.initial_data" . | indent 4 }}
+
+...
+---
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: ca-certificates
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+data:
+  chain: |
+{{ include "xos-core.ca_cert_chain" . | indent 4 }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/core-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/core-deployment.yaml
new file mode 100644 (file)
index 0000000..a785392
--- /dev/null
@@ -0,0 +1,81 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-core
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-core
+    spec:
+      containers:
+        - name: xos-core
+          image: {{ .Values.global.registry }}{{ .Values.images.xos_core.repository }}:{{ tpl .Values.images.xos_core.tag . }}
+          imagePullPolicy: {{ .Values.images.xos_core.pullPolicy }}
+          command: ["/bin/bash", "-c", "cd coreapi; ./start_coreapi.sh"]
+          ports:
+            - containerPort: 50051
+              port: 50051
+              protocol: TCP
+            - containerPort: 50055
+              port: 50055
+              protocol: TCP
+          volumeMounts:
+            - name: coreapi-volume
+              mountPath: /opt/cord_profile
+              readOnly: true
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+            - name: xos-core-config
+              mountPath: /opt/xos/xos_config.yaml
+              subPath: config/xos_config.yaml
+            - name: initial-data-config
+              mountPath: /opt/xos/core/migrations/initial_data.yaml
+              subPath: migrations/initial_data.yaml
+      volumes:
+        - name: coreapi-volume
+          secret:
+            secretName: coreapi-cert-secret
+            items:
+              - key: tls.crt
+                path: core_api_cert.pem
+              - key: tls.key
+                path: core_api_key.pem
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+        - name: xos-core-config
+          configMap:
+            name: xos-core
+            items:
+              - key: config
+                path: config/xos_config.yaml
+        - name: initial-data-config
+          configMap:
+            name: xos-initial-data
+            items:
+              - key: config
+                path: migrations/initial_data.yaml
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/core-grpc-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/core-grpc-service.yaml
new file mode 100644 (file)
index 0000000..3d7e8dc
--- /dev/null
@@ -0,0 +1,37 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-core"
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  selector:
+    app: "xos-core"
+  ports:
+    - port: 50051
+      targetPort: 50051
+      name: secure
+      nodePort: {{ .Values.xos_core_gRPCSecureNodePort }}
+      protocol: TCP
+    - port: 50055
+      targetPort: 50055
+      name: insecure
+      nodePort: {{ .Values.xos_core_gRPCInsecureNodePort }}
+      protocol: TCP
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/core-prometheus-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/core-prometheus-service.yaml
new file mode 100644 (file)
index 0000000..5d3e57f
--- /dev/null
@@ -0,0 +1,31 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-core-prometheus"
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  selector:
+    app: "xos-core"
+  ports:
+    - port: 8000
+      targetPort: 8000
+      name: prometheus
+      nodePort: {{ .Values.xos_prometheusNodePort }}
+      protocol: TCP
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/core-secrets.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/core-secrets.yaml
new file mode 100644 (file)
index 0000000..9d5a7c5
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# Copyright 2017-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: Secret
+metadata:
+  name: xos-admin-passwd-secret
+  namespace: default
+type: Opaque
+data:
+  password: {{ .Values.xosAdminPassword | b64enc }}
+
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/coreapi-cert-secret.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/coreapi-cert-secret.yaml
new file mode 100644 (file)
index 0000000..b70cba6
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# Copyright 2017-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: Secret
+metadata:
+  name: coreapi-cert-secret
+  namespace: default
+type: kubernetes.io/tls
+data:
+  tls.crt: {{ .Files.Get "pki/xos-core.pem" | b64enc }}
+  tls.key: {{ .Files.Get "pki/xos-core.key" | b64enc }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/tests/test-xos-core-api.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/tests/test-xos-core-api.yaml
new file mode 100644 (file)
index 0000000..1162de0
--- /dev/null
@@ -0,0 +1,52 @@
+---
+# Copyright 2017-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: Pod
+metadata:
+  name: "{{ .Release.Name }}-api-test"
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+  annotations:
+    "helm.sh/hook": test-success
+spec:
+  restartPolicy: Never
+  containers:
+    - name: {{ .Release.Name }}-api-test
+      image: {{ .Values.global.registry }}{{ .Values.images.xos_api_tester.repository }}:{{ tpl .Values.images.xos_api_tester.tag . }}
+      imagePullPolicy: {{ .Values.images.xos_api_tester.pullPolicy }}
+      volumeMounts:
+        - name: log-volume
+          mountPath: /src/cord-api/Tests/Log/
+      env:
+        - name: SERVER_IP
+          value: 'xos-chameleon'
+        - name: SERVER_PORT
+          value: '9101'
+        - name: SITE_NAME
+          value: {{ .Values.cordSiteName | quote }}
+        - name: XOS_USER
+          value: {{ .Values.xosAdminUser | quote }}
+        - name: XOS_PASSWD
+          valueFrom:
+            secretKeyRef:
+              name: xos-admin-passwd-secret
+              key: password
+      command: ["pybot", "-L", "TRACE", "-d", "Log", "-T", "Ch_DeploymentTest.txt", "Ch_SiteTest.txt", "Ch_UsersTest.txt", "Ch_SliceTest.txt", "Ch_ServiceTest.txt"]
+  volumes:
+    - name: log-volume
+      hostPath:
+        path: /tmp/helm_test_xos_core_logs_{{ dateInZone "20060102T030405.00Z" (now) "UTC"  }}
+        type: DirectoryOrCreate
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-configmap.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-configmap.yaml
new file mode 100644 (file)
index 0000000..6269be3
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# Copyright 2017-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: xos-tosca
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+data:
+  config: |
+{{ include "xos-tosca.config" . | indent 4 }}
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-deployment.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-deployment.yaml
new file mode 100644 (file)
index 0000000..c6f8376
--- /dev/null
@@ -0,0 +1,56 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: xos-tosca
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: xos-tosca
+    spec:
+      containers:
+        - name: xos-tosca
+          image: {{ .Values.global.registry }}{{ .Values.images.xos_tosca.repository }}:{{ tpl .Values.images.xos_tosca.tag . }}
+          imagePullPolicy: {{ .Values.images.xos_tosca.pullPolicy }}
+          ports:
+            - containerPort: 9102
+              port: 9102
+              protocol: TCP
+          volumeMounts:
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+            - name: xos-tosca-config
+              mountPath: /opt/xos-tosca/src/xos-tosca.config.yaml
+              subPath: config/xos-tosca.config.yaml
+      volumes:
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+        - name: xos-tosca-config
+          configMap:
+            name: xos-tosca
+            items:
+              - key: config
+                path: config/xos-tosca.config.yaml
diff --git a/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-service.yaml b/src/seba_charts/cord-platform/charts/xos-core/templates/tosca-service.yaml
new file mode 100644 (file)
index 0000000..4c70119
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: "xos-tosca"
+  labels:
+    {{- include "xos-core.release_labels" . | indent 4 }}
+spec:
+  type: NodePort
+  ports:
+    - port: 9102
+      targetPort: 9102
+      nodePort: {{ .Values.xos_toscaNodePort }}
+      protocol: TCP
+  selector:
+    app: "xos-tosca"
diff --git a/src/seba_charts/cord-platform/charts/xos-core/values.yaml b/src/seba_charts/cord-platform/charts/xos-core/values.yaml
new file mode 100644 (file)
index 0000000..61a2d27
--- /dev/null
@@ -0,0 +1,81 @@
+---
+# Copyright 2017-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.
+
+# Docker images
+# YAML variable names can't contain `-`, so substituted with `_`
+images:
+  xos_core:
+    repository: 'cachengo/xos-core'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  xos_chameleon:
+    repository: 'cachengo/chameleon'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  xos_tosca:
+    repository: 'cachengo/xos-tosca'
+    tag: '1.1.6'
+    pullPolicy: 'Always'
+
+  xos_api_tester:
+    repository: 'cachengo/xos-api-tester'
+    tag: '2.0.6-dev'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+loglevel: "DEBUG"
+
+# NodePorts
+xos_chameleonNodePort: 30006
+xos_toscaNodePort: 30007
+xos_prometheusNodePort: 30009
+xos_core_gRPCSecureNodePort: 30010
+xos_core_gRPCInsecureNodePort: 30011
+
+# kafka
+platformKafka: cord-kafka:9092
+
+# XOS Admin username/password
+xosAdminUser: 'admin@opencord.org'
+xosAdminPassword: 'letmein'
+xosAdminFirstname: 'XOS'
+xosAdminLastname: 'Admin'
+
+# CORD site names
+cordSiteName: mysite
+
+# Database name/username/password for XOS and the xos-db subchart
+xosDBName: 'xos'
+xosDBUser: 'postgres'
+xosDBPassword: 'password'
+
+xos-db:
+  xosDBName: 'xos'
+  xosDBUser: 'postgres'
+  xosDBPassword: 'password'
+
+# Certificates can be regenerated with scripts/pki/Makefile
+# Created on: Fri Dec 14 16:46:00 UTC 2018, good for 366 days
+ca_cert_chain: |
+  LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUQxakNDQXI2Z0F3SUJBZ0lKQUpsNGd5bGtZUi9zTUEwR0NTcUdTSWIzRFFFQkN3VUFNSGd4Q3pBSkJnTlYKQkFZVEFsVlRNUk13RVFZRFZRUUlEQXBEWVd4cFptOXlibWxoTVJNd0VRWURWUVFIREFwTlpXNXNieUJRWVhKcgpNUXd3Q2dZRFZRUUtEQU5QVGtZeEZUQVRCZ05WQkFzTURGUmxjM1JwYm1jZ1QyNXNlVEVhTUJnR0ExVUVBd3dSClEwOVNSQ0JVWlhOMElGSnZiM1FnUTBFd0hoY05NVGd4TWpFME1UWTBOakF3V2hjTk1Ua3hNakUxTVRZME5qQXcKV2pCNE1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQXdLUTJGc2FXWnZjbTVwWVRFVE1CRUdBMVVFQnd3SwpUV1Z1Ykc4Z1VHRnlhekVNTUFvR0ExVUVDZ3dEVDA1R01SVXdFd1lEVlFRTERBeFVaWE4wYVc1bklFOXViSGt4CkdqQVlCZ05WQkFNTUVVTlBVa1FnVkdWemRDQlNiMjkwSUVOQk1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0MKQVE4QU1JSUJDZ0tDQVFFQXlmdXJic3lHNC9NL1o1Y0x1a1drNU84ZjVTemxQY21md20rek11NTFtRlloU05hTgpiRkFic0FReFZqallvbTB1TEUxdjZsTlZuWGkxVzQySG9tM0c3ZFgyb1NEZ0loUXloS29jRkh0WlNGS0o0RWF1CmJsUXhXUzFaQ1VZSFpINUdMVmMxWUNMUHhUbFdndnlGSnVZUk9LZElaWXloT1ZORHY2RHlIN1cwQmsva1M5MEEKamhkZ3h3U0dJcldsS2FveGhjSG01R0ErenZiRnBOYUx1T201aFNDWHlpRnVSdHd1bXV5YlJMalNyUC9jUjF3OAorZjMvejkvQlZXTEdZMVBTN1RvSENUTk5veHNXUVNHQ1piVUlzUVpiSXhDSXNPVUJkbGxDWkRmYnErSUROaXErCnI3dTByVC9Tamh5WVdCcmkrcFNzc0lGdWNwcmhvOHJnZVJyMVpRSURBUUFCbzJNd1lUQWRCZ05WSFE0RUZnUVUKRlNrQmxkdXF5R0hibGhJMUdHV0NEV1NPNXRvd0h3WURWUjBqQkJnd0ZvQVVGU2tCbGR1cXlHSGJsaEkxR0dXQwpEV1NPNXRvd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBT0JnTlZIUThCQWY4RUJBTUNBWVl3RFFZSktvWklodmNOCkFRRUxCUUFEZ2dFQkFEazNCbVNmbUFpQ3dCZENRRHNodTViZWpQWStnckxNanROdkcxSXNqMUtRZHlpMmF6SGQKYUN0TW5LODdDbmJubDNlNzErcEx4aFJablcwQkFFeUxMNG9NOFYvR1kvcG9SSG45cWV1bGJtRTNqWkF2bTE0VAp5YUJhQXpzYTNDOTBUZkZEZG1WU1lPTWFocEM3Q2IvN01TZldkWFBXL3lLdkpZYzZCdUVvcVNUNE5ZeVBSVmNuCmdwUXp3dU9CMEN6dGMySHU2MDRFNTRRT05GOVl2aW5WYU9zVmFvQTJRQzJTemZtSlUzTWtnWm5HMTAvd0hlZEYKWk4wbUthSk1mMHpwWHI2MU5pOTVZc2pONmJnaVY1aExwZDBYUXBVTXpXVzRFZ0xEbjZyeFNjejcwRWh6SW1aRwpVbG40T20ybnMxSXR4NDE3RGtXbUp1cGRIY1U1d0w4MkZ4Yz0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
+secrets:
+  core_api_cert: |
+    Q2VydGlmaWNhdGU6CiAgICBEYXRhOgogICAgICAgIFZlcnNpb246IDMgKDB4MikKICAgICAgICBTZXJpYWwgTnVtYmVyOiA0MDk2ICgweDEwMDApCiAgICBTaWduYXR1cmUgQWxnb3JpdGhtOiBzaGEyNTZXaXRoUlNBRW5jcnlwdGlvbgogICAgICAgIElzc3VlcjogQz1VUywgU1Q9Q2FsaWZvcm5pYSwgTD1NZW5sbyBQYXJrLCBPPU9ORiwgT1U9VGVzdGluZyBPbmx5LCBDTj1DT1JEIFRlc3QgUm9vdCBDQQogICAgICAgIFZhbGlkaXR5CiAgICAgICAgICAgIE5vdCBCZWZvcmU6IERlYyAxNCAxNjo0NjowMCAyMDE4IEdNVAogICAgICAgICAgICBOb3QgQWZ0ZXIgOiBEZWMgMTUgMTY6NDY6MDAgMjAxOSBHTVQKICAgICAgICBTdWJqZWN0OiBDPVVTLCBTVD1DYWxpZm9ybmlhLCBMPU1lbmxvIFBhcmssIE89T05GLCBPVT1UZXN0aW5nIE9ubHksIENOPXhvcy1jb3JlCiAgICAgICAgU3ViamVjdCBQdWJsaWMgS2V5IEluZm86CiAgICAgICAgICAgIFB1YmxpYyBLZXkgQWxnb3JpdGhtOiByc2FFbmNyeXB0aW9uCiAgICAgICAgICAgICAgICBQdWJsaWMtS2V5OiAoMjA0OCBiaXQpCiAgICAgICAgICAgICAgICBNb2R1bHVzOgogICAgICAgICAgICAgICAgICAgIDAwOmFmOjFiOmRlOjZmOmQ2OjE0OjMyOmQwOjI2OjEzOmM2OjhlOmQ0OjRhOgogICAgICAgICAgICAgICAgICAgIDMzOmNjOjdjOmJhOmVkOmE0Ojg0OjNhOjRiOmJjOmZkOmNiOjFkOjkxOjQzOgogICAgICAgICAgICAgICAgICAgIGUzOmFjOmZiOjBmOjVjOjM5OmI5OjhlOmEzOjU1OjgxOjhhOjUzOjJhOjUxOgogICAgICAgICAgICAgICAgICAgIDE2OjQ2OjIzOmMwOjFmOjIwOmE3OjkxOjY1OmY1OjZjOjM2OmM1OjY0OjhmOgogICAgICAgICAgICAgICAgICAgIGRlOjE0OjMwOjg1OjMzOmM3OjY1OjliOjZkOmE1Ojg2OjU2OjdjOjk0OmZhOgogICAgICAgICAgICAgICAgICAgIGNkOjNkOjIxOjBmOjYwOjBlOjRhOjhjOjdkOmNkOjhkOjQ4OmI0OmRmOjM2OgogICAgICAgICAgICAgICAgICAgIGIyOjgyOjE4Ojg0OjNmOjU3OjQxOmY3OjM0OjA2OjI1OmQwOmI2OjUzOjVhOgogICAgICAgICAgICAgICAgICAgIDgwOmMwOjJhOmZkOmVhOmYyOmM2OmJhOmRmOjc3OjdhOjlhOjIzOjEwOmU3OgogICAgICAgICAgICAgICAgICAgIDlkOjRjOmQ5OmM3OjIxOjBkOjhjOjk4OmJhOmI5OmIyOjQzOmI2OmEwOjRjOgogICAgICAgICAgICAgICAgICAgIDQyOjYyOmZiOjNlOmZkOmY4OjcxOmY4OmUxOjY5OjFhOjk1OjY2OmVkOjQxOgogICAgICAgICAgICAgICAgICAgIGIyOjYyOmVmOjJmOmFkOjA2OjJkOmIwOjQ4OmM2OmJkOmViOmQ2OjlmOmZlOgogICAgICAgICAgICAgICAgICAgIGFjOjEyOmUyOjU4OmQzOmFhOmQyOjdkOjU0OmRlOjc1OjkyOmVhOjllOjFhOgogICAgICAgICAgICAgICAgICAgIDk3OjdiOjAzOjY4OjJjOjEyOjA1OmI1OmQ5OmE1OjMwOmRkOjhhOjk5OmI0OgogICAgICAgICAgICAgICAgICAgIDhkOmE3OjcyOjEwOmYzOmQ5OjljOjg2OmRkOjA5OmI2OmQwOjgyOjQyOjMwOgogICAgICAgICAgICAgICAgICAgIDZkOmNiOmQzOjZhOmI5OjMzOmM2OjM5OmFiOmNhOjhmOmJhOjM0OjJiOmZiOgogICAgICAgICAgICAgICAgICAgIDM2OjQ2Ojc0OmVlOjMwOmVlOjhhOmE4OjJlOjJjOjVmOmM4OjhlOmM5OjkzOgogICAgICAgICAgICAgICAgICAgIGIyOjMwOjJlOmIwOjI2OjQ3Ojg4OjBjOmE5OjE0OjBjOjc4OjAyOjY3OjBjOgogICAgICAgICAgICAgICAgICAgIGFkOmFiCiAgICAgICAgICAgICAgICBFeHBvbmVudDogNjU1MzcgKDB4MTAwMDEpCiAgICAgICAgWDUwOXYzIGV4dGVuc2lvbnM6CiAgICAgICAgICAgIFg1MDl2MyBTdWJqZWN0IEtleSBJZGVudGlmaWVyOiAKICAgICAgICAgICAgICAgIDkyOjZEOkMwOkU5OjNFOjk5OkNEOkE1OkE0OkM5Ojk1OkIwOkE0OjE1OjE4OkI3OkNBOjFGOkIxOjg3CiAgICAgICAgICAgIFg1MDl2MyBBdXRob3JpdHkgS2V5IElkZW50aWZpZXI6IAogICAgICAgICAgICAgICAga2V5aWQ6MTU6Mjk6MDE6OTU6REI6QUE6Qzg6NjE6REI6OTY6MTI6MzU6MTg6NjU6ODI6MEQ6NjQ6OEU6RTY6REEKICAgICAgICAgICAgICAgIERpck5hbWU6L0M9VVMvU1Q9Q2FsaWZvcm5pYS9MPU1lbmxvIFBhcmsvTz1PTkYvT1U9VGVzdGluZyBPbmx5L0NOPUNPUkQgVGVzdCBSb290IENBCiAgICAgICAgICAgICAgICBzZXJpYWw6OTk6Nzg6ODM6Mjk6NjQ6NjE6MUY6RUMKCiAgICAgICAgICAgIFg1MDl2MyBCYXNpYyBDb25zdHJhaW50czogCiAgICAgICAgICAgICAgICBDQTpGQUxTRQogICAgICAgICAgICBYNTA5djMgS2V5IFVzYWdlOiBjcml0aWNhbAogICAgICAgICAgICAgICAgRGlnaXRhbCBTaWduYXR1cmUsIEtleSBFbmNpcGhlcm1lbnQKICAgICAgICAgICAgWDUwOXYzIEV4dGVuZGVkIEtleSBVc2FnZTogCiAgICAgICAgICAgICAgICBUTFMgV2ViIFNlcnZlciBBdXRoZW50aWNhdGlvbgogICAgICAgICAgICBYNTA5djMgU3ViamVjdCBBbHRlcm5hdGl2ZSBOYW1lOiAKICAgICAgICAgICAgICAgIEROUzp4b3MtY29yZSwgRE5TOnhvcy1jb3JlLmRlZmF1bHQsIEROUzp4b3MtY29yZS5kZWZhdWx0LnN2Yy5jbHVzdGVyLmxvY2FsCiAgICBTaWduYXR1cmUgQWxnb3JpdGhtOiBzaGEyNTZXaXRoUlNBRW5jcnlwdGlvbgogICAgICAgICBhNTo0MzpmNToyMzozNjpjNDo5MjozMDpiZjowMToxZTphYjo2MTphZDpmZTpiNDo2Yjo5ZjoKICAgICAgICAgODg6YmI6Y2Y6YWU6ZTE6OGE6NTI6MDQ6ODI6NzI6MWM6M2M6ZWI6Mjk6YTU6NTY6NzA6YzI6CiAgICAgICAgIDk3OjEzOjY5OjM1OjVlOmZiOjRlOmMyOmUzOmI2OjQ1OmJhOjEwOjdiOmUxOjRjOmU2OjkwOgogICAgICAgICA1ZTo0MjoyODo3YjpjNDowMzoxNTo3Mjo1MDowMTo3Yjo3NzpjYzo1NDo1Zjo0Yzo4NDpmZjoKICAgICAgICAgY2M6NjM6YzA6ODM6YTc6YTc6YmU6YmU6YTI6N2U6YjE6ZmU6ZmI6OWY6YWY6ZjU6NDQ6YmE6CiAgICAgICAgIDBjOjczOmJlOjYyOmFlOmFiOmZiOmFmOjJjOjAyOmRjOjFmOjc5OjMzOmFlOmMzOjUzOmE0OgogICAgICAgICBkNDo3YTplYzplMzozYjowMTo3Mjo5YTo1ZTo4NzowZjpiNDo2Yjo0Mjo0ODo4ZjpiYTozZjoKICAgICAgICAgZDc6Nzk6YzE6OTk6MTA6NTM6MmY6ODU6MzY6OTY6NmI6NWI6MWY6ZTg6OTE6NTQ6ZDA6ZWM6CiAgICAgICAgIDdmOjk0OmM3Ojg4OjVlOmZmOjBiOjYzOjIzOmJkOmY2OjA3OjhlOmY4OmQ5OjhkOmUxOmIyOgogICAgICAgICBiNzowYzoxNzpkNDo0ZTpmNDpmZjo3ZDpiZDpiMTowNToxODo0MDplZDo2NTpmMTpkZTpmYzoKICAgICAgICAgNzU6OWU6Mjk6YWQ6YTk6NzE6ZWY6NjQ6NTI6Yzg6NWM6ODE6MmQ6NDM6M2Q6Mzk6Yzg6OTI6CiAgICAgICAgIGZlOjMwOmJlOmM1OjIxOmY5OmJlOmNhOmQ0OmFhOjI2Ojk5OmEwOjdjOmNhOmVjOjQzOmI1OgogICAgICAgICAyYjo0YzphMTowMjpjMzo4NzpiYzozNTphYzpkODpiZjplMzo5MDo4Mjo0Mzo5NDphZTplZDoKICAgICAgICAgM2I6MDM6ZWI6NjY6ODk6ZGI6ZDM6MTk6ZTA6NmE6YjA6Njc6MTQ6Zjk6NDQ6NjQ6ODk6MTQ6CiAgICAgICAgIGI1OmZjOmVkOjY0Ci0tLS0tQkVHSU4gQ0VSVElGSUNBVEUtLS0tLQpNSUlFc0RDQ0E1aWdBd0lCQWdJQ0VBQXdEUVlKS29aSWh2Y05BUUVMQlFBd2VERUxNQWtHQTFVRUJoTUNWVk14CkV6QVJCZ05WQkFnTUNrTmhiR2xtYjNKdWFXRXhFekFSQmdOVkJBY01DazFsYm14dklGQmhjbXN4RERBS0JnTlYKQkFvTUEwOU9SakVWTUJNR0ExVUVDd3dNVkdWemRHbHVaeUJQYm14NU1Sb3dHQVlEVlFRRERCRkRUMUpFSUZSbApjM1FnVW05dmRDQkRRVEFlRncweE9ERXlNVFF4TmpRMk1EQmFGdzB4T1RFeU1UVXhOalEyTURCYU1HOHhDekFKCkJnTlZCQVlUQWxWVE1STXdFUVlEVlFRSURBcERZV3hwWm05eWJtbGhNUk13RVFZRFZRUUhEQXBOWlc1c2J5QlEKWVhKck1Rd3dDZ1lEVlFRS0RBTlBUa1l4RlRBVEJnTlZCQXNNREZSbGMzUnBibWNnVDI1c2VURVJNQThHQTFVRQpBd3dJZUc5ekxXTnZjbVV3Z2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJQkR3QXdnZ0VLQW9JQkFRQ3ZHOTV2CjFoUXkwQ1lUeG83VVNqUE1mTHJ0cElRNlM3ejl5eDJSUStPcyt3OWNPYm1PbzFXQmlsTXFVUlpHSThBZklLZVIKWmZWc05zVmtqOTRVTUlVengyV2JiYVdHVm55VStzMDlJUTlnRGtxTWZjMk5TTFRmTnJLQ0dJUS9WMEgzTkFZbAowTFpUV29EQUt2M3E4c2E2MzNkNm1pTVE1NTFNMmNjaERZeVl1cm15UTdhZ1RFSmkrejc5K0hINDRXa2FsV2J0ClFiSmk3eSt0Qmkyd1NNYTk2OWFmL3F3UzRsalRxdEo5Vk41MWt1cWVHcGQ3QTJnc0VnVzEyYVV3M1lxWnRJMm4KY2hEejJaeUczUW0yMElKQ01HM0wwMnE1TThZNXE4cVB1alFyK3paR2RPNHc3b3FvTGl4ZnlJN0prN0l3THJBbQpSNGdNcVJRTWVBSm5ESzJyQWdNQkFBR2pnZ0ZMTUlJQlJ6QWRCZ05WSFE0RUZnUVVrbTNBNlQ2WnphV2t5Wld3CnBCVVl0OG9mc1ljd2dhb0dBMVVkSXdTQm9qQ0JuNEFVRlNrQmxkdXF5R0hibGhJMUdHV0NEV1NPNXRxaGZLUjYKTUhneEN6QUpCZ05WQkFZVEFsVlRNUk13RVFZRFZRUUlEQXBEWVd4cFptOXlibWxoTVJNd0VRWURWUVFIREFwTgpaVzVzYnlCUVlYSnJNUXd3Q2dZRFZRUUtEQU5QVGtZeEZUQVRCZ05WQkFzTURGUmxjM1JwYm1jZ1QyNXNlVEVhCk1CZ0dBMVVFQXd3UlEwOVNSQ0JVWlhOMElGSnZiM1FnUTBHQ0NRQ1plSU1wWkdFZjdEQUpCZ05WSFJNRUFqQUEKTUE0R0ExVWREd0VCL3dRRUF3SUZvREFUQmdOVkhTVUVEREFLQmdnckJnRUZCUWNEQVRCSkJnTlZIUkVFUWpCQQpnZ2g0YjNNdFkyOXlaWUlRZUc5ekxXTnZjbVV1WkdWbVlYVnNkSUlpZUc5ekxXTnZjbVV1WkdWbVlYVnNkQzV6CmRtTXVZMngxYzNSbGNpNXNiMk5oYkRBTkJna3Foa2lHOXcwQkFRc0ZBQU9DQVFFQXBVUDFJemJFa2pDL0FSNnIKWWEzK3RHdWZpTHZQcnVHS1VnU0NjaHc4NnltbFZuRENseE5wTlY3N1RzTGp0a1c2RUh2aFRPYVFYa0lvZThRRApGWEpRQVh0M3pGUmZUSVQvekdQQWc2ZW52cjZpZnJIKys1K3Y5VVM2REhPK1lxNnIrNjhzQXR3ZmVUT3V3MU9rCjFIcnM0enNCY3BwZWh3KzBhMEpJajdvLzEzbkJtUkJUTDRVMmxtdGJIK2lSVk5Ec2Y1VEhpRjcvQzJNanZmWUgKanZqWmplR3l0d3dYMUU3MC8zMjlzUVVZUU8xbDhkNzhkWjRwcmFseDcyUlN5RnlCTFVNOU9jaVMvakMreFNINQp2c3JVcWlhWm9Ieks3RU8xSzB5aEFzT0h2RFdzMkwvamtJSkRsSzd0T3dQclpvbmIweG5nYXJCbkZQbEVaSWtVCnRmenRaQT09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
+  core_api_key: |
+    LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcGdJQkFBS0NBUUVBcnh2ZWI5WVVNdEFtRThhTzFFb3p6SHk2N2FTRU9rdTgvY3Nka1VQanJQc1BYRG01CmpxTlZnWXBUS2xFV1JpUEFIeUNua1dYMWJEYkZaSS9lRkRDRk04ZGxtMjJsaGxaOGxQck5QU0VQWUE1S2pIM04KalVpMDN6YXlnaGlFUDFkQjl6UUdKZEMyVTFxQXdDcjk2dkxHdXQ5M2Vwb2pFT2VkVE5uSElRMk1tTHE1c2tPMgpvRXhDWXZzKy9maHgrT0ZwR3BWbTdVR3lZdTh2clFZdHNFakd2ZXZXbi82c0V1SlkwNnJTZlZUZWRaTHFuaHFYCmV3Tm9MQklGdGRtbE1OMkttYlNOcDNJUTg5bWNodDBKdHRDQ1FqQnR5OU5xdVRQR09hdktqN28wSy9zMlJuVHUKTU82S3FDNHNYOGlPeVpPeU1DNndKa2VJREtrVURIZ0Nad3l0cXdJREFRQUJBb0lCQVFDaHhmdHdFclZDWkc1cApJcTFkanRmZitQT3hES1prUFFoeTU2MS9RTnNjT2kxc3BKKzdHVWFya0tGWW5PVVpFM293eDdoSGFZeWMxdFR5CkhMK3NvMDdNRVZEYmtTYTB2ejRGWE5jenZGRTZDcm53cFdDN1FBcHBsVnpCTitrbG8zVjc3Z0luK1hRWCthcXMKM29zSy9oTi9IV2lDU2RoUGk4c1U3clU2NGd1Y0pJNkhnK2lnMlFYWTk0bWFjVHJhVkhOMWtSd0RjYnFLbDhsVwpoUTlSTjNROXpQdFF3OUxGd0xHNGN1VkNtZ09XOW9LeE9weTVjM2hoNGhPL0ZVMEQzOU00eVhmcFJBQ1hzYzhmCmNXMjRaSC9pQzZ2bXVjNEtGejlsaWVmT1hnMy9LVWtJTzgzNkJxNGk1K3Jjc0Y2QS9ucllPV2VKYmZnL2dpR1UKWGV6OXdOcEJBb0dCQU5rNDUxeTV2NVJsYmtmN2VJNzA4NXBtM3JJeTZodkFXUktBRTZ5UWJra0dqa2pkSWZndgp5QjhtdXd4NXpDeXo1Mzl2WjhYVUhIeC9KbkR3UkRlc0NRMlZKSG5Qd1NocFE3ZmNXVDJrWEFkQTdDUDlFcUpwCkpDekZiaFZPTHVlakRGMTdFVGJvU0JOdU9mc0dNWmV1WFhCMzZ6VFJURFh4bzdrR2lkekpFeFM3QW9HQkFNNWUKWCtUUGNydUhkYnVZWnZ4WUZORk9kb3B0UHhUMnJ3YlpkS3lVb2dFM1ZLY2w5MUVlVHMwRHdYTmZLWE1JQ3cybgo3SFUwNEJqVjFJd3FzVFRqMVh0SUhBVHA5elQwV1FkNXgwUUVwUkhXenlSdHduWkpTbGJ3K2NGZFNrU1NnamNpCnlvY1puUE9jNzRKSWphaC9uRUlkUDZicnkzNG9NK3VWTjU1aVRyUFJBb0dCQU5oakZDN05wcWZvUnV5VCtHdkkKWGFjdzFLVUZqU3FwK05FeUh1Y25WWVdQYjB2c1pUdDhOY202WmxpdU9CTkwvODkxcGhWdkVCV0JBRVUvUTJXRwpEZHFtK0pnVHVtSk1RalkwM2YxRzdwb1hOV1ZBWkVDL3BsYW5NZHN0Y0JJMTNVcCtIdzdvWTJ4ZndJaHNpaGlFCmpQWk5yMU9GTDNzSlJNUTdYRGhCWWEyakFvR0JBSTgveTJqVTUxdHRLRGhVRGdqVVMzOE83QklpeTBzT0FXakwKd2NXYVZ1cHBNZ1hrd013Nk1aRDJMbTZiZS9ZeGV4cTdtZE95Skd5WTRiVjZYUS9OcHY2d2kyS04xZCtZVGNSMgpyKzl6R2ZKTUhmVzNpdWo0N3ZWeXlLdUV5bXpYRmpTWG5lWXh6VlQ5ZHZRRTBQQkp4SG5RTzhMdW9vNnI4WDV5ClVlMUxhRDVCQW9HQkFLVjJkYWJvWTBpeUtyOXFDV0NXZ3pjOFpuc0FEdHoyYzZ2Z2lUTXpUeDNNamdPb1d5TXMKWnRUUy94OW1Sei9CZUJnNWhNRCszS0ZoUzNsd1RUZ2xWYUI2NjFQUWZ6Tm1sZXJoQUtXV3pFV3lkelVISzM3dQpUS0hjb01PMUdmWU9mUjVFMWZKNWNWNGlFSTVPVU9rTGtMR0RjZ2lFcUJjck9kRThkeGYxY3NlLwotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=
diff --git a/src/seba_charts/cord-platform/requirements.lock b/src/seba_charts/cord-platform/requirements.lock
new file mode 100644 (file)
index 0000000..b55b956
--- /dev/null
@@ -0,0 +1,21 @@
+dependencies:
+- name: etcd-operator
+  repository: https://kubernetes-charts.storage.googleapis.com
+  version: 0.8.0
+- name: kafka
+  repository: http://storage.googleapis.com/kubernetes-charts-incubator
+  version: 0.8.8
+- name: onos
+  repository: https://charts.opencord.org
+  version: 1.1.0
+- name: xos-core
+  repository: https://charts.opencord.org
+  version: 2.3.2
+- name: logging
+  repository: https://charts.opencord.org
+  version: 1.0.0
+- name: nem-monitoring
+  repository: https://charts.opencord.org
+  version: 1.0.0
+digest: sha256:128b668700997f5dcdab94ad59fffd9f598d74ec96eaa89c58ca50000fe5be47
+generated: 2019-01-03T13:45:06.210072932-07:00
diff --git a/src/seba_charts/cord-platform/requirements.yaml b/src/seba_charts/cord-platform/requirements.yaml
new file mode 100644 (file)
index 0000000..4cb94fe
--- /dev/null
@@ -0,0 +1,37 @@
+---
+# Copyright 2017-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.
+
+dependencies:
+- name: etcd-operator
+  version: 0.8.0
+  repository: https://kubernetes-charts.storage.googleapis.com
+  condition: etcd-operator.enabled
+- name: kafka
+  version: 0.8.8
+  repository: http://storage.googleapis.com/kubernetes-charts-incubator
+- name: onos
+  version: 1.1.0
+  repository: https://charts.opencord.org
+- name: xos-core
+  version: 2.3.2
+  repository: https://charts.opencord.org
+- name: logging
+  version: 1.0.0
+  repository: https://charts.opencord.org
+  condition: logging.enabled
+- name: nem-monitoring
+  version: 1.0.0
+  repository: https://charts.opencord.org
+  condition: nem-monitoring.enabled
diff --git a/src/seba_charts/cord-platform/values.yaml b/src/seba_charts/cord-platform/values.yaml
new file mode 100644 (file)
index 0000000..7193ac5
--- /dev/null
@@ -0,0 +1,92 @@
+---
+# Copyright 2017-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.
+
+xos-core:
+  platformKafka: cord-platform-kafka:9092
+  xos-gui:
+    platformKafka: cord-platform-kafka:9092
+
+onos:
+  log_agent:
+    kafka_brokers: ['cord-platform-kafka:9092']
+
+nem-monitoring:
+  args:
+    voltha_kpi_broker: cord-platform-kafka:9092
+  grafana:
+    datasources:
+      datasources.yaml:
+        apiVersion: 1
+        datasources:
+          - name: Prometheus
+            type: prometheus
+            url: http://cord-platform-prometheus-server.default.svc.cluster.local
+            access: proxy
+            isDefault: true
+
+logging:
+  kibana:
+    env:
+      ELASTICSEARCH_URL: "http://cord-platform-elasticsearch-client:9200"
+  elasticsearch:
+    cluster:
+      env:
+        MINIMUM_MASTER_NODES: "1"
+    client:
+      replicas: 1
+    master:
+      replicas: 2
+      persistence:
+        enabled: false
+    data:
+      replicas: 1
+      persistence:
+        enabled: false
+  logstash:
+    elasticsearch:
+      host: "cord-platform-elasticsearch-client"
+    inputs:
+      main: |-
+        input {
+          kafka {
+            auto_offset_reset => "earliest" # get all previous items from new topics
+            bootstrap_servers => "cord-platform-kafka:9092"
+            client_id => "logstash_ck"
+            codec => json { charset => "UTF-8" }
+            consumer_threads => 1
+            decorate_events => true
+            group_id => "logstash_ck"
+            metadata_max_age_ms => 60000 # recheck for new topics every minute
+            # other topics that are not indexed: xos.gui_events, voltha.kpis, voltha.heartbeat
+            topics_pattern => '.*\.events|dhcp.*|onos.*|.*\.log.*'
+            type => "cord-platform-kafka"
+          }
+        }
+  fluentd-elasticsearch:
+    elasticsearch:
+      host: "cord-platform-elasticsearch-client"
+
+kafka:
+  configurationOverrides:
+    "offsets.topic.replication.factor": 1
+    "log.retention.hours": 4
+    "log.message.timestamp.type": "LogAppendTime"
+
+  persistence:
+    enabled: false
+
+  zookeeper:
+    persistence:
+      enabled: false
diff --git a/src/seba_charts/replace_images.sh b/src/seba_charts/replace_images.sh
new file mode 100644 (file)
index 0000000..4c9a4d6
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+
+CONTAINER_REPLACEMENTS=(
+  'quay.io/coreos/etcd-operator,cachengo/etcd-operator'
+  'quay.io/coreos/etcd,quay.io/coreos/etcd'
+  'lwolf/kubectl_deployer,iecedge/kubectl_deployer_arm64'
+  'solsson/kafka-prometheus-jmx-exporter@sha256,iecedge/kafka-prometheus-jmx-exporter_arm64'
+  'danielqsj/kafka-exporter,iecedge/kafka-exporter_arm64'
+  'confluentinc/cp-kafka,akrainoenea/cp-kafka'
+  'gcr.io/google_samples/k8szk,iecedge/k8szk_arm64'
+  'sscaling/jmx-prometheus-exporter,iecedge/jmx-prometheus-exporter_arm64'
+  'josdotso/zookeeper-exporter,akrainoenea/zookeeper_exporter'
+  'docker.elastic.co/elasticsearch/elasticsearch-oss,akrainoenea/elasticsearch-oss'
+  'busybox,busybox'
+  'gcr.io/google-containers/fluentd-elasticsearch,akrainoenea/fluentd-elasticsearch'
+  'docker.elastic.co/kibana/kibana-oss,akrainoenea/kibana-oss'
+  'docker.elastic.co/logstash/logstash-oss,akrainoenea/logstash-oss'
+  'bonniernews/logstash_exporter,akrainoenea/logstash_explorer'
+  'opencord/kafka-topic-exporter,akrainoenea/kafka-topic-exporter'
+  'grafana/grafana,grafana/grafana'
+  'appropriate/curl,akrainoenea/curl'
+  'kiwigrid/k8s-sidecar,akrainoenea/k8s-sidecar'
+  'prom/alertmanager,akrainoenea/alertmanager'
+  'jimmidyson/configmap-reload,carlosedp/configmap-reload'
+  'busybox,busybox'
+  'quay.io/coreos/kube-state-metrics,akrainoenea/kube-state-metrics'
+  'prom/node-exporter,akrainoenea/node-exporter'
+  'prom/prometheus,akrainoenea/prometheus'
+  'prom/pushgateway,akrainoenea/pushgateway'
+  'onosproject/onos,cachengo/onos'
+  'docker.elastic.co/beats/filebeat-oss,akrainoenea/filebeat-oss'
+  'xosproject/xos-core,cachengo/xos-core'
+  'xosproject/chameleon,cachengo/chameleon'
+  'xosproject/xos-tosca,cachengo/xos-tosca'
+  'xosproject/xos-api-tester,cachengo/xos-api-tester'
+  'postgres,postgres'
+  'xosproject/xos-gui,cachengo/xos-gui'
+  'xosproject/xos-ws,cachengo/xos-ws'
+  'xosproject/tosca-loader,cachengo/tosca-loader'
+  'xosproject/kubernetes-synchronizer,cachengo/kubernetes-synchronizer'
+  'xosproject/tosca-loader,cachengo/tosca-loader'
+  'xosproject/xos-api-tester,cachengo/xos-api-tester'
+  'xosproject/fabric-synchronizer,cachengo/fabric-synchronizer'
+  'xosproject/fabric-crossconnect-synchronizer,cachengo/fabric-crossconnect-synchronizer'
+  'xosproject/onos-synchronizer,cachengo/onos-synchronizer'
+  'xosproject/rcord-synchronizer,cachengo/rcord-synchronizer'
+  'opencord/sadis-server,cachengo/sadis-server'
+  'xosproject/volt-synchronizer,cachengo/volt-synchronizer'
+  'voltha/voltha-voltha,cachengo/voltha-voltha'
+  'voltha/voltha-cli,cachengo/voltha-cli'
+  'voltha/voltha-ofagent,cachengo/voltha-ofagent'
+  'voltha/voltha-netconf,cachengo/voltha-netconf'
+  'voltha/voltha-envoy,cachengo/voltha-envoy'
+  'voltha/voltha-alarm-generator,cachengo/voltha-alarm-generator'
+  'tpdock/freeradius,cachengo/freeradius'
+  'gcr.io/google_containers/defaultbackend,gcr.io/google_containers/defaultbackend-arm64'
+  'quay.io/kubernetes-ingress-controller/nginx-ingress-controller,quay.io/kubernetes-ingress-controller/nginx-ingress-controller-arm64'
+  'alpine,alpine'
+  'quay.io/coreos/etcd,cachengo/etcd'
+)
+
+for REPLACEMENT in ${CONTAINER_REPLACEMENTS[@]}; do
+  OLD="$(cut -d',' -f1 <<<$REPLACEMENT)"
+  NEW="$(cut -d',' -f2 <<<$REPLACEMENT)"
+  echo "Replacing $OLD with $NEW"
+  # Use : as separator because it is an ilegal character in docker image names
+  find . -name '*.yaml' -exec sed -i -e "s:$OLD:$NEW:g" {} \;
+done
diff --git a/src/seba_charts/scripts/calico.yaml b/src/seba_charts/scripts/calico.yaml
new file mode 100644 (file)
index 0000000..d668b97
--- /dev/null
@@ -0,0 +1,401 @@
+# Calico Version v3.3.4
+# https://docs.projectcalico.org/v3.3/releases#v3.3.4
+# This manifest includes the following component versions:
+#   calico/node:v3.3.4
+#   calico/cni:v3.3.4
+#   calico/kube-controllers:v3.3.4
+
+# This ConfigMap is used to configure a self-hosted Calico installation.
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: calico-config
+  namespace: kube-system
+data:
+  # Configure this with the location of your etcd cluster.
+  etcd_endpoints: "http://10.96.232.136:6666"
+
+  # If you're using TLS enabled etcd uncomment the following.
+  # You must also populate the Secret below with these files.
+  etcd_ca: ""   # "/calico-secrets/etcd-ca"
+  etcd_cert: "" # "/calico-secrets/etcd-cert"
+  etcd_key: ""  # "/calico-secrets/etcd-key"
+  # Configure the Calico backend to use.
+  calico_backend: "bird"
+
+  # Configure the MTU to use
+  veth_mtu: "1440"
+
+  # The CNI network configuration to install on each node.  The special
+  # values in this config will be automatically populated.
+  cni_network_config: |-
+    {
+      "name": "k8s-pod-network",
+      "cniVersion": "0.3.0",
+      "plugins": [
+        {
+          "type": "calico",
+          "log_level": "info",
+          "etcd_endpoints": "__ETCD_ENDPOINTS__",
+          "etcd_key_file": "__ETCD_KEY_FILE__",
+          "etcd_cert_file": "__ETCD_CERT_FILE__",
+          "etcd_ca_cert_file": "__ETCD_CA_CERT_FILE__",
+          "mtu": __CNI_MTU__,
+          "ipam": {
+              "type": "calico-ipam"
+          },
+          "policy": {
+              "type": "k8s"
+          },
+          "kubernetes": {
+              "kubeconfig": "__KUBECONFIG_FILEPATH__"
+          }
+        },
+        {
+          "type": "portmap",
+          "snat": true,
+          "capabilities": {"portMappings": true}
+        }
+      ]
+    }
+
+---
+
+
+# The following contains k8s Secrets for use with a TLS enabled etcd cluster.
+# For information on populating Secrets, see http://kubernetes.io/docs/user-guide/secrets/
+apiVersion: v1
+kind: Secret
+type: Opaque
+metadata:
+  name: calico-etcd-secrets
+  namespace: kube-system
+data:
+  # Populate the following files with etcd TLS configuration if desired, but leave blank if
+  # not using TLS for etcd.
+  # This self-hosted install expects three files with the following names.  The values
+  # should be base64 encoded strings of the entire contents of each file.
+  # etcd-key: null
+  # etcd-cert: null
+  # etcd-ca: null
+
+---
+
+# This manifest installs the calico/node container, as well
+# as the Calico CNI plugins and network config on
+# each master and worker node in a Kubernetes cluster.
+kind: DaemonSet
+apiVersion: extensions/v1beta1
+metadata:
+  name: calico-node
+  namespace: kube-system
+  labels:
+    k8s-app: calico-node
+spec:
+  selector:
+    matchLabels:
+      k8s-app: calico-node
+  updateStrategy:
+    type: RollingUpdate
+    rollingUpdate:
+      maxUnavailable: 1
+  template:
+    metadata:
+      labels:
+        k8s-app: calico-node
+      annotations:
+        # This, along with the CriticalAddonsOnly toleration below,
+        # marks the pod as a critical add-on, ensuring it gets
+        # priority scheduling and that its resources are reserved
+        # if it ever gets evicted.
+        scheduler.alpha.kubernetes.io/critical-pod: ''
+    spec:
+      nodeSelector:
+        beta.kubernetes.io/os: linux
+      hostNetwork: true
+      tolerations:
+        # Make sure calico-node gets scheduled on all nodes.
+        - effect: NoSchedule
+          operator: Exists
+        # Mark the pod as a critical add-on for rescheduling.
+        - key: CriticalAddonsOnly
+          operator: Exists
+        - effect: NoExecute
+          operator: Exists
+      serviceAccountName: calico-node
+      # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force
+      # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods.
+      terminationGracePeriodSeconds: 0
+      containers:
+        # Runs calico/node container on each Kubernetes node.  This
+        # container programs network policy and routes on each
+        # host.
+        - name: calico-node
+          image: calico/node:v3.3.4
+          env:
+            # The location of the Calico etcd cluster.
+            - name: ETCD_ENDPOINTS
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_endpoints
+            # Location of the CA certificate for etcd.
+            - name: ETCD_CA_CERT_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_ca
+            # Location of the client key for etcd.
+            - name: ETCD_KEY_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_key
+            # Location of the client certificate for etcd.
+            - name: ETCD_CERT_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_cert
+            # Set noderef for node controller.
+            - name: CALICO_K8S_NODE_REF
+              valueFrom:
+                fieldRef:
+                  fieldPath: spec.nodeName
+            # Choose the backend to use.
+            - name: CALICO_NETWORKING_BACKEND
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: calico_backend
+            # Cluster type to identify the deployment type
+            - name: CLUSTER_TYPE
+              value: "k8s,bgp"
+            # Auto-detect the BGP IP address.
+            - name: IP
+              value: "autodetect"
+            # Enable IPIP
+            - name: CALICO_IPV4POOL_IPIP
+              value: "Always"
+            # Set MTU for tunnel device used if ipip is enabled
+            - name: FELIX_IPINIPMTU
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: veth_mtu
+            # The default IPv4 pool to create on startup if none exists. Pod IPs will be
+            # chosen from this range. Changing this value after installation will have
+            # no effect. This should fall within `--cluster-cidr`.
+            - name: CALICO_IPV4POOL_CIDR
+              value: "{{pod_net_cidr}}"
+            # Disable file logging so `kubectl logs` works.
+            - name: CALICO_DISABLE_FILE_LOGGING
+              value: "true"
+            # Set Felix endpoint to host default action to ACCEPT.
+            - name: FELIX_DEFAULTENDPOINTTOHOSTACTION
+              value: "ACCEPT"
+            # Disable IPv6 on Kubernetes.
+            - name: FELIX_IPV6SUPPORT
+              value: "false"
+            # Set Felix logging to "info"
+            - name: FELIX_LOGSEVERITYSCREEN
+              value: "info"
+            - name: FELIX_HEALTHENABLED
+              value: "true"
+          securityContext:
+            privileged: true
+          resources:
+            requests:
+              cpu: 250m
+          livenessProbe:
+            httpGet:
+              path: /liveness
+              port: 9099
+              host: localhost
+            periodSeconds: 10
+            initialDelaySeconds: 10
+            failureThreshold: 6
+          readinessProbe:
+            exec:
+              command:
+              - /bin/calico-node
+              - -bird-ready
+              - -felix-ready
+            periodSeconds: 10
+          volumeMounts:
+            - mountPath: /lib/modules
+              name: lib-modules
+              readOnly: true
+            - mountPath: /run/xtables.lock
+              name: xtables-lock
+              readOnly: false
+            - mountPath: /var/run/calico
+              name: var-run-calico
+              readOnly: false
+            - mountPath: /var/lib/calico
+              name: var-lib-calico
+              readOnly: false
+            - mountPath: /calico-secrets
+              name: etcd-certs
+        # This container installs the Calico CNI binaries
+        # and CNI network config file on each node.
+        - name: install-cni
+          image: calico/cni:v3.3.4
+          command: ["/install-cni.sh"]
+          env:
+            # Name of the CNI config file to create.
+            - name: CNI_CONF_NAME
+              value: "10-calico.conflist"
+            # The location of the Calico etcd cluster.
+            - name: ETCD_ENDPOINTS
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_endpoints
+            # The CNI network config to install on each node.
+            - name: CNI_NETWORK_CONFIG
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: cni_network_config
+            # CNI MTU Config variable
+            - name: CNI_MTU
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: veth_mtu
+          volumeMounts:
+            - mountPath: /host/opt/cni/bin
+              name: cni-bin-dir
+            - mountPath: /host/etc/cni/net.d
+              name: cni-net-dir
+            - mountPath: /calico-secrets
+              name: etcd-certs
+      volumes:
+        # Used by calico/node.
+        - name: lib-modules
+          hostPath:
+            path: /lib/modules
+        - name: var-run-calico
+          hostPath:
+            path: /var/run/calico
+        - name: var-lib-calico
+          hostPath:
+            path: /var/lib/calico
+        - name: xtables-lock
+          hostPath:
+            path: /run/xtables.lock
+            type: FileOrCreate
+        # Used to install CNI.
+        - name: cni-bin-dir
+          hostPath:
+            path: /opt/cni/bin
+        - name: cni-net-dir
+          hostPath:
+            path: /etc/cni/net.d
+        # Mount in the etcd TLS secrets with mode 400.
+        # See https://kubernetes.io/docs/concepts/configuration/secret/
+        - name: etcd-certs
+          secret:
+            secretName: calico-etcd-secrets
+            defaultMode: 0400
+---
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: calico-node
+  namespace: kube-system
+
+---
+
+# This manifest deploys the Calico Kubernetes controllers.
+# See https://github.com/projectcalico/kube-controllers
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: calico-kube-controllers
+  namespace: kube-system
+  labels:
+    k8s-app: calico-kube-controllers
+  annotations:
+    scheduler.alpha.kubernetes.io/critical-pod: ''
+spec:
+  # The controllers can only have a single active instance.
+  replicas: 1
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      name: calico-kube-controllers
+      namespace: kube-system
+      labels:
+        k8s-app: calico-kube-controllers
+    spec:
+      nodeSelector:
+        beta.kubernetes.io/os: linux
+      # The controllers must run in the host network namespace so that
+      # it isn't governed by policy that would prevent it from working.
+      hostNetwork: true
+      tolerations:
+        # Mark the pod as a critical add-on for rescheduling.
+        - key: CriticalAddonsOnly
+          operator: Exists
+        - key: node-role.kubernetes.io/master
+          effect: NoSchedule
+      serviceAccountName: calico-kube-controllers
+      containers:
+        - name: calico-kube-controllers
+          image: calico/kube-controllers:v3.3.4
+          env:
+            # The location of the Calico etcd cluster.
+            - name: ETCD_ENDPOINTS
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_endpoints
+            # Location of the CA certificate for etcd.
+            - name: ETCD_CA_CERT_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_ca
+            # Location of the client key for etcd.
+            - name: ETCD_KEY_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_key
+            # Location of the client certificate for etcd.
+            - name: ETCD_CERT_FILE
+              valueFrom:
+                configMapKeyRef:
+                  name: calico-config
+                  key: etcd_cert
+            # Choose which controllers to run.
+            - name: ENABLED_CONTROLLERS
+              value: policy,namespace,serviceaccount,workloadendpoint,node
+          volumeMounts:
+            # Mount in the etcd TLS secrets.
+            - mountPath: /calico-secrets
+              name: etcd-certs
+          readinessProbe:
+            exec:
+              command:
+              - /usr/bin/check-status
+              - -r
+      volumes:
+        # Mount in the etcd TLS secrets with mode 400.
+        # See https://kubernetes.io/docs/concepts/configuration/secret/
+        - name: etcd-certs
+          secret:
+            secretName: calico-etcd-secrets
+            defaultMode: 0400
+
+---
+
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: calico-kube-controllers
+  namespace: kube-system
diff --git a/src/seba_charts/scripts/etcd.yaml b/src/seba_charts/scripts/etcd.yaml
new file mode 100644 (file)
index 0000000..be57310
--- /dev/null
@@ -0,0 +1,85 @@
+# This manifest installs the Calico etcd on the kubeadm master.  This uses a DaemonSet
+# to force it to run on the master even when the master isn't schedulable, and uses
+# nodeSelector to ensure it only runs on the master.
+apiVersion: extensions/v1beta1
+kind: DaemonSet
+metadata:
+  name: calico-etcd
+  namespace: kube-system
+  labels:
+    k8s-app: calico-etcd
+spec:
+  template:
+    metadata:
+      labels:
+        k8s-app: calico-etcd
+      annotations:
+        # Mark this pod as a critical add-on; when enabled, the critical add-on scheduler
+        # reserves resources for critical add-on pods so that they can be rescheduled after
+        # a failure.  This annotation works in tandem with the toleration below.
+        scheduler.alpha.kubernetes.io/critical-pod: ''
+    spec:
+      tolerations:
+        # This taint is set by all kubelets running `--cloud-provider=external`
+        # so we should tolerate it to schedule the Calico pods
+        - key: node.cloudprovider.kubernetes.io/uninitialized
+          value: "true"
+          effect: NoSchedule
+        # Allow this pod to run on the master.
+        - key: node-role.kubernetes.io/master
+          effect: NoSchedule
+        # Allow this pod to be rescheduled while the node is in "critical add-ons only" mode.
+        # This, along with the annotation above marks this pod as a critical add-on.
+        - key: CriticalAddonsOnly
+          operator: Exists
+      # Only run this pod on the master.
+      nodeSelector:
+        node-role.kubernetes.io/master: ""
+      hostNetwork: true
+      containers:
+        - name: calico-etcd
+          image: {{etcd_image}}
+          env:
+            - name: CALICO_ETCD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: ETCD_UNSUPPORTED_ARCH
+              value: "{{unsupported_arch}}"
+          command:
+          - /usr/local/bin/etcd
+          args:
+          - --name=calico
+          - --data-dir=/var/etcd/calico-data
+          - --advertise-client-urls=http://$(CALICO_ETCD_IP):6666
+          - --listen-client-urls=http://0.0.0.0:6666
+          - --listen-peer-urls=http://0.0.0.0:6667
+          - --auto-compaction-retention=1
+          volumeMounts:
+            - name: var-etcd
+              mountPath: /var/etcd
+      volumes:
+        - name: var-etcd
+          hostPath:
+            path: /var/etcd
+
+---
+
+# This manifest installs the Service which gets traffic to the Calico
+# etcd.
+apiVersion: v1
+kind: Service
+metadata:
+  labels:
+    k8s-app: calico-etcd
+  name: calico-etcd
+  namespace: kube-system
+spec:
+  # Select the calico-etcd pod running on the master.
+  selector:
+    k8s-app: calico-etcd
+  # This ClusterIP needs to be known in advance, since we cannot rely
+  # on DNS to get access to etcd.
+  clusterIP: 10.96.232.136
+  ports:
+    - port: 6666
diff --git a/src/seba_charts/scripts/fabric.yaml b/src/seba_charts/scripts/fabric.yaml
new file mode 100644 (file)
index 0000000..962c97c
--- /dev/null
@@ -0,0 +1,78 @@
+tosca_definitions_version: tosca_simple_yaml_1_0\r
+imports:\r
+  - custom_types/switch.yaml\r
+  - custom_types/switchport.yaml\r
+  - custom_types/portinterface.yaml\r
+  - custom_types/bngportmapping.yaml\r
+  - custom_types/attworkflowdriverwhitelistentry.yaml\r
+  - custom_types/attworkflowdriverservice.yaml\r
+  - custom_types/serviceinstanceattribute.yaml\r
+  - custom_types/onosapp.yaml\r
+\r
+description: Configures a full SEBA POD\r
+\r
+topology_template:\r
+  node_templates:\r
+    # Fabric configuration\r
+    switch#leaf_1:\r
+      type: tosca.nodes.Switch\r
+      properties:\r
+        driver: ofdpa3\r
+        ipv4Loopback: 100.100.0.201\r
+        ipv4NodeSid: 17\r
+        isEdgeRouter: True\r
+        name: AGG_SWITCH\r
+        ofId: of:0000000000000001\r
+        routerMac: 00:00:02:01:06:01\r
+\r
+    # Setup the OLT switch port\r
+    port#olt_port:\r
+      type: tosca.nodes.SwitchPort\r
+      properties:\r
+        portId: 1\r
+        host_learning: false\r
+      requirements:\r
+        - switch:\r
+            node: switch#leaf_1\r
+            relationship: tosca.relationships.BelongsToOne\r
+\r
+    # Port connected to the BNG\r
+    port#bng_port:\r
+      type: tosca.nodes.SwitchPort\r
+      properties:\r
+        portId: 31\r
+      requirements:\r
+        - switch:\r
+            node: switch#leaf_1\r
+            relationship: tosca.relationships.BelongsToOne\r
+\r
+    # Setup the fabric switch port where the external\r
+    # router is connected to\r
+    bngmapping:\r
+      type: tosca.nodes.BNGPortMapping\r
+      properties:\r
+        s_tag: any\r
+        switch_port: 31\r
+\r
+    # DHCP L2 Relay config\r
+    onos_app#dhcpl2relay:\r
+      type: tosca.nodes.ONOSApp\r
+      properties:\r
+        name: dhcpl2relay\r
+        must-exist: true\r
+\r
+    dhcpl2relay-config-attr:\r
+      type: tosca.nodes.ServiceInstanceAttribute\r
+      properties:\r
+        name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay\r
+        value: >\r
+          {\r
+            "dhcpl2relay" : {\r
+              "useOltUplinkForServerPktInOut" : false,\r
+              "dhcpServerConnectPoints" : [ "of:0000000000000001/31" ]\r
+            }\r
+          }\r
+      requirements:\r
+        - service_instance:\r
+            node: onos_app#dhcpl2relay\r
+            relationship: tosca.relationships.BelongsToOne\r
diff --git a/src/seba_charts/scripts/installK8.sh b/src/seba_charts/scripts/installK8.sh
new file mode 100644 (file)
index 0000000..85bca25
--- /dev/null
@@ -0,0 +1,14 @@
+curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add
+echo 'echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" >>/etc/apt/sources.list.d/kubernetes.list' | sudo -s
+apt-get update
+apt-get install -y \
+    apt-transport-https \
+    ca-certificates \
+    curl \
+    software-properties-common \
+    build-essential \
+    docker.io \
+    kubelet \
+    kubeadm \
+    kubectl
+swapoff -a
diff --git a/src/seba_charts/scripts/installSEBA.sh b/src/seba_charts/scripts/installSEBA.sh
new file mode 100644 (file)
index 0000000..f8cfc68
--- /dev/null
@@ -0,0 +1,51 @@
+#!/bin/bash -ex
+# shellcheck disable=SC2016
+
+CORD_REPO=${CORD_REPO:-https://charts.opencord.org}
+CORD_PLATFORM_VERSION=${CORD_PLATFORM_VERSION:-6.1.0}
+SEBA_VERSION=${SEBA_VERSION:-1.0.0}
+ATT_WORKFLOW_VERSION=${ATT_WORKFLOW_VERSION:-1.0.2}
+
+# TODO(alav): Make each step re-entrant
+
+function wait_for {
+  # Execute in a subshell to prevent local variable override during recursion
+  (
+    local total_attempts=$1; shift
+    local cmdstr=$*
+    local sleep_time=2
+    echo -e "\n[wait_for] Waiting for cmd to return success: ${cmdstr}"
+    # shellcheck disable=SC2034
+    for attempt in $(seq "${total_attempts}"); do
+      echo "[wait_for] Attempt ${attempt}/${total_attempts%.*} for: ${cmdstr}"
+      # shellcheck disable=SC2015
+      eval "${cmdstr}" && echo "[wait_for] OK: ${cmdstr}" && return 0 || true
+      sleep "${sleep_time}"
+    done
+    echo "[wait_for] ERROR: Failed after max attempts: ${cmdstr}"
+    return 1
+  )
+}
+
+wait_for 10 'test $(kubectl get pods --all-namespaces | grep -ce "tiller.*Running") -eq 1'
+
+# Add the CORD repository and update indexes
+if [ "$(uname -m)" == 'aarch64' ]; then
+  git clone https://github.com/cachengo/seba_charts cord
+else
+  helm repo add cord "${CORD_REPO}"
+  helm repo update
+fi
+
+# Install the CORD platform
+helm install -n cord-platform cord/cord-platform --version="${CORD_PLATFORM_VERSION}"
+# Wait until 3 etcd CRDs are present in Kubernetes
+wait_for 300 'test $(kubectl get crd | grep -ice etcd) -eq 3'
+
+# Install the SEBA profile
+helm install -n seba --version "${SEBA_VERSION}" cord/seba
+wait_for 1500 'test $(kubectl get pods | grep -vcE "(\s(.+)/\2.*Running|tosca-loader.*Completed)") -eq 1'
+
+# Install the AT&T workflow
+helm install -n att-workflow --version "${ATT_WORKFLOW_VERSION}" cord/att-workflow
+wait_for 300 'test $(kubectl get pods | grep -vcE "(\s(.+)/\2.*Running|tosca-loader.*Completed)") -eq 1'
diff --git a/src/seba_charts/scripts/k8init.sh b/src/seba_charts/scripts/k8init.sh
new file mode 100644 (file)
index 0000000..364affe
--- /dev/null
@@ -0,0 +1,44 @@
+
+POD_NET_CIDR=192.168.0.0/16
+if [ "$(uname -m)" == 'aarch64' ]; then
+  ARCH=arm64
+  ETCD_IMAGE=quay.io/coreos/etcd:v3.3.9-arm64
+  UNSUPPORTED_ARCH=arm64
+else
+  ARCH=amd64
+  ETCD_IMAGE=quay.io/coreos/etcd:v3.3.9
+fi
+
+# Start Kubernetes
+sysctl net.bridge.bridge-nf-call-iptables=1
+kubeadm init \
+  --pod-network-cidr=192.168.0.0/16
+mkdir -p $HOME/.kube
+cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
+chown $(id -u):$(id -g) $HOME/.kube/config
+
+# Taint the master node
+kubectl taint nodes --all node-role.kubernetes.io/master-
+
+# Set up Calico
+sed "s;{{etcd_image}};$ETCD_IMAGE;g" etcd.yaml > etcd.yaml.tmp
+sed -i "s/{{unsupported_arch}}/$UNSUPPORTED_ARCH/g" etcd.yaml.tmp
+kubectl apply -f etcd.yaml.tmp
+kubectl apply -f https://docs.projectcalico.org/v3.3/getting-started/kubernetes/installation/rbac.yaml
+sed "s/{{pod_net_cidr}}/$POD_NET_CIDR/g" calico.yaml > calico.yaml.tmp
+kubectl apply -f calico.yaml.tmp
+rm *.tmp
+
+# Setup helm
+wget https://storage.googleapis.com/kubernetes-helm/helm-v2.12.3-linux-$ARCH.tar.gz
+tar -xvf helm-v2.12.3-linux-$ARCH.tar.gz
+cp linux-$ARCH/helm /usr/bin
+cp linux-$ARCH/tiller /usr/bin
+if [ $ARCH == 'arm64' ]; then
+  helm init --tiller-image=jessestuart/tiller:v2.9.1
+else
+  helm init
+fi
+kubectl create serviceaccount --namespace kube-system tiller
+kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
+kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
diff --git a/src/seba_charts/scripts/mini_test.sh b/src/seba_charts/scripts/mini_test.sh
new file mode 100644 (file)
index 0000000..1f82e6d
--- /dev/null
@@ -0,0 +1,24 @@
+
+
+TOSCA_POD=`kubectl get pods | grep xos-tosca | cut -d " " -f1`
+TOSCA_IP=`kubectl describe pod $TOSCA_POD | grep Node: | cut -d "/" -f2`
+BBSIM_IP=`kubectl get services -n voltha | grep bbsim | tr -s ' ' | cut -d " " -f3`
+
+
+# Create the first model
+curl \
+  -H "xos-username: admin@opencord.org" \
+  -H "xos-password: letmein" \
+  -X POST \
+  --data-binary @fabric.yaml \
+  http://$TOSCA_IP:30007/run
+
+# Create the second model
+sed "s/{{bbsim_ip}}/$BBSIM_IP/g" olt.yaml > olt.yaml.tmp
+curl \
+  -H "xos-username: admin@opencord.org" \
+  -H "xos-password: letmein" \
+  -X POST \
+  --data-binary @olt.yaml.tmp \
+  http://$TOSCA_IP:30007/run
+rm olt.yaml.tmp
diff --git a/src/seba_charts/scripts/olt.yaml b/src/seba_charts/scripts/olt.yaml
new file mode 100644 (file)
index 0000000..94fe71c
--- /dev/null
@@ -0,0 +1,32 @@
+tosca_definitions_version: tosca_simple_yaml_1_0\r
+imports:\r
+  - custom_types/oltdevice.yaml\r
+  - custom_types/onudevice.yaml\r
+  - custom_types/voltservice.yaml\r
+description: Create an OLT Device in VOLTHA\r
+topology_template:\r
+  node_templates:\r
+\r
+    service#volt:\r
+      type: tosca.nodes.VOLTService\r
+      properties:\r
+        name: volt\r
+        must-exist: true\r
+\r
+    olt_device:\r
+      type: tosca.nodes.OLTDevice\r
+      properties:\r
+        name: My OLT\r
+        device_type: openolt\r
+        host: {{bbsim_ip}}\r
+        port: 50060\r
+        switch_datapath_id: of:0000000000000002 # the openflow switch to which the OLT is connected\r
+        switch_port: "1" # the port on the switch on which the OLT is connected\r
+        outer_tpid: "0x8100"\r
+        uplink: "65536"\r
+        nas_id: "NAS_ID"\r
+        serial_number: "{{bbsim_ip}}:50060"\r
+      requirements:\r
+        - volt_service:\r
+            node: service#volt\r
+            relationship: tosca.relationships.BelongsToOne\r
diff --git a/src/seba_charts/scripts/subscriber.yaml b/src/seba_charts/scripts/subscriber.yaml
new file mode 100644 (file)
index 0000000..cf2e825
--- /dev/null
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0\r
+imports:\r
+  - custom_types/rcordsubscriber.yaml\r
+description: Create a test subscriber\r
+topology_template:\r
+  node_templates:\r
+    # A subscriber\r
+    my_house:\r
+      type: tosca.nodes.RCORDSubscriber\r
+      properties:\r
+        name: My House\r
+        c_tag: 111\r
+        s_tag: 222\r
+        onu_device: BBSM00000103 # alav: nah, mi-e lene sa vad cum se determina asta, bafta\r
diff --git a/src/seba_charts/seba/Chart.yaml b/src/seba_charts/seba/Chart.yaml
new file mode 100644 (file)
index 0000000..b821cf1
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.0.0
+description: A Helm chart to install the SEBA profile on top of the CORD platform
+icon: https://guide.opencord.org/logos/cord.svg
+name: seba
+version: 1.0.0
diff --git a/src/seba_charts/seba/charts/base-kubernetes/.helmignore b/src/seba_charts/seba/charts/base-kubernetes/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/seba/charts/base-kubernetes/Chart.yaml b/src/seba_charts/seba/charts/base-kubernetes/Chart.yaml
new file mode 100644 (file)
index 0000000..e1752cd
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.1.5
+description: A Helm chart for XOS's "base-kubernetes" profile
+icon: https://guide.opencord.org/logos/cord.svg
+name: base-kubernetes
+version: 1.0.2
diff --git a/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/Chart.yaml b/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/Chart.yaml
new file mode 100644 (file)
index 0000000..e5c17e1
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.1.3
+description: A Helm chart for XOS's "kubernetes" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: kubernetes
+version: 1.1.3
diff --git a/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/_helpers.tpl b/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..98ee611
--- /dev/null
@@ -0,0 +1,76 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "kubernetes.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "kubernetes.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "kubernetes.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "kubernetes.serviceConfig" -}}
+name: kubernetes
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.kubernetes
+  loggers:
+    '':
+      handlers:
+          - console
+          - file
+          - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/configmap.yaml b/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..96bcbf3
--- /dev/null
@@ -0,0 +1,23 @@
+---
+
+# 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: kubernetes
+data:
+  serviceConfig: |
+{{ include "kubernetes.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/deployment.yaml b/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..83763ca
--- /dev/null
@@ -0,0 +1,78 @@
+---
+
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "kubernetes.fullname" . }}
+  labels:
+    app: {{ template "kubernetes.name" . }}
+    chart: {{ template "kubernetes.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "kubernetes.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "kubernetes.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      serviceAccountName: kubernetes-synchronizer
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: kubernetes-config
+              mountPath: /opt/xos/synchronizers/kubernetes/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: kubernetes-config
+          configMap:
+            name: kubernetes
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/values.yaml b/src/seba_charts/seba/charts/base-kubernetes/charts/kubernetes/values.yaml
new file mode 100644 (file)
index 0000000..d4a3535
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# 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.
+
+# Default values for kubernetes synchronizer.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'cachengo/kubernetes-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/base-kubernetes/requirements.lock b/src/seba_charts/seba/charts/base-kubernetes/requirements.lock
new file mode 100644 (file)
index 0000000..cc53e88
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: kubernetes
+  repository: file://../../xos-services/kubernetes
+  version: 1.1.3
+digest: sha256:a37d323e4751678f01ecb4c877ca4cd513e7afedf6139a24771d1a267c2a3313
+generated: 2018-12-17T10:29:54.337664924-07:00
diff --git a/src/seba_charts/seba/charts/base-kubernetes/requirements.yaml b/src/seba_charts/seba/charts/base-kubernetes/requirements.yaml
new file mode 100644 (file)
index 0000000..533a1c8
--- /dev/null
@@ -0,0 +1,19 @@
+---
+# 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.
+
+dependencies:
+- name: kubernetes
+  version: 1.1.3
+  repository: file://../../xos-services/kubernetes
diff --git a/src/seba_charts/seba/charts/base-kubernetes/templates/_helpers.tpl b/src/seba_charts/seba/charts/base-kubernetes/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..75cb5bd
--- /dev/null
@@ -0,0 +1,52 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "base-kubernetes.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "base-kubernetes.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "base-kubernetes.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+The R-CORD synchronizer loads R-CORD-specific models into the core
+*/}}
+
diff --git a/src/seba_charts/seba/charts/base-kubernetes/templates/tosca-configmap.yaml b/src/seba_charts/seba/charts/base-kubernetes/templates/tosca-configmap.yaml
new file mode 100644 (file)
index 0000000..607a676
--- /dev/null
@@ -0,0 +1,29 @@
+---
+
+# 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: base-kubernetes-tosca
+data:
+  010-fixtures.yaml: |
+{{ toYaml .Values.toscaRecipes.fixtures | indent 4 }}
+  020-deployment.yaml: |
+{{ toYaml .Values.toscaRecipes.deployment | indent 4 }}
+  040-cord-services.yaml: |
+{{ toYaml .Values.toscaRecipes.cordServices | indent 4 }}
+  050-service-graph-constraints.yaml: |
+{{ toYaml .Values.toscaRecipes.serviceGraphConstraints | indent 4 }}
diff --git a/src/seba_charts/seba/charts/base-kubernetes/templates/tosca-job.yaml b/src/seba_charts/seba/charts/base-kubernetes/templates/tosca-job.yaml
new file mode 100644 (file)
index 0000000..ec00369
--- /dev/null
@@ -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 "base-kubernetes.fullname" . }}-tosca-loader
+  labels:
+    app: {{ template "base-kubernetes.name" . }}
+    chart: {{ template "base-kubernetes.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  backoffLimit: 12
+  template:
+    metadata:
+      labels:
+        app: {{ template "base-kubernetes.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
+    spec:
+      restartPolicy: OnFailure
+      containers:
+        - name: {{ .Chart.Name }}-tosca-loader
+          image: {{ .Values.global.registry }}{{ .Values.images.tosca_loader.repository }}:{{ tpl .Values.images.tosca_loader.tag . }}
+          imagePullPolicy: {{ .Values.images.tosca_loader.pullPolicy }}
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
+          volumeMounts:
+            - name: base-kubernetes-tosca
+              mountPath: /opt/tosca
+      volumes:
+        - name: base-kubernetes-tosca
+          configMap:
+            name: base-kubernetes-tosca
diff --git a/src/seba_charts/seba/charts/base-kubernetes/values.yaml b/src/seba_charts/seba/charts/base-kubernetes/values.yaml
new file mode 100644 (file)
index 0000000..6acffa7
--- /dev/null
@@ -0,0 +1,158 @@
+---
+# 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.
+
+# Default values for the base-kubernetes profile.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+# tosca loader container
+images:
+  tosca_loader:
+    repository: 'cachengo/tosca-loader'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+
+# TOSCA recipes for the tosca-loader
+toscaRecipes:
+  fixtures:
+    tosca_definitions_version: tosca_simple_yaml_1_0
+    description: Some basic fixtures
+    imports:
+      - custom_types/siterole.yaml
+      - custom_types/networkparametertype.yaml
+      - custom_types/networktemplate.yaml
+    topology_template:
+      node_templates:
+    # -----------------------------------------------------------------------------
+    # Network Parameter Types
+    # -----------------------------------------------------------------------------
+        s_tag:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: s_tag
+        c_tag:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: c_tag
+        next_hop:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: next_hop
+        device:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: device
+        bridge:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: bridge
+        neutron_port_name:
+          type: tosca.nodes.NetworkParameterType
+          properties:
+            name: neutron_port_name
+    # ----------------------------------------------------------------------------
+    # Roles
+    # ----------------------------------------------------------------------------
+        siterole#admin:
+          type: tosca.nodes.SiteRole
+          properties:
+            role: admin
+        siterole#pi:
+          type: tosca.nodes.SiteRole
+          properties:
+            role: pi
+        siterole#tech:
+          type: tosca.nodes.SiteRole
+          properties:
+            role: tech
+    # -----------------------------------------------------------------------------
+    # Network Templates
+    # -----------------------------------------------------------------------------
+        Private:
+          type: tosca.nodes.NetworkTemplate
+          properties:
+            name: Private
+            visibility: private
+            translation: none
+        Public shared IPv4:
+          type: tosca.nodes.NetworkTemplate
+          properties:
+            name: Public shared IPv4
+            visibility: private
+            translation: NAT
+            shared_network_name: nat-net
+        Public dedicated IPv4:
+          type: tosca.nodes.NetworkTemplate
+          properties:
+            name: Public dedicated IPv4
+            visibility: public
+            translation: none
+            shared_network_name: ext-net
+
+  deployment:
+    tosca_definitions_version: tosca_simple_yaml_1_0
+    imports:
+       - custom_types/deployment.yaml
+    description: deployment config, generated by platform-install
+    topology_template:
+      node_templates:
+        MyDeployment:
+          type: tosca.nodes.Deployment
+          properties:
+            name: MyDeployment
+
+  cordServices:
+    tosca_definitions_version: tosca_simple_yaml_1_0
+    description: Set up Kubernetes Service
+    imports:
+      - custom_types/kubernetesservice.yaml
+      - custom_types/trustdomain.yaml
+    topology_template:
+      node_templates:
+        default_trustdomain:
+          type: tosca.nodes.TrustDomain
+          properties:
+            name: "default"
+          requirements:
+            - owner:
+                node: service#kubernetes
+                relationship: tosca.relationships.BelongsToOne
+        service#kubernetes:
+          type: tosca.nodes.KubernetesService
+          properties:
+            name: kubernetes
+
+  serviceGraphConstraints:
+    tosca_definitions_version: tosca_simple_yaml_1_0
+    imports:
+       - custom_types/servicegraphconstraint.yaml
+    description: Constraints on the Services position in the graph
+    topology_template:
+      node_templates:
+        constraints:
+          type: tosca.nodes.ServiceGraphConstraint
+          properties:
+            constraints: '[]'
diff --git a/src/seba_charts/seba/charts/seba-services/Chart.yaml b/src/seba_charts/seba/charts/seba-services/Chart.yaml
new file mode 100644 (file)
index 0000000..f157038
--- /dev/null
@@ -0,0 +1,6 @@
+apiVersion: v1
+appVersion: 1.1.5
+description: A Helm chart for XOS's "SEBA" profile
+icon: https://guide.opencord.org/logos/cord.svg
+name: seba-services
+version: 1.0.2
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/Chart.yaml
new file mode 100644 (file)
index 0000000..8a77b98
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.1.4
+description: A Helm chart for XOS's "fabric-crossconnect" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: fabric-crossconnect
+version: 1.1.4
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..53aae13
--- /dev/null
@@ -0,0 +1,80 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "fabric-crossconnect.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "fabric-crossconnect.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "fabric-crossconnect.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "fabric-crossconnect.serviceConfig" -}}
+name: fabric-crossconnect
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.fabric-crossconnect
+  loggers:
+    '':
+      handlers:
+          - console
+          - file
+          - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..fcb3fd6
--- /dev/null
@@ -0,0 +1,30 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "fabric-crossconnect.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up fabric-crossconnect service
+imports:
+  - custom_types/fabriccrossconnectservice.yaml
+
+topology_template:
+  node_templates:
+    service#fabric-crossconnect:
+      type: tosca.nodes.FabricCrossconnectService
+      properties:
+        name: fabric-crossconnect
+        kind: data
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/configmap.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..bc030b1
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: fabric-crossconnect
+data:
+  serviceConfig: |
+{{ include "fabric-crossconnect.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..9017f21
--- /dev/null
@@ -0,0 +1,76 @@
+---
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "fabric-crossconnect.fullname" . }}
+  labels:
+    app: {{ template "fabric-crossconnect.name" . }}
+    chart: {{ template "fabric-crossconnect.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "fabric-crossconnect.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "fabric-crossconnect.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: fabric-crossconnect-config
+              mountPath: /opt/xos/synchronizers/fabric-crossconnect/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: fabric-crossconnect-config
+          configMap:
+            name: fabric-crossconnect
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric-crossconnect/values.yaml
new file mode 100644 (file)
index 0000000..f5a4f5b
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# 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.
+
+# Default values for fabric-crossconnect
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'cachengo/fabric-crossconnect-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/.helmignore b/src/seba_charts/seba/charts/seba-services/charts/fabric/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric/Chart.yaml
new file mode 100644 (file)
index 0000000..162e848
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 2.1.6
+description: A Helm chart for XOS's "fabric" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: fabric
+version: 2.1.6
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..747aa6f
--- /dev/null
@@ -0,0 +1,80 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "fabric.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "fabric.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "fabric.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "fabric.serviceConfig" -}}
+name: fabric
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.fabric
+  loggers:
+    '':
+      handlers:
+          - console
+          - file
+          - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..8a5e466
--- /dev/null
@@ -0,0 +1,30 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "fabric.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up Fabric service
+imports:
+  - custom_types/fabricservice.yaml
+
+topology_template:
+  node_templates:
+    service#fabric:
+      type: tosca.nodes.FabricService
+      properties:
+        name: fabric
+        kind: data
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/configmap.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..f0299d8
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: fabric
+data:
+  serviceConfig: |
+{{ include "fabric.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..6c666b8
--- /dev/null
@@ -0,0 +1,77 @@
+---
+
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "fabric.fullname" . }}
+  labels:
+    app: {{ template "fabric.name" . }}
+    chart: {{ template "fabric.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "fabric.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "fabric.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: fabric-config
+              mountPath: /opt/xos/synchronizers/fabric/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: fabric-config
+          configMap:
+            name: fabric
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/fabric/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/fabric/values.yaml
new file mode 100644 (file)
index 0000000..33933f6
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# 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.
+
+# Default values for fabric service.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: cachengo/fabric-synchronizer
+  tag: "{{ .Chart.AppVersion }}"
+  pullPolicy: Always
+
+global:
+  registry: ""
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/.helmignore b/src/seba_charts/seba/charts/seba-services/charts/onos-service/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/onos-service/Chart.yaml
new file mode 100644 (file)
index 0000000..3ba2455
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 2.0.7
+description: A Helm chart for XOS's "onos-service" service, which configures ONOS
+icon: https://guide.opencord.org/logos/cord.svg
+name: onos-service
+version: 2.0.7
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..3d7d57c
--- /dev/null
@@ -0,0 +1,81 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "onos-service.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "onos-service.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "onos-service.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "onos-service.serviceConfig" -}}
+name: onos
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.onos-service
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..6f65bbb
--- /dev/null
@@ -0,0 +1,84 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+
+{{- define "onos-service.vtnAppTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/onosapp.yaml
+   - custom_types/onosservice.yaml
+   - custom_types/serviceinstanceattribute.yaml
+
+description: Configures the VTN ONOS service
+
+topology_template:
+  node_templates:
+
+    service#ONOS_CORD:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: ONOS_CORD
+          kind: data
+          rest_hostname: {{ .onosCordRestService | quote }}
+          rest_port: 8181
+
+    onos_app#openflow:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
+      requirements:
+        - owner:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#dhcp:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.dhcp
+        app_id: org.onosproject.dhcp
+      requirements:
+        - owner:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#cord-config:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: cord-config
+        app_id: org.opencord.cord-config
+        url: {{ .cordConfigAppURL }}
+        version: 1.4.0
+        dependencies: org.onosproject.openflow, org.onosproject.dhcp
+      requirements:
+        - owner:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#vtn:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: vtn
+        app_id: org.opencord.vtn
+        url: {{ .vtnAppURL }}
+        version: 1.6.0
+        dependencies: org.opencord.cord-config
+      requirements:
+        - owner:
+            node: service#ONOS_CORD
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/configmap.yaml b/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..db13dd3
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: onos-service
+data:
+  serviceConfig: |
+{{ include "onos-service.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/onos-service/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..0398ee0
--- /dev/null
@@ -0,0 +1,76 @@
+---
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "onos-service.fullname" . }}
+  labels:
+    app: {{ template "onos-service.name" . }}
+    chart: {{ template "onos-service.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "onos-service.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "onos-service.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image:  {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: onos-service-config
+              mountPath: /opt/xos/synchronizers/onos/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: onos-service-config
+          configMap:
+            name: onos-service
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/onos-service/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/onos-service/values.yaml
new file mode 100644 (file)
index 0000000..6a0a655
--- /dev/null
@@ -0,0 +1,51 @@
+---
+# 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.
+
+# Default values for onos-service.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'cachengo/onos-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+cordConfigAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/cord-config/1.4.0/cord-config-1.4.0.oar"
+vtnAppURL: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/vtn/1.6.0/vtn-1.6.0.oar"
+
+onosCordRestService: "onos-cord-ui.default.svc.cluster.local"
+kafkaService: "cord-kafka.default.svc.cluster.local:9092"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/rcord/Chart.yaml
new file mode 100644 (file)
index 0000000..3159672
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.0.8
+description: A Helm chart for XOS's "rcord" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: rcord
+version: 1.0.8
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..2ce2d5f
--- /dev/null
@@ -0,0 +1,73 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "rcord.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "rcord.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "rcord.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "rcord.serviceConfig" -}}
+name: rcord
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.rcord
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..030d410
--- /dev/null
@@ -0,0 +1,29 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "rcord.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/rcordservice.yaml
+description: R-CORD service TOSCA
+topology_template:
+  node_templates:
+    service#rcord:
+      type: tosca.nodes.RCORDService
+      properties:
+        name: rcord
+        kind: data
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/configmap.yaml b/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..05b56dd
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: rcord
+data:
+  serviceConfig: |
+{{ include "rcord.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/rcord/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..83b7720
--- /dev/null
@@ -0,0 +1,77 @@
+---
+
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "rcord.fullname" . }}
+  labels:
+    app: {{ template "rcord.name" . }}
+    chart: {{ template "rcord.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "rcord.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "rcord.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image:  {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: rcord-config
+              mountPath: /opt/xos/synchronizers/rcord/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: rcord-config
+          configMap:
+            name: rcord
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/rcord/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/rcord/values.yaml
new file mode 100644 (file)
index 0000000..0823dba
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# 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.
+
+# Default values for rcord
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'cachengo/rcord-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/sadis-server/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/sadis-server/Chart.yaml
new file mode 100644 (file)
index 0000000..a646a7c
--- /dev/null
@@ -0,0 +1,3 @@
+appVersion: 1.0.1
+name: sadis-server
+version: 1.0.2
diff --git a/src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-deployment.yaml
new file mode 100644 (file)
index 0000000..e7de3c8
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright 2017-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: extensions/v1beta1
+
+kind: Deployment
+metadata:
+  name: sadis-server
+  labels:
+    app: sadis-server
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: sadis-server
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: sadis-server
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          ports:
+            - containerPort: 8000
+              port: 8000
+              protocol: TCP
+          env:
+            - name: SADISSERVER_PORT
+              value: "8000"
+            - name: SADISSERVER_USERNAME
+              value: "{{ .Values.xosAdminUser }}"
+            - name: SADISSERVER_PASSWORD
+              value: "{{ .Values.xosAdminPassword }}"
+            - name: SADISSERVER_XOS
+              value: xos-chameleon:9101
+            - name: SADISSERVER_KAFKABROKER
+              value: "{{ .Values.kafkaBroker }}"
diff --git a/src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-service.yaml b/src/seba_charts/seba/charts/seba-services/charts/sadis-server/templates/sadis-service.yaml
new file mode 100644 (file)
index 0000000..e31b932
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 2017-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: Service
+metadata:
+  name: "sadis-service"
+  labels:
+    app: "sadis-server"
+spec:
+  type: ClusterIP
+  ports:
+    - name: sadis-service
+      port: 8000
+      targetPort: 8000
+      protocol: TCP
+  selector:
+    app: sadis-server
+    release: {{ .Release.Name }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/sadis-server/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/sadis-server/values.yaml
new file mode 100644 (file)
index 0000000..d546948
--- /dev/null
@@ -0,0 +1,26 @@
+# Copyright 2017-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.
+
+
+image:
+  repository: 'cachengo/sadis-server'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+kafkaBroker: "cord-kafka:9092"
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/.helmignore b/src/seba_charts/seba/charts/seba-services/charts/volt/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/Chart.yaml b/src/seba_charts/seba/charts/seba-services/charts/volt/Chart.yaml
new file mode 100644 (file)
index 0000000..203b2a6
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 2.1.14
+description: A Helm chart for XOS's "olt-service" service
+icon: https://guide.opencord.org/logos/cord.svg
+name: volt
+version: 2.1.9
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/charts/volt/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..68aad4c
--- /dev/null
@@ -0,0 +1,80 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "volt.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "volt.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "volt.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "volt.serviceConfig" -}}
+name: volt
+accessor:
+  username: {{ .Values.xosAdminUser | quote }}
+  password: {{ .Values.xosAdminPassword | quote }}
+  endpoint: {{ .Values.xosCoreService | quote }}
+event_bus:
+  endpoint: {{ .Values.kafkaService | quote }}
+  kind: kafka
+logging:
+  version: 1
+  handlers:
+    console:
+      class: logging.StreamHandler
+    file:
+      class: logging.handlers.RotatingFileHandler
+      filename: /var/log/xos.log
+      maxBytes: 10485760
+      backupCount: 5
+    kafka:
+      class: kafkaloghandler.KafkaLogHandler
+      bootstrap_servers:
+        - "{{ .Values.kafkaService }}:9092"
+      topic: xos.log.volt
+  loggers:
+    '':
+      handlers:
+        - console
+        - file
+        - kafka
+      level: DEBUG
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/charts/volt/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..9666e06
--- /dev/null
@@ -0,0 +1,36 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "volt.serviceTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Set up VOLT service
+imports:
+  - custom_types/voltservice.yaml
+
+topology_template:
+  node_templates:
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        name: volt
+        kind: data
+        voltha_url: {{ .volthaRestService | quote }}
+        voltha_port: 8882
+        onos_voltha_url: {{ .onosRestService | quote }}
+        onos_voltha_port: 8181
+        onos_voltha_user: karaf
+        onos_voltha_pass: karaf
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/templates/configmap.yaml b/src/seba_charts/seba/charts/seba-services/charts/volt/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..37dbd8d
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# 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: volt
+data:
+  serviceConfig: |
+{{ include "volt.serviceConfig" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/templates/deployment.yaml b/src/seba_charts/seba/charts/seba-services/charts/volt/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..dee6e15
--- /dev/null
@@ -0,0 +1,77 @@
+---
+
+# 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: apps/v1beta2
+kind: Deployment
+metadata:
+  name: {{ template "volt.fullname" . }}
+  labels:
+    app: {{ template "volt.name" . }}
+    chart: {{ template "volt.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ template "volt.name" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ template "volt.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+    spec:
+      containers:
+        - name: {{ .Chart.Name }}
+          image: {{ .Values.global.registry }}{{ .Values.image.repository }}:{{ tpl .Values.image.tag . }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+          volumeMounts:
+            - name: volt-config
+              mountPath: /opt/xos/synchronizers/volt/mounted_config.yaml
+              subPath: mounted_config.yaml
+            - name: certchain-volume
+              mountPath: /usr/local/share/ca-certificates/local_certs.crt
+              subPath: config/ca_cert_chain.pem
+      volumes:
+        - name: volt-config
+          configMap:
+            name: volt
+            items:
+              - key: serviceConfig
+                path: mounted_config.yaml
+        - name: certchain-volume
+          configMap:
+            name: ca-certificates
+            items:
+              - key: chain
+                path: config/ca_cert_chain.pem
+    {{- with .Values.nodeSelector }}
+      nodeSelector:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.affinity }}
+      affinity:
+{{ toYaml . | indent 8 }}
+    {{- end }}
+    {{- with .Values.tolerations }}
+      tolerations:
+{{ toYaml . | indent 8 }}
+    {{- end }}
diff --git a/src/seba_charts/seba/charts/seba-services/charts/volt/values.yaml b/src/seba_charts/seba/charts/seba-services/charts/volt/values.yaml
new file mode 100644 (file)
index 0000000..dac5625
--- /dev/null
@@ -0,0 +1,47 @@
+---
+# 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.
+
+# Default values for vOLT
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+image:
+  repository: 'cachengo/volt-synchronizer'
+  tag: '{{ .Chart.AppVersion }}'
+  pullPolicy: 'Always'
+
+global:
+  registry: ''
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+xosCoreService: "xos-core:50051"
+
+volthaRestService: "voltha.voltha.svc.cluster.local"
+onosRestService: "onos-ui.default.svc.cluster.local"
+kafkaService: "cord-kafka"
+
+resources: {}
+
+nodeSelector: {}
+
+tolerations: []
+
+affinity: {}
diff --git a/src/seba_charts/seba/charts/seba-services/requirements.lock b/src/seba_charts/seba/charts/seba-services/requirements.lock
new file mode 100644 (file)
index 0000000..b287c0c
--- /dev/null
@@ -0,0 +1,21 @@
+dependencies:
+- name: rcord
+  repository: file://../../xos-services/rcord
+  version: 1.0.8
+- name: onos-service
+  repository: file://../../xos-services/onos-service
+  version: 2.0.7
+- name: fabric
+  repository: file://../../xos-services/fabric
+  version: 2.1.6
+- name: volt
+  repository: file://../../xos-services/volt
+  version: 2.1.9
+- name: fabric-crossconnect
+  repository: file://../../xos-services/fabric-crossconnect
+  version: 1.1.4
+- name: sadis-server
+  repository: file://../../sadis-server
+  version: 1.0.2
+digest: sha256:f805439a28c54c1e2afd5352046cf7b533cb4721022743dad9b74611b3d21d85
+generated: 2018-12-19T11:26:50.587237667-07:00
diff --git a/src/seba_charts/seba/charts/seba-services/requirements.yaml b/src/seba_charts/seba/charts/seba-services/requirements.yaml
new file mode 100644 (file)
index 0000000..99b2b03
--- /dev/null
@@ -0,0 +1,34 @@
+---
+# 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.
+
+dependencies:
+- name: rcord
+  version: 1.0.8
+  repository: file://../../xos-services/rcord
+- name: onos-service
+  version: 2.0.7
+  repository: file://../../xos-services/onos-service
+- name: fabric
+  version: 2.1.6
+  repository: file://../../xos-services/fabric
+- name: volt
+  version: 2.1.9
+  repository: file://../../xos-services/volt
+- name: fabric-crossconnect
+  version: 1.1.4
+  repository: file://../../xos-services/fabric-crossconnect
+- name: sadis-server
+  version: 1.0.2
+  repository: file://../../sadis-server
diff --git a/src/seba_charts/seba/charts/seba-services/templates/_helpers.tpl b/src/seba_charts/seba/charts/seba-services/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..6519e2f
--- /dev/null
@@ -0,0 +1,47 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "seba-services.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "seba-services.fullname" -}}
+{{- if .Values.fullnameOverride -}}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- $name := default .Chart.Name .Values.nameOverride -}}
+{{- if contains $name .Release.Name -}}
+{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
+{{- else -}}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "seba-services.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/templates/_tosca.tpl b/src/seba_charts/seba/charts/seba-services/templates/_tosca.tpl
new file mode 100644 (file)
index 0000000..32ce678
--- /dev/null
@@ -0,0 +1,422 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+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.
+*/}}
+{{- define "seba-services.onosTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+imports:
+   - custom_types/onosapp.yaml
+   - custom_types/onosservice.yaml
+   - custom_types/serviceinstanceattribute.yaml
+
+description: Configures the VOLTHA ONOS service
+
+topology_template:
+  node_templates:
+
+    service#onos:
+      type: tosca.nodes.ONOSService
+      properties:
+          name: onos
+          kind: data
+          rest_hostname: {{ .onosRestService | quote }}
+          rest_port: 8181
+
+    onos_app#openflow-base:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: openflow-base
+        app_id: org.onosproject.openflow-base
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#hostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: hostprovider
+        app_id: org.onosproject.hostprovider
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#olt:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: olt
+        app_id: org.opencord.olt
+        url: {{ .oltAppUrl }}
+        version: 2.1.0
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#sadis:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: sadis
+        app_id: org.opencord.sadis
+        url: {{ .sadisAppUrl }}
+        version: 2.2.0
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#dhcpl2relay:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: dhcpl2relay
+        app_id: org.opencord.dhcpl2relay
+        url: {{ .dhcpl2relayAppUrl }}
+        version: 1.5.0
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#aaa:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: aaa
+        app_id: org.opencord.aaa
+        url: {{ .aaaAppUrl }}
+        version: 1.8.0
+        dependencies: org.opencord.sadis
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#kafka:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: kafka
+        app_id: org.opencord.kafka
+        url: {{ .kafkaAppUrl }}
+        version: 1.0.0
+        dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    # CORD-Configuration
+    kafka-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.kafka
+        value: >
+          {
+            "kafka" : {
+              "bootstrapServers" : {{ .kafkaService | quote }}
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#kafka
+            relationship: tosca.relationships.BelongsToOne
+
+    olt-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
+        value: >
+          {
+            "enableDhcpOnProvisioning" : true
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#olt
+            relationship: tosca.relationships.BelongsToOne
+
+    aaa-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.aaa
+        value: >
+          {
+            "AAA" : {
+              "radiusConnectionType" : "socket",
+              "radiusHost" : "freeradius.voltha.svc.cluster.local",
+              "radiusServerPort" : "1812",
+              "radiusSecret" : "SECRET"
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#aaa
+            relationship: tosca.relationships.BelongsToOne
+
+    sadis-config-attr:
+      type: tosca.nodes.ServiceInstanceAttribute
+      properties:
+        name: /onos/v1/network/configuration/apps/org.opencord.sadis
+        value: >
+          {
+            "sadis" : {
+              "integration" : {
+                "cache" : {
+                  "maxsize" : 1000,
+                  "ttl": "PT300S"
+                },
+                "url" : "http://sadis-service:8000/subscriber/%s"
+              }
+            }
+          }
+      requirements:
+        - service_instance:
+            node: onos_app#sadis
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#segmentrouting:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.segmentrouting
+        app_id: org.onosproject.segmentrouting
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#netcfghostprovider:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.netcfghostprovider
+        app_id: org.onosproject.netcfghostprovider
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    onos_app#openflow:
+      type: tosca.nodes.ONOSApp
+      properties:
+        name: org.onosproject.openflow
+        app_id: org.onosproject.openflow
+      requirements:
+        - owner:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+{{- end -}}
+
+{{- define "seba-services.basicFixturesTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+description: Some basic fixtures
+imports:
+  - custom_types/deployment.yaml
+  - custom_types/networkparametertype.yaml
+  - custom_types/networktemplate.yaml
+  - custom_types/siterole.yaml
+topology_template:
+  node_templates:
+
+# -----------------------------------------------------------------------------
+# Network Parameter Types
+# -----------------------------------------------------------------------------
+    s_tag:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: s_tag
+    c_tag:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: c_tag
+    next_hop:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: next_hop
+    device:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: device
+    bridge:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: bridge
+    neutron_port_name:
+      type: tosca.nodes.NetworkParameterType
+      properties:
+        name: neutron_port_name
+
+# ----------------------------------------------------------------------------
+# Roles
+# ----------------------------------------------------------------------------
+    siterole#admin:
+      type: tosca.nodes.SiteRole
+      properties:
+        role: admin
+    siterole#pi:
+      type: tosca.nodes.SiteRole
+      properties:
+        role: pi
+    siterole#tech:
+      type: tosca.nodes.SiteRole
+      properties:
+        role: tech
+
+# -----------------------------------------------------------------------------
+# Network Templates
+# -----------------------------------------------------------------------------
+    Private:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+        name: Private
+        visibility: private
+        translation: none
+
+    Public shared IPv4:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+        name: Public shared IPv4
+        visibility: private
+        translation: NAT
+        shared_network_name: nat-net
+
+    Public dedicated IPv4:
+      type: tosca.nodes.NetworkTemplate
+      properties:
+        name: Public dedicated IPv4
+        visibility: public
+        translation: none
+        shared_network_name: ext-net
+
+# -----------------------------------------------------------------------------
+# Deployment
+# -----------------------------------------------------------------------------
+    MyDeployment:
+      type: tosca.nodes.Deployment
+      properties:
+        name: MyDeployment
+{{- end -}}
+
+
+{{- define "seba-services.serviceGraphTosca" -}}
+tosca_definitions_version: tosca_simple_yaml_1_0
+imports:
+  - custom_types/fabricservice.yaml
+  - custom_types/onosservice.yaml
+  - custom_types/rcordservice.yaml
+  - custom_types/voltservice.yaml
+  - custom_types/fabriccrossconnectservice.yaml
+  - custom_types/servicedependency.yaml
+  - custom_types/servicegraphconstraint.yaml
+description: seba service graph
+topology_template:
+  node_templates:
+
+# These services must be defined before loading the graph
+
+    service#onos:
+      type: tosca.nodes.ONOSService
+      properties:
+        name: onos
+        must-exist: true
+
+    service#fabric:
+      type: tosca.nodes.FabricService
+      properties:
+        name: fabric
+        must-exist: true
+
+    service#rcord:
+      type: tosca.nodes.RCORDService
+      properties:
+        name: rcord
+        must-exist: true
+
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        name: volt
+        must-exist: true
+
+    service#fabric-crossconnect:
+      type: tosca.nodes.FabricCrossconnectService
+      properties:
+        name: fabric-crossconnect
+        must-exist: true
+
+    service_dependency#onos-fabric_fabric:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#fabric
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    service_dependency#rcord_volt:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#rcord
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+
+    service_dependency#onos_volt:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+
+    service_dependency#volt_fabric-crossconnect:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#fabric-crossconnect
+            relationship: tosca.relationships.BelongsToOne
+
+    service_dependency#onos_fabric-crossconnect:
+      type: tosca.nodes.ServiceDependency
+      properties:
+        connect_method: none
+      requirements:
+        - subscriber_service:
+            node: service#fabric-crossconnect
+            relationship: tosca.relationships.BelongsToOne
+        - provider_service:
+            node: service#onos
+            relationship: tosca.relationships.BelongsToOne
+
+    constraints:
+      type: tosca.nodes.ServiceGraphConstraint
+      properties:
+        constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
+{{- end -}}
diff --git a/src/seba_charts/seba/charts/seba-services/templates/tests/test-att-workflow.yaml b/src/seba_charts/seba/charts/seba-services/templates/tests/test-att-workflow.yaml
new file mode 100644 (file)
index 0000000..f029cf3
--- /dev/null
@@ -0,0 +1,45 @@
+---
+# Copyright 2017-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: Pod
+metadata:
+  name: "{{ .Release.Name }}-api-test"
+  annotations:
+    "helm.sh/hook": test-success
+spec:
+  restartPolicy: Never
+  containers:
+    - name: {{ .Release.Name }}-api-test
+      image: {{ .Values.global.registry }}{{ .Values.images.xos_api_tester.repository }}:{{ tpl .Values.images.xos_api_tester.tag . }}
+      imagePullPolicy: {{ .Values.images.xos_api_tester.pullPolicy }}
+      volumeMounts:
+        - name: log-volume
+          mountPath: /src/cord-api/Tests/Log/
+      env:
+        - name: SERVER_IP
+          value: 'xos-chameleon'
+        - name: SERVER_PORT
+          value: '9101'
+        - name: XOS_USER
+          value: {{ .Values.xosAdminUser | quote }}
+        - name: XOS_PASSWD
+          value: {{ .Values.xosAdminPassword | quote}}
+      command: ["pybot", "-L", "TRACE", "-d", "Log", "-T", "WorkflowValidations/ATT_Workflow.robot"]
+  volumes:
+    - name: log-volume
+      hostPath:
+        path: /tmp/helm_test_attworkflow_logs_{{ dateInZone "20060102T030405.00Z" (now) "UTC"  }}
+        type: DirectoryOrCreate
diff --git a/src/seba_charts/seba/charts/seba-services/templates/tosca-configmap.yaml b/src/seba_charts/seba/charts/seba-services/templates/tosca-configmap.yaml
new file mode 100644 (file)
index 0000000..4885b11
--- /dev/null
@@ -0,0 +1,35 @@
+---
+
+# 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: seba-services-tosca
+data:
+  010-fixtures.yaml: |
+{{ include "seba-services.basicFixturesTosca" . | indent 4 }}
+  020-rcord-subscriber-service.yaml: |
+{{ include "rcord.serviceTosca" .Values.rcord | indent 4 }}
+  030-volt-service.yaml: |
+{{ include "volt.serviceTosca" .Values.volt | indent 4 }}
+  040-fabric-crossconnect-service.yaml: |
+{{ include "fabric-crossconnect.serviceTosca" (index .Values "fabric-crossconnect") | indent 4 }}
+  061-onos-service.yaml: |
+{{ include "seba-services.onosTosca" .Values | indent 4 }}
+  070-fabric-service.yaml: |
+{{ include "fabric.serviceTosca" .Values.fabric | indent 4 }}
+  300-service-graph.yaml: |
+{{ include "seba-services.serviceGraphTosca" . | indent 4 }}
diff --git a/src/seba_charts/seba/charts/seba-services/templates/tosca-job.yaml b/src/seba_charts/seba/charts/seba-services/templates/tosca-job.yaml
new file mode 100644 (file)
index 0000000..8317c08
--- /dev/null
@@ -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 "seba-services.fullname" . }}-tosca-loader
+  labels:
+    app: {{ template "seba-services.name" . }}
+    chart: {{ template "seba-services.chart" . }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  backoffLimit: 12
+  template:
+    metadata:
+      labels:
+        app: {{ template "seba-services.name" . }}
+        release: {{ .Release.Name }}
+      annotations:
+        checksum/config: {{ include (print $.Template.BasePath "/tosca-configmap.yaml") . | sha256sum }}
+    spec:
+      restartPolicy: OnFailure
+      containers:
+        - name: {{ .Chart.Name }}-tosca-loader
+          image: {{ .Values.global.registry }}{{ .Values.images.tosca_loader.repository }}:{{ tpl .Values.images.tosca_loader.tag . }}
+          imagePullPolicy: {{ .Values.images.tosca_loader.pullPolicy }}
+          env:
+            - name: XOS_USER
+              value: {{ .Values.xosAdminUser }}
+            - name: XOS_PASSWD
+              valueFrom:
+                secretKeyRef:
+                  name: xos-admin-passwd-secret
+                  key: password
+          volumeMounts:
+            - name: seba-services-tosca
+              mountPath: /opt/tosca
+      volumes:
+        - name: seba-services-tosca
+          configMap:
+            name: seba-services-tosca
diff --git a/src/seba_charts/seba/charts/seba-services/values.yaml b/src/seba_charts/seba/charts/seba-services/values.yaml
new file mode 100644 (file)
index 0000000..80d787e
--- /dev/null
@@ -0,0 +1,50 @@
+---
+# 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.
+
+# Default values for the seba-services profile.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+replicaCount: 1
+
+nameOverride: ""
+fullnameOverride: ""
+
+images:
+  tosca_loader:
+    repository: 'cachengo/tosca-loader'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  xos_api_tester:
+    repository: 'cachengo/xos-api-tester'
+    tag: '2.0.6-dev'
+    pullPolicy: 'Always'
+
+global:
+  registry: ""
+
+xosAdminUser: "admin@opencord.org"
+xosAdminPassword: "letmein"
+
+# ONOS applications
+aaaAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/aaa/1.8.0/aaa-1.8.0.oar"
+sadisAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/sadis-app/2.2.0/sadis-app-2.2.0.oar"
+dhcpl2relayAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/dhcpl2relay/1.5.0/dhcpl2relay-1.5.0.oar"
+oltAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/olt-app/2.1.0/olt-app-2.1.0.oar"
+kafkaAppUrl: "https://oss.sonatype.org/service/local/repositories/releases/content/org/opencord/kafka/1.0.0/kafka-1.0.0.oar"
+
+onosRestService: "onos-ui.default.svc.cluster.local"
+kafkaService: "cord-kafka.default.svc.cluster.local:9092"
diff --git a/src/seba_charts/seba/charts/voltha/Chart.yaml b/src/seba_charts/seba/charts/voltha/Chart.yaml
new file mode 100644 (file)
index 0000000..9f0cb20
--- /dev/null
@@ -0,0 +1,5 @@
+appVersion: 1.6.0
+description: A Helm chart for Voltha based on K8S resources in Voltha project
+icon: https://guide.opencord.org/logos/cord.svg
+name: voltha
+version: 1.0.3
diff --git a/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/.helmignore b/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/Chart.yaml b/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/Chart.yaml
new file mode 100644 (file)
index 0000000..629b276
--- /dev/null
@@ -0,0 +1,5 @@
+apiVersion: v1
+appVersion: 0.9.2
+description: Create an etcd-cluster using etcd-operator provided CRD
+name: etcd-cluster
+version: 0.1.1
diff --git a/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/templates/etcd-cluster.yaml b/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/templates/etcd-cluster.yaml
new file mode 100644 (file)
index 0000000..281227f
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 2017-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: "etcd.database.coreos.com/v1beta2"
+kind: "EtcdCluster"
+metadata:
+  name: {{ quote .Values.clusterName }}
+spec:
+  size: {{ .Values.clusterSize }}
+  pod:
+    resources:
+      limits:
+        memory: {{ .Values.memoryLimit }}
+    etcdEnv:
+    - name: ETCD_AUTO_COMPACTION_RETENTION
+      value: {{ quote .Values.autoCompactionRetention }}
+    busyboxImage: {{ .Values.global.registry }}{{ .Values.images.busybox.repository }}:{{ tpl .Values.images.busybox.tag . }}
+  version: {{ tpl .Values.images.etcd.tag . }}
+  repository: {{ .Values.global.registry }}{{ .Values.images.etcd.repository }}
diff --git a/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/values.yaml b/src/seba_charts/seba/charts/voltha/charts/etcd-cluster/values.yaml
new file mode 100644 (file)
index 0000000..4e668bf
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright 2017-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 etcd-cluster.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+clusterName: "etcd-cluster"
+clusterSize: 3
+memoryLimit: 1024Mi
+autoCompactionRetention: "12"
+
+images:
+  etcd:
+    repository: "akrainoenea/etcd"
+    tag: "v3.2.18"
+  busybox:
+    repository: "busybox"
+    tag: "1.28.1-glibc"
+
+global:
+  registry: ""
diff --git a/src/seba_charts/seba/charts/voltha/requirements.lock b/src/seba_charts/seba/charts/voltha/requirements.lock
new file mode 100644 (file)
index 0000000..9bcc76f
--- /dev/null
@@ -0,0 +1,6 @@
+dependencies:
+- name: etcd-cluster
+  repository: file://../etcd-cluster
+  version: 0.1.1
+digest: sha256:beb74a2bea68054a10117b77bf499f2f372d50dd93817b448a4306c173bb44c5
+generated: 2018-11-19T14:44:51.333417159-07:00
diff --git a/src/seba_charts/seba/charts/voltha/requirements.yaml b/src/seba_charts/seba/charts/voltha/requirements.yaml
new file mode 100644 (file)
index 0000000..241c094
--- /dev/null
@@ -0,0 +1,20 @@
+---
+# Copyright 2017-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.
+
+dependencies:
+- name: etcd-cluster
+  version: 0.1.1
+  repository: file://../etcd-cluster
+  condition: etcd.cluster.enabled
diff --git a/src/seba_charts/seba/charts/voltha/templates/05-namespace.yaml b/src/seba_charts/seba/charts/voltha/templates/05-namespace.yaml
new file mode 100644 (file)
index 0000000..0944162
--- /dev/null
@@ -0,0 +1,18 @@
+# Copyright 2017-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: Namespace
+metadata:
+  name: ingress-nginx
diff --git a/src/seba_charts/seba/charts/voltha/templates/10-default-backend.yaml b/src/seba_charts/seba/charts/voltha/templates/10-default-backend.yaml
new file mode 100644 (file)
index 0000000..6ada98f
--- /dev/null
@@ -0,0 +1,68 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: default-http-backend
+  labels:
+    app: default-http-backend
+  namespace: {{ .Values.global.namespace }}
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: default-http-backend
+    spec:
+      terminationGracePeriodSeconds: 60
+      containers:
+      - name: default-http-backend
+        # Any image is permissable as long as:
+        # 1. It serves a 404 page at /
+        # 2. It serves 200 on a /healthz endpoint
+        image: {{ .Values.global.registry }}{{ .Values.images.http_backend.repository }}:{{ tpl .Values.images.http_backend.tag . }}
+        imagePullPolicy: {{ .Values.images.http_backend.pullPolicy }}
+        livenessProbe:
+          httpGet:
+            path: /healthz
+            port: 8080
+            scheme: HTTP
+          initialDelaySeconds: 30
+          timeoutSeconds: 5
+        ports:
+        - containerPort: 8080
+        resources:
+          limits:
+            cpu: 10m
+            memory: 20Mi
+          requests:
+            cpu: 10m
+            memory: 20Mi
+---
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: default-http-backend
+  namespace: {{ .Values.global.namespace }}
+  labels:
+    app: default-http-backend
+spec:
+  ports:
+  - port: 80
+    targetPort: 8080
+  selector:
+    app: default-http-backend
diff --git a/src/seba_charts/seba/charts/voltha/templates/20-configmap.yaml b/src/seba_charts/seba/charts/voltha/templates/20-configmap.yaml
new file mode 100644 (file)
index 0000000..7ee406a
--- /dev/null
@@ -0,0 +1,21 @@
+# Copyright 2017-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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: nginx-configuration
+  namespace: {{ .Values.global.namespace }}
+  labels:
+    app: ingress-nginx
diff --git a/src/seba_charts/seba/charts/voltha/templates/30-tcp-services-configmap.yaml b/src/seba_charts/seba/charts/voltha/templates/30-tcp-services-configmap.yaml
new file mode 100644 (file)
index 0000000..d815835
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright 2017-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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: tcp-services
+  namespace: {{ .Values.global.namespace }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/40-udp-services-configmap.yaml b/src/seba_charts/seba/charts/voltha/templates/40-udp-services-configmap.yaml
new file mode 100644 (file)
index 0000000..380ab34
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright 2017-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.
+
+kind: ConfigMap
+apiVersion: v1
+metadata:
+  name: udp-services
+  namespace: {{ .Values.global.namespace }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/50-rbac.yaml b/src/seba_charts/seba/charts/voltha/templates/50-rbac.yaml
new file mode 100644 (file)
index 0000000..66b6c71
--- /dev/null
@@ -0,0 +1,147 @@
+# Copyright 2017-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: ServiceAccount
+metadata:
+  name: nginx-ingress-serviceaccount
+  namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  name: nginx-ingress-clusterrole
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+      - endpoints
+      - nodes
+      - pods
+      - secrets
+    verbs:
+      - list
+      - watch
+  - apiGroups:
+      - ""
+    resources:
+      - nodes
+    verbs:
+      - get
+  - apiGroups:
+      - ""
+    resources:
+      - services
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - "extensions"
+    resources:
+      - ingresses
+    verbs:
+      - get
+      - list
+      - watch
+  - apiGroups:
+      - ""
+    resources:
+        - events
+    verbs:
+        - create
+        - patch
+  - apiGroups:
+      - "extensions"
+    resources:
+      - ingresses/status
+    verbs:
+      - update
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+  name: nginx-ingress-role
+  namespace: {{ .Values.global.namespace }}
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+      - pods
+      - secrets
+      - namespaces
+    verbs:
+      - get
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    resourceNames:
+      # Defaults to "<election-id>-<ingress-class>"
+      # Here: "<ingress-controller-leader>-<nginx>"
+      # This has to be adapted if you change either parameter
+      # when launching the nginx-ingress-controller.
+      - "ingress-controller-leader-nginx"
+    verbs:
+      - get
+      - update
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    verbs:
+      - create
+  - apiGroups:
+      - ""
+    resources:
+      - endpoints
+    verbs:
+      - get
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+  name: nginx-ingress-role-nisa-binding
+  namespace: {{ .Values.global.namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: nginx-ingress-role
+subjects:
+  - kind: ServiceAccount
+    name: nginx-ingress-serviceaccount
+    namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name: nginx-ingress-clusterrole-nisa-binding
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: nginx-ingress-clusterrole
+subjects:
+  - kind: ServiceAccount
+    name: nginx-ingress-serviceaccount
+    namespace: {{ .Values.global.namespace }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/54-namespace.yaml b/src/seba_charts/seba/charts/voltha/templates/54-namespace.yaml
new file mode 100644 (file)
index 0000000..db72ff1
--- /dev/null
@@ -0,0 +1,23 @@
+# Copyright 2017-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.
+
+#
+# Observation:
+#    It appears that when a namespace is created, Kubernetes creates
+#    a ServiceAccount called "default" for that new namespace.
+#
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: {{ .Values.global.namespace }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/55-rbac.yaml b/src/seba_charts/seba/charts/voltha/templates/55-rbac.yaml
new file mode 100644 (file)
index 0000000..16ee8b3
--- /dev/null
@@ -0,0 +1,111 @@
+# Copyright 2017-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: ServiceAccount
+metadata:
+  name: voltha-serviceaccount
+  namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+  name: voltha-clusterrole
+rules:
+  - apiGroups:
+    - '*'
+    resources:
+    - '*'
+    verbs:
+    - '*'
+  - nonResourceURLs:
+    - '*'
+    verbs:
+    - '*'
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: Role
+metadata:
+  name: voltha-role
+  namespace: {{ .Values.global.namespace }}
+rules:
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+      - pods
+      - secrets
+      - namespaces
+    verbs:
+      - get
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    resourceNames:
+      # Defaults to "<election-id>-<ingress-class>"
+      # Here: "<ingress-controller-leader>-<nginx>"
+      # This has to be adapted if you change either parameter
+      # when launching the voltha-controller.
+      - "ingress-controller-leader-nginx"
+    verbs:
+      - get
+      - update
+  - apiGroups:
+      - ""
+    resources:
+      - configmaps
+    verbs:
+      - create
+  - apiGroups:
+      - ""
+    resources:
+      - endpoints
+    verbs:
+      - get
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: RoleBinding
+metadata:
+  name: voltha-role-nisa-binding
+  namespace: {{ .Values.global.namespace }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: Role
+  name: voltha-role
+subjects:
+  - kind: ServiceAccount
+    name: voltha-serviceaccount
+    namespace: {{ .Values.global.namespace }}
+
+---
+
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+  name: voltha-clusterrole-nisa-binding
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: voltha-clusterrole
+subjects:
+  - kind: ServiceAccount
+    name: voltha-serviceaccount
+    namespace: {{ .Values.global.namespace }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/60-cluster-ingress-nginx.yaml b/src/seba_charts/seba/charts/voltha/templates/60-cluster-ingress-nginx.yaml
new file mode 100644 (file)
index 0000000..98517ee
--- /dev/null
@@ -0,0 +1,88 @@
+---
+# Copyright 2017-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: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: nginx-ingress-controller
+  namespace: {{ .Values.global.namespace }}
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: ingress-nginx
+  template:
+    metadata:
+      labels:
+        app: ingress-nginx
+      annotations:
+        prometheus.io/port: '10254'
+        prometheus.io/scrape: 'true'
+    spec:
+      serviceAccountName: nginx-ingress-serviceaccount
+      initContainers:
+      - command:
+        - sh
+        - -c
+        - sysctl -w net.core.somaxconn=32768; sysctl -w net.ipv4.ip_local_port_range="1024 65535"
+        image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller_base.repository }}:{{ tpl .Values.images.ingress_controller_base.tag . }}
+        imagePullPolicy: {{ .Values.images.ingress_controller_base.pullPolicy }}
+        name: sysctl
+        securityContext:
+          privileged: true
+      containers:
+        - name: nginx-ingress-controller
+          image: {{ .Values.global.registry }}{{ .Values.images.ingress_controller.repository }}:{{ tpl .Values.images.ingress_controller.tag . }}
+          imagePullPolicy: {{ .Values.images.ingress_controller.pullPolicy }}
+          args:
+            - /nginx-ingress-controller
+            - --default-backend-service=$(POD_NAMESPACE)/default-http-backend
+            - --configmap=$(POD_NAMESPACE)/nginx-configuration
+            - --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services
+            - --udp-services-configmap=$(POD_NAMESPACE)/udp-services
+            - --annotations-prefix=nginx.ingress.kubernetes.io
+          env:
+            - name: POD_NAME
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.name
+            - name: POD_NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          ports:
+          - name: http
+            containerPort: 80
+          - name: https
+            containerPort: 443
+          livenessProbe:
+            failureThreshold: 3
+            httpGet:
+              path: /healthz
+              port: 10254
+              scheme: HTTP
+            initialDelaySeconds: 10
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 1
+          readinessProbe:
+            failureThreshold: 3
+            httpGet:
+              path: /healthz
+              port: 10254
+              scheme: HTTP
+            periodSeconds: 10
+            successThreshold: 1
+            timeoutSeconds: 1
diff --git a/src/seba_charts/seba/charts/voltha/templates/70-service-ingress-nginx.yaml b/src/seba_charts/seba/charts/voltha/templates/70-service-ingress-nginx.yaml
new file mode 100644 (file)
index 0000000..3af54d2
--- /dev/null
@@ -0,0 +1,32 @@
+# Copyright 2017-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: Service
+metadata:
+  name: ingress-nginx
+  namespace: {{ .Values.global.namespace }}
+spec:
+  type: NodePort
+  selector:
+    app: ingress-nginx
+  ports:
+  - name: http
+    port: 80
+    nodePort: 30080
+    targetPort: http
+  - name: https
+    port: 443
+    nodePort: 30443
+    targetPort: https
diff --git a/src/seba_charts/seba/charts/voltha/templates/80-ingress.yaml b/src/seba_charts/seba/charts/voltha/templates/80-ingress.yaml
new file mode 100644 (file)
index 0000000..8f28775
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 2017-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: extensions/v1beta1
+kind: Ingress
+metadata:
+  name: voltha-ingress
+  namespace: {{ .Values.global.namespace }}
+  annotations:
+    kubernetes.io/ingress.class: "nginx"
+    ingress.kubernetes.io/rewrite-target: /
+spec:
+  rules:
+  - host: k8s-consul
+    http:
+      paths:
+      - path: /
+        backend:
+          serviceName: consul
+          servicePort: 8500
+  - host: k8s-grafana
+    http:
+      paths:
+      - path: /
+        backend:
+          serviceName: grafana
+          servicePort: 8883
diff --git a/src/seba_charts/seba/charts/voltha/templates/_helpers.tpl b/src/seba_charts/seba/charts/voltha/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..12d1cbb
--- /dev/null
@@ -0,0 +1,60 @@
+{{- /*
+Copyright 2017-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.
+*/ -}}
+
+{{- define "voltha-vcore.cmd" }}
+- "voltha/voltha/main.py"
+- "--etcd={{ .Values.etcdReleaseName }}.default.svc.cluster.local:2379"
+- "--kafka={{ .Values.kafkaReleaseName }}.default.svc.cluster.local"
+- "--rest-port=8880"
+- "--grpc-port=50556"
+- "--interface=eth1"
+- "--backend=etcd"
+- "--pon-subnet=10.38.0.0/12"
+- "--ponsim-comm=grpc"
+- "--core-number-extractor=^.*-([0-9]+)_.*$"
+{{- end }}
+
+{{- define "logconfig.yml" }}
+version: 1
+
+formatters:
+  default:
+    format: '%(asctime)s.%(msecs)03d %(levelname)-8s %(threadName)s %(module)s.%(funcName)s %(message)s'
+    datefmt: '%Y%m%dT%H%M%S'
+
+handlers:
+  console:
+    class : logging.StreamHandler
+    formatter: default
+    stream: ext://sys.stdout
+  localRotatingFile:
+    class: logging.handlers.RotatingFileHandler
+    filename: voltha.log
+    formatter: default
+    maxBytes: 2097152
+    backupCount: 10
+  kafka:
+    class: kafkaloghandler.KafkaLogHandler
+    bootstrap_servers:
+      - "{{ .KafkaServer }}"
+    topic: "voltha.log.{{ .KafkaTopic }}"
+
+loggers:
+  '':
+    handlers: [console, localRotatingFile, kafka]
+    level: {{ .loglevel }}
+    propagate: False
+{{- end }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/alarm-generator.yaml b/src/seba_charts/seba/charts/voltha/templates/alarm-generator.yaml
new file mode 100644 (file)
index 0000000..f5ef095
--- /dev/null
@@ -0,0 +1,48 @@
+---
+# Copyright 2017-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.alarm_generator_enable }}
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: alarm-generator
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  replicas: {{ .Values.replicas.alarm_generator }}
+  template:
+    metadata:
+      labels:
+        app: alarm-generator
+      annotations:
+        cni: "calico"
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      containers:
+        - name: alarm-generator
+          image: {{ .Values.global.registry }}{{ .Values.images.alarm_generator.repository }}:{{ tpl .Values.images.alarm_generator.tag . }}
+          imagePullPolicy: {{ .Values.images.alarm_generator.pullPolicy }}
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+{{ toYaml .Values.alarm_generator_args |  indent 12 }}
+{{- end }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/envoy_for_etcd.yaml b/src/seba_charts/seba/charts/voltha/templates/envoy_for_etcd.yaml
new file mode 100644 (file)
index 0000000..5966076
--- /dev/null
@@ -0,0 +1,73 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: voltha
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+  labels:
+    name: voltha
+spec:
+  type: {{ .Values.services.envoy.serviceType }}
+{{ toYaml .Values.services.envoy.serviceInfo | indent 2 }}
+  selector:
+    app: voltha
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: voltha
+  namespace: {{ .Values.global.namespace }}
+spec:
+  replicas: {{ .Values.replicas.envoy_for_etcd }}
+  template:
+    metadata:
+      labels:
+        app: voltha
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      containers:
+        - name: voltha
+          image: {{ .Values.global.registry }}{{ .Values.images.envoy_for_etcd.repository }}:{{ tpl .Values.images.envoy_for_etcd.tag . }}
+          imagePullPolicy: {{ .Values.images.envoy_for_etcd.pullPolicy }}
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+            - "/usr/local/bin/envoyd"
+            - "-envoy-cfg-template=/envoy/voltha-grpc-proxy.template.json"
+            - "-envoy-config=/envoy/voltha-grpc-proxy.json"
+            - "-kv=etcd"
+            - "-kv-svc-name={{ .Values.etcdReleaseName }}.default.svc.cluster.local"
+            - "-kv-port=2379"
+          ports:
+            - containerPort: 8882
+              name: rest-port
+            - containerPort: 8001
+              name: mystery-port
+            - containerPort: 8443
+              name: mystery2-port
+            - containerPort: 50555
+              name: grpc-port
+
+
diff --git a/src/seba_charts/seba/charts/voltha/templates/freeradius-config.yaml b/src/seba_charts/seba/charts/voltha/templates/freeradius-config.yaml
new file mode 100644 (file)
index 0000000..92229d8
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright 2017-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.freeradius.enabled }}
+apiVersion: v1
+data:
+  clients.conf: |
+    client 0.0.0.0/0 {
+      secret = SECRET
+    }
+  users: |
+    user Cleartext-Password := "password", MS-CHAP-Use-NTLM-Auth := 0
+
+kind: ConfigMap
+metadata:
+  name: freeradius-config
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+{{- end}}
diff --git a/src/seba_charts/seba/charts/voltha/templates/freeradius.yaml b/src/seba_charts/seba/charts/voltha/templates/freeradius.yaml
new file mode 100644 (file)
index 0000000..ef86b16
--- /dev/null
@@ -0,0 +1,95 @@
+---
+# Copyright 2017-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.freeradius.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+   name: freeradius
+   namespace: {{ .Values.global.namespace }}
+   serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+   labels:
+     name: freeradius
+spec:
+  clusterIP: None
+  ports:
+    - name: radius-auth
+      protocol: UDP
+      port: 1812
+      targetPort: 1812
+    - name: radius-acc
+      protocol: UDP
+      port: 1813
+      targetPort: 1813
+    - name: radius
+      port: 18120
+      targetPort: 18120
+  selector:
+    app: freeradius
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: freeradius
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: freeradius
+      annotations:
+        cni: "calico"
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      containers:
+        - name: freeradius
+          image: {{ .Values.global.registry }}{{ .Values.images.freeradius.repository }}:{{ tpl .Values.images.freeradius.tag . }}
+          imagePullPolicy: {{ .Values.images.freeradius.pullPolicy }}
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+            - name: RADIUS_LISTEN_IP
+              value: "*"
+            - name: USERS_FILE
+              value: "/etc/raddb/users"
+            - name: RADIUS_CLIENTS
+              value: "SECRET@0.0.0.0/0"
+          ports:
+            - containerPort: 1812
+              name: radauth-port
+            - containerPort: 1813
+              name: radacc-port
+            - containerPort: 18120
+              name: radius-port
+          volumeMounts:
+            - name: freeradius-config
+              mountPath: /etc/raddb/clients.conf
+              subPath: clients.conf
+            - name: freeradius-config
+              mountPath: /etc/raddb/users
+              subPath: users
+      volumes:
+        - name: freeradius-config
+          configMap:
+            name: freeradius-config
+{{- end}}
diff --git a/src/seba_charts/seba/charts/voltha/templates/logconfigmaps.yaml b/src/seba_charts/seba/charts/voltha/templates/logconfigmaps.yaml
new file mode 100644 (file)
index 0000000..62e8109
--- /dev/null
@@ -0,0 +1,48 @@
+---
+# 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: vcore-logconfig
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+data:
+  logconfig: |
+    {{- $data := dict "KafkaServer" (printf "%s.default:9092" .Values.kafkaReleaseName) "KafkaTopic" "vcore" "loglevel" .Values.loglevel }}
+{{ include "logconfig.yml" $data | indent 4 }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: netconf-logconfig
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+data:
+  logconfig: |
+{{- $data := dict "KafkaServer" (printf "%s.default:9092" .Values.kafkaReleaseName) "KafkaTopic" "netconf" "loglevel" .Values.loglevel }}
+{{ include "logconfig.yml" $data | indent 4 }}
+
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: ofagent-logconfig
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+data:
+  logconfig: |
+{{- $data := dict "KafkaServer" (printf "%s.default:9092" .Values.kafkaReleaseName) "KafkaTopic" "ofagent" "loglevel" .Values.loglevel }}
+{{ include "logconfig.yml" $data | indent 4 }}
diff --git a/src/seba_charts/seba/charts/voltha/templates/netconf.yaml b/src/seba_charts/seba/charts/voltha/templates/netconf.yaml
new file mode 100644 (file)
index 0000000..7aa571b
--- /dev/null
@@ -0,0 +1,68 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: netconf
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  selector:
+    app: netconf
+  clusterIP: None
+  ports:
+    - port: 830
+      targetPort: 830
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: netconf
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  replicas: {{ .Values.replicas.netconf }}
+  template:
+    metadata:
+      labels:
+        app: netconf
+      annotations:
+        cni: "calico"
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      terminationGracePeriodSeconds: 10
+      containers:
+        - name: netconf
+          image: {{ .Values.global.registry }}{{ .Values.images.netconf.repository }}:{{ tpl .Values.images.netconf.tag . }}
+          imagePullPolicy: {{ .Values.images.netconf.pullPolicy }}
+          ports:
+            - containerPort: 830
+          env:
+            - name: NETCONF_PORT
+              value: "830"
+          args:
+{{ toYaml .Values.netconf_args | indent 12}}
+          volumeMounts:
+            - name: netconf-logconfig-vol
+              mountPath: /netconf/netconf/logconfig.yml
+              subPath: logconfig.yml
+      volumes:
+        - name: netconf-logconfig-vol
+          configMap:
+            name: netconf-logconfig
+            items:
+              - key: logconfig
+                path: logconfig.yml
diff --git a/src/seba_charts/seba/charts/voltha/templates/ofagent.yaml b/src/seba_charts/seba/charts/voltha/templates/ofagent.yaml
new file mode 100644 (file)
index 0000000..c70f408
--- /dev/null
@@ -0,0 +1,54 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: ofagent
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  replicas: {{ .Values.replicas.ofagent }}
+  template:
+    metadata:
+      labels:
+        app: ofagent
+      annotations:
+        cni: "calico"
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      terminationGracePeriodSeconds: 10
+      containers:
+        - name: ofagent
+          image: {{ .Values.global.registry }}{{ .Values.images.ofagent.repository }}:{{ tpl .Values.images.ofagent.tag . }}
+          imagePullPolicy: {{ .Values.images.ofagent.pullPolicy }}
+          env:
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+{{ toYaml .Values.ofagent_args | indent 12 }}
+          volumeMounts:
+            - name: ofagent-logconfig-vol
+              mountPath: /ofagent/ofagent/logconfig.yml
+              subPath: logconfig.yml
+      volumes:
+        - name: ofagent-logconfig-vol
+          configMap:
+            name: ofagent-logconfig
+            items:
+              - key: logconfig
+                path: logconfig.yml
diff --git a/src/seba_charts/seba/charts/voltha/templates/vcli.yaml b/src/seba_charts/seba/charts/voltha/templates/vcli.yaml
new file mode 100644 (file)
index 0000000..2077705
--- /dev/null
@@ -0,0 +1,69 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: vcli
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+  labels:
+    name: vcli
+spec:
+  type: NodePort
+  ports:
+    - name: ssh
+      port: 5022
+      targetPort: 22
+      nodePort: {{ .Values.node_ports.vcli_port }}
+  selector:
+    app: vcli
+---
+apiVersion: apps/v1beta1
+kind: Deployment
+metadata:
+  name: vcli
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  replicas: {{ .Values.replicas.vcli }}
+  template:
+    metadata:
+      labels:
+        app: vcli
+      annotations:
+        cni: "calico"
+    spec:
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      containers:
+        - name: vcli
+          image: {{ .Values.global.registry }}{{ .Values.images.vcli.repository }}:{{ tpl .Values.images.vcli.tag . }}
+          imagePullPolicy: {{ .Values.images.vcli.pullPolicy }}
+          env:
+            - name: POD_IP
+              valueFrom:
+                fieldRef:
+                  fieldPath: status.podIP
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+{{ toYaml .Values.vcli_args |  indent 12 }}
+          ports:
+            - containerPort: 22
+              name: ssh-port
+
+
diff --git a/src/seba_charts/seba/charts/voltha/templates/vcore_for_etcd.yaml b/src/seba_charts/seba/charts/voltha/templates/vcore_for_etcd.yaml
new file mode 100644 (file)
index 0000000..5ea1d42
--- /dev/null
@@ -0,0 +1,90 @@
+---
+# Copyright 2017-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: Service
+metadata:
+  name: vcore
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+  labels:
+    name: vcore
+spec:
+  clusterIP: None
+  ports:
+    - name: rest
+      port: 8880
+      targetPort: 8880
+    - name: mystery
+      port: 18880
+      targetPort: 18880
+    - name: grpc
+      port: 50556
+      targetPort: 50556
+  selector:
+    app: vcore
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: vcore
+  namespace: {{ .Values.global.namespace }}
+  serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+spec:
+  serviceName: vcore
+  replicas: {{ .Values.replicas.vcore }}
+  updateStrategy:
+    type: RollingUpdate
+  selector:
+    matchLabels:
+      app: vcore
+  template:
+    metadata:
+      labels:
+        app: vcore
+      annotations:
+        cni: "calico"
+    spec:
+      terminationGracePeriodSeconds: 0
+      serviceAccountName: {{ .Values.global.namespace }}-serviceaccount
+      containers:
+        - name: voltha
+          image: {{ .Values.global.registry }}{{ .Values.images.vcore.repository }}:{{ tpl .Values.images.vcore.tag . }}
+          imagePullPolicy: {{ .Values.images.vcore.pullPolicy }}
+          env:
+            - name: NAMESPACE
+              valueFrom:
+                fieldRef:
+                  fieldPath: metadata.namespace
+          args:
+{{ include "voltha-vcore.cmd" . | indent 12 }}
+          ports:
+            - containerPort: 8880
+              name: rest-port
+            - containerPort: 18880
+              name: mystery-port
+            - containerPort: 50556
+              name: grpc-port
+          volumeMounts:
+            - name: vcore-logconfig-vol
+              mountPath: /voltha/voltha/logconfig.yml
+              subPath: logconfig.yml
+      volumes:
+        - name: vcore-logconfig-vol
+          configMap:
+            name: vcore-logconfig
+            items:
+              - key: logconfig
+                path: logconfig.yml
diff --git a/src/seba_charts/seba/charts/voltha/values.yaml b/src/seba_charts/seba/charts/voltha/values.yaml
new file mode 100644 (file)
index 0000000..80414ba
--- /dev/null
@@ -0,0 +1,144 @@
+---
+# Copyright 2017-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.
+
+replicas:
+  vcore: 1
+  vcli: 1
+  ofagent: 1
+  netconf: 1
+  envoy_for_etcd: 1
+  alarm_generator: 1
+
+node_ports:
+  vcli_port: 30110
+
+services:
+  envoy:
+    serviceType: NodePort
+    serviceInfo:
+      ports:
+        - name: rest
+          port: 8882
+          targetPort: 8882
+          nodePort: 30125
+        - name: mystery
+          port: 8001
+          targetPort: 8001
+        - name: mystery2
+          port: 8443
+          targetPort: 8443
+          nodePort: 32443
+        - name: grpc
+          port: 50555
+          targetPort: 50555
+
+etcd:
+  cluster:
+    enabled: true
+
+freeradius:
+  enabled: true
+
+kafkaReleaseName: cord-kafka
+etcdReleaseName: etcd-cluster
+
+loglevel: "DEBUG"
+
+images:
+  vcore:
+    repository: 'cachengo/voltha-voltha'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  vcli:
+    repository: 'cachengo/voltha-cli'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  ofagent:
+    repository: 'cachengo/voltha-ofagent'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  netconf:
+    repository: 'cachengo/voltha-netconf'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  envoy_for_etcd:
+    repository: 'cachengo/voltha-envoy'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  alarm_generator:
+    repository: 'cachengo/voltha-alarm-generator'
+    tag: '{{ .Chart.AppVersion }}'
+    pullPolicy: 'Always'
+
+  freeradius:
+    repository: 'cachengo/freeradius'
+    tag: '2.2.8'
+    pullPolicy: 'Always'
+
+  http_backend:
+    repository: 'gcr.io/google_containers/defaultbackend-arm64'
+    tag: '1.4'
+    pullPolicy: 'Always'
+
+  ingress_controller:
+    repository: 'quay.io/kubernetes-ingress-controller/nginx-ingress-controller-arm64'
+    tag: '0.10.2'
+    pullPolicy: 'Always'
+
+  ingress_controller_base:
+    repository: 'alpine'
+    tag: '3.6'
+    pullPolicy: 'Always'
+
+# Need the namespace global for kafka
+global:
+  namespace: voltha
+  registry: ''
+
+vcli_args:
+- "/cli/cli/setup.sh"
+- "-C consul:8500"
+- "-g voltha:50555"
+- "-s voltha:18880"
+- "-G"
+
+ofagent_args:
+- "/ofagent/ofagent/main.py"
+- "--consul=consul.$(NAMESPACE).svc.cluster.local:8500"
+- "--controller=onos-openflow.default.svc.cluster.local:6653"
+- "--grpc-endpoint=vcore.$(NAMESPACE).svc.cluster.local:50556"
+
+netconf_args:
+- "/netconf/netconf/main.py"
+- "--consul=consul:8500"
+- "--grpc-endpoint=voltha:50555"
+
+# set alarm_generator_enable to true to enable alarm generator container.
+# uncomment the intf_id and onu_id arguments if no olt is physically present, and a fake onu_id should be used.
+
+alarm_generator_enable: false
+alarm_generator_args:
+- "--consul=consul:8500"
+- "--grpc-endpoint=voltha:50555"
+- "--global_request"
+- "--rate=1"
+- "--duration=2"
+#- "--intf_id=0"
+#- "--onu_id=00012bc90d6552dd"
diff --git a/src/seba_charts/seba/requirements.lock b/src/seba_charts/seba/requirements.lock
new file mode 100644 (file)
index 0000000..9fea432
--- /dev/null
@@ -0,0 +1,12 @@
+dependencies:
+- name: voltha
+  repository: https://charts.opencord.org
+  version: 1.0.3
+- name: seba-services
+  repository: https://charts.opencord.org
+  version: 1.0.2
+- name: base-kubernetes
+  repository: https://charts.opencord.org
+  version: 1.0.2
+digest: sha256:06fe1a8a03ff5bd316156cd41abbd823b7770aefc07db0e61fa2c8d391dfc36e
+generated: 2019-01-03T13:30:53.258772755-07:00
diff --git a/src/seba_charts/seba/requirements.yaml b/src/seba_charts/seba/requirements.yaml
new file mode 100644 (file)
index 0000000..3ab8ecd
--- /dev/null
@@ -0,0 +1,25 @@
+---
+# Copyright 2017-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.
+
+dependencies:
+- name: voltha
+  version: 1.0.3
+  repository: https://charts.opencord.org
+- name: seba-services
+  version: 1.0.2
+  repository: https://charts.opencord.org
+- name: base-kubernetes
+  version: 1.0.2
+  repository: https://charts.opencord.org
diff --git a/src/seba_charts/seba/values.yaml b/src/seba_charts/seba/values.yaml
new file mode 100644 (file)
index 0000000..96e1b7e
--- /dev/null
@@ -0,0 +1,40 @@
+---
+# Copyright 2017-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.
+
+seba-services:
+  onosRestService: cord-platform-onos-ui.default.svc.cluster.local
+  kafkaService: cord-platform-kafka.default.svc.cluster.local:9092
+
+  onos-service:
+    kafkaService: cord-platform-kafka
+    onosRestService: "cord-platform-onos-cord-ui.default.svc.cluster.local"
+  fabric:
+    kafkaService: cord-platform-kafka
+  volt:
+    kafkaService: cord-platform-kafka
+    volthaRestService: voltha.voltha.svc.cluster.local
+    onosRestService: cord-platform-onos-ui.default.svc.cluster.local
+  fabric-crossconnect:
+    kafkaService: cord-platform-kafka
+  sadis-server:
+    kafkaBroker: cord-platform-kafka:9092
+
+voltha:
+  kafkaReleaseName: cord-platform-kafka
+  ofagent_args:
+  - "/ofagent/ofagent/main.py"
+  - "--consul=consul.$(NAMESPACE).svc.cluster.local:8500"
+  - "--controller=cord-platform-onos-openflow.default.svc.cluster.local:6653"
+  - "--grpc-endpoint=vcore.$(NAMESPACE).svc.cluster.local:50556"
\ No newline at end of file