summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-06-28 18:41:11 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-28 18:41:11 +0000
commit6c8bc2bcaf92e3544f58a26bf282460ebea897a5 (patch)
tree8656bca526a63cc1b468f040c67ea26c12bcca13
parent8f338f5fb69c509439eb7f9ac7cfe7bd47849f8b (diff)
parentf4203f9350a797a0d0f71b8a9225469ad6346f01 (diff)
Merge "ONAP4K8s helm chart"
-rw-r--r--deployments/helm/onap4k8s/README.txt (renamed from deployments/helm/README.txt)0
-rw-r--r--deployments/helm/v2/onap4k8s/.helmignore22
-rw-r--r--deployments/helm/v2/onap4k8s/Chart.yaml5
-rw-r--r--deployments/helm/v2/onap4k8s/Makefile79
-rw-r--r--deployments/helm/v2/onap4k8s/README.md74
-rw-r--r--deployments/helm/v2/onap4k8s/clm/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/clm/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/clm/resources/config/config.json6
-rw-r--r--deployments/helm/v2/onap4k8s/clm/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/clm/templates/deployment.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/clm/templates/service.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/clm/values.yaml85
-rw-r--r--deployments/helm/v2/onap4k8s/common/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_deployment.tpl93
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_name.tpl31
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_namespace.tpl26
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_repository.tpl49
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_resources.tpl59
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_service.tpl31
-rw-r--r--deployments/helm/v2/onap4k8s/common/templates/_servicemco.tpl48
-rw-r--r--deployments/helm/v2/onap4k8s/common/values.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/emco-db/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/emco-db/requirements.yaml24
-rw-r--r--deployments/helm/v2/onap4k8s/emco-db/values.yaml65
-rw-r--r--deployments/helm/v2/onap4k8s/emco-services/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/emco-services/requirements.yaml33
-rw-r--r--deployments/helm/v2/onap4k8s/emco-services/values.yaml65
-rw-r--r--deployments/helm/v2/onap4k8s/emco-tools/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/emco-tools/requirements.yaml21
-rw-r--r--deployments/helm/v2/onap4k8s/emco-tools/values.yaml65
-rw-r--r--deployments/helm/v2/onap4k8s/emco/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/emco/requirements.yaml25
-rw-r--r--deployments/helm/v2/onap4k8s/emco/values.yaml25
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/.helmignore21
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/Chart.yaml24
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/templates/pv.yaml27
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/templates/service.yaml37
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/templates/statefulset.yaml236
-rw-r--r--deployments/helm/v2/onap4k8s/etcd/values.yaml75
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/.helmignore21
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/Chart.yaml19
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/README.md294
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/NOTES.txt30
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/_helpers.tpl188
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-configmap.yaml65
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-statefulset.yaml135
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-svc.yaml32
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/clusterrole.yaml17
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/clusterrolebinding.yaml15
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-configmap.yaml108
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-daemonset.yaml125
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-svc.yaml32
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/metrics-svc.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/serviceaccount.yaml7
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/servicemonitor.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/svc-headless.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/templates/tls-certs.yaml11
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/values-production.yaml454
-rw-r--r--deployments/helm/v2/onap4k8s/fluentd/values.yaml454
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/.helmignore21
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/nfs-provisoner.yaml78
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/pv.yaml38
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/pvc.yaml43
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/service.yaml97
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/statefulset.yaml108
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/templates/storageclass.yaml24
-rw-r--r--deployments/helm/v2/onap4k8s/mongo/values.yaml107
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/resources/config/config.json7
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/templates/deployment.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/templates/service.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/ncm/values.yaml84
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/resources/config/config.json6
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/templates/deployment.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/templates/service.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/orchestrator/values.yaml85
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/resources/config/config.json6
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/templates/deployment.yaml85
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/templates/service.yaml49
-rw-r--r--deployments/helm/v2/onap4k8s/ovnaction/values.yaml93
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/Chart.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/requirements.yaml18
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/resources/config/config.json6
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/templates/configmap.yaml28
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/templates/deployment.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/templates/service.yaml16
-rw-r--r--deployments/helm/v2/onap4k8s/rsync/values.yaml84
98 files changed, 5053 insertions, 0 deletions
diff --git a/deployments/helm/README.txt b/deployments/helm/onap4k8s/README.txt
index 857b0a0b..857b0a0b 100644
--- a/deployments/helm/README.txt
+++ b/deployments/helm/onap4k8s/README.txt
diff --git a/deployments/helm/v2/onap4k8s/.helmignore b/deployments/helm/v2/onap4k8s/.helmignore
new file mode 100644
index 00000000..50af0317
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/.helmignore
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/deployments/helm/v2/onap4k8s/Chart.yaml b/deployments/helm/v2/onap4k8s/Chart.yaml
new file mode 100644
index 00000000..6998dcaa
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: onap4k8s
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/Makefile b/deployments/helm/v2/onap4k8s/Makefile
new file mode 100644
index 00000000..dc88ff86
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/Makefile
@@ -0,0 +1,79 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+
+PARENT_CHART := emco
+COMMON_CHARTS_DIR := common
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := $(PARENT_CHART) dist jaeger-operator emco-db emco-tools emco-services
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
+ADDITIONAL_BUNDLES := emco-db emco-tools emco-services
+BUNDLE := emco
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS) $(ADDITIONAL_BUNDLES) $(PARENT_CHART)
+
+all: $(COMMON_CHARTS_DIR) $(HELM_CHARTS) $(ADDITIONAL_BUNDLES) $(PARENT_CHART)
+
+$(COMMON_CHARTS):
+ @echo "\n[$@]"
+ @make package-$@
+
+$(PARENT_CHART):
+ @echo "\n[$@]"
+ @make package-$@
+
+$(ADDITIONAL_BUNDLES):
+ @echo "\n[$@]"
+ @make package-$@
+
+$(HELM_CHARTS):
+ @echo "\n[$@]"
+ @make package-$@
+
+make-%:
+ @if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+ @if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
+
+lint-%: dep-%
+ @if [ -f $*/Chart.yaml ]; then helm lint $*; fi
+
+package-%: lint-%
+ @mkdir -p $(PACKAGE_DIR)
+ @if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+ @helm repo index $(PACKAGE_DIR)
+
+clean:
+ @rm -f */requirements.lock
+ @find . -type f -name '*.tgz' -delete
+ @rm -rf $(PACKAGE_DIR)/*
+ @rm -rf $(OUTPUT_DIR)
+
+# start up a local helm repo to serve up helm chart packages
+repo:
+ @mkdir -p $(PACKAGE_DIR)
+ @helm serve --repo-path $(PACKAGE_DIR) &
+ @helm repo index $(PACKAGE_DIR)
+ @helm repo add local http://127.0.0.1:8879
+
+# stop local helm repo
+repo-stop:
+ @pkill helm
+ @helm repo remove local
+%:
+ @:
diff --git a/deployments/helm/v2/onap4k8s/README.md b/deployments/helm/v2/onap4k8s/README.md
new file mode 100644
index 00000000..3ce49a5a
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/README.md
@@ -0,0 +1,74 @@
+#################################################################
+# EMCO v2 helm charts
+#################################################################
+
+EMCO Helm charts include charts for EMCO microservices along with MongoDb, etcd, Flutend
+
+
+### Steps to generate and install packages
+**1. Create a local helm repo from Makefile**
+
+`$ make repo`
+
+**2. Run make file to package all the required chart**
+
+`$ make clean`
+
+`$ make all`
+
+Pacakges helm charts in tar.gz format. All packages are in **dist/packages** directory and the package of intrest are:
+
+ File | Description |
+ | ----------- | ----------- |
+ | **emco-db-0.1.0.tgz** | Includes database packages for mongo & etcd |
+ | **emco-services-0.1.0.tgz** | Includes packages for all EMCO services like orchestrator, ncm, rsync etc |
+ | **emco-tools-0.1.0.tgz** | Tools like Fluentd to be used with EMCO |
+ | **emco-0.1.0.tgz** | Includes all charts including database, all services and tools |
+
+
+**3. Deploy EMCO Packages for Databases and Services**
+
+`$ helm install dist/packages/emco-db-0.1.0.tgz --name rel-db --namespace emco`
+
+`$ helm install dist/packages/emco-services-0.1.0.tgz --name rel-services --namespace emco`
+
+**4. Deploy tools (Optional)**
+
+`$ helm install dist/packages/emco-tools-0.1.0.tgz --name rel-tools --namespace emco`
+
+ NOTE: Deploy the Chart emco-0.1.0.tgz to deploy all packages including database, services and tools.
+
+ `$ helm install dist/packages/emco-0.1.0.tgz --name rel --namespace emco`
+
+
+**5. To check logs of the different Microservices check fluentd logs**
+
+`kubectl logs emco-fluentd-0 -n test | grep orchestrator`
+
+
+**6. Delete all packages**
+
+`$helm delete emco-services --purge`
+
+`$helm delete emco-db --purge`
+
+Optional if tools were installed
+
+`$helm delete emco-tools --purge`
+
+
+**7. Delete local helm repo**
+
+`make repo-stop`
+
+### Known Issues
+
+After deleting the db package and before installing the package again following error happens:
+
+ `Error: release rel01 failed: object is being deleted: persistentvolumes "rel-emco-etcd-data-0" already exists`
+
+Workaround :
+
+ `kubectl edit persistentvolumes rel01-emco-etcd-data-0`
+
+ and remover finalizers section \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/clm/Chart.yaml b/deployments/helm/v2/onap4k8s/clm/Chart.yaml
new file mode 100644
index 00000000..00520a5f
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Cluster Management
+name: clm
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/clm/requirements.yaml b/deployments/helm/v2/onap4k8s/clm/requirements.yaml
new file mode 100644
index 00000000..c2253cf4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/clm/resources/config/config.json b/deployments/helm/v2/onap4k8s/clm/resources/config/config.json
new file mode 100644
index 00000000..11d22f66
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/resources/config/config.json
@@ -0,0 +1,6 @@
+{
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9061"
+} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/clm/templates/configmap.yaml b/deployments/helm/v2/onap4k8s/clm/templates/configmap.yaml
new file mode 100644
index 00000000..c9d55fed
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/onap4k8s/clm/templates/deployment.yaml b/deployments/helm/v2/onap4k8s/clm/templates/deployment.yaml
new file mode 100644
index 00000000..dea9f79c
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/templates/deployment.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.deployment" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/clm/templates/service.yaml b/deployments/helm/v2/onap4k8s/clm/templates/service.yaml
new file mode 100644
index 00000000..c9ab68d3
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/templates/service.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.servicemco" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/clm/values.yaml b/deployments/helm/v2/onap4k8s/clm/values.yaml
new file mode 100644
index 00000000..5c7bf8d4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/clm/values.yaml
@@ -0,0 +1,85 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: rtsood/emco:0.0.1
+pullPolicy: IfNotPresent
+command: "/opt/emco/entrypoint"
+args: "clm"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: clm
+ portName: clm
+ internalPort: 9061
+ externalPort: 9061
+ nodePort: 61
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/common/Chart.yaml b/deployments/helm/v2/onap4k8s/common/Chart.yaml
new file mode 100644
index 00000000..34ba55d1
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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
+description: Common templates for inclusion in other charts
+name: common
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_deployment.tpl b/deployments/helm/v2/onap4k8s/common/templates/_deployment.tpl
new file mode 100644
index 00000000..defc55c4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_deployment.tpl
@@ -0,0 +1,93 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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 "common.deployment" -}}
+{{- $common := dict "Values" .Values.common -}}
+{{- $noCommon := omit .Values "common" -}}
+{{- $overrides := dict "Values" $noCommon -}}
+{{- $noValues := omit . "Values" -}}
+{{- with merge $noValues $overrides $common -}}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ selector:
+ matchLabels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}
+ command: [{{ .Values.command }}]
+ args: [{{ .Values.args }}]
+ workingDir: {{ .Values.workingDir }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /opt/emco/config.json
+ name: {{ include "common.name" .}}
+ subPath: config.json
+ resources:
+{{ include "common.resources" . }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity }}
+ {{- end }}
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name : {{ include "common.name" . }}
+ configMap:
+ name: {{ include "common.fullname" . }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
+{{- end -}}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_name.tpl b/deployments/helm/v2/onap4k8s/common/templates/_name.tpl
new file mode 100644
index 00000000..42999846
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_name.tpl
@@ -0,0 +1,31 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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 a chart.
+*/}}
+{{- define "common.name" -}}
+ {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+ Create a default fully qualified application name.
+ Truncated at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+*/}}
+{{- define "common.fullname" -}}
+ {{- $name := default .Chart.Name .Values.nameOverride -}}
+ {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_namespace.tpl b/deployments/helm/v2/onap4k8s/common/templates/_namespace.tpl
new file mode 100644
index 00000000..94c9ee72
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_namespace.tpl
@@ -0,0 +1,26 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+*/}}
+
+{{/*
+ Resolve the namespace to apply to a chart. The default namespace suffix
+ is the name of the chart. This can be overridden if necessary (eg. for subcharts)
+ using the following value:
+
+ - .Values.nsPrefix : override namespace prefix
+*/}}
+{{- define "common.namespace" -}}
+ {{- default .Release.Namespace .Values.nsPrefix -}}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_repository.tpl b/deployments/helm/v2/onap4k8s/common/templates/_repository.tpl
new file mode 100644
index 00000000..272db421
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_repository.tpl
@@ -0,0 +1,49 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+*/}}
+
+{{/*
+ Resolve the name of the common image repository.
+ The value for .Values.repository is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.repository : override default image repository for all images
+ - .Values.repositoryOverride : override global and default image repository on a per image basis
+*/}}
+{{- define "common.repository" -}}
+ {{if .Values.repositoryOverride }}
+ {{- printf "%s" .Values.repositoryOverride -}}
+ {{else}}
+ {{- default .Values.repository .Values.global.repository -}}
+ {{end}}
+{{- end -}}
+
+
+{{/*
+ Resolve the image repository secret token.
+ The value for .Values.global.repositoryCred is used:
+ repositoryCred:
+ user: user
+ password: password
+ mail: email (optional)
+*/}}
+{{- define "common.repository.secret" -}}
+ {{- $repo := include "common.repository" . }}
+ {{- $repo := default "nexus3.onap.org:10001" $repo }}
+ {{- $cred := .Values.global.repositoryCred }}
+ {{- $mail := default "@" $cred.mail }}
+ {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
+ {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $cred.user $cred.password $mail $auth | b64enc -}}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_resources.tpl b/deployments/helm/v2/onap4k8s/common/templates/_resources.tpl
new file mode 100644
index 00000000..fae77435
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_resources.tpl
@@ -0,0 +1,59 @@
+{{- /*
+# Copyright © 2018 Amdocs, Bell Canada
+#
+# 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.
+*/ -}}
+
+{{- /*
+ Resolve the name of the common resource limit/request flavor.
+ The value for .Values.flavor is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.flavor : override default flavor for all charts
+ - .Values.flavorOverride : override global and default flavor on a per chart basis
+*/ -}}
+{{- define "common.flavor" -}}
+ {{if .Values.flavorOverride }}
+ {{- printf "%s" .Values.flavorOverride -}}
+ {{else}}
+ {{- default .Values.flavor .Values.global.flavor -}}
+ {{end}}
+{{- end -}}
+
+{{- /*
+ Resolve the resource limit/request flavor using the desired flavor value.
+
+ - .Values.resources : YAML definition of resource limits. The flavor key
+ is computed based on the common.flavor template and
+ is used as the selected resource limit through the pluck
+ e.g: resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 4Gi
+ requests:
+ cpu: 100m
+ memory: 1Gi
+ large:
+ limits:
+ cpu: 400m
+ memory: 8Gi
+ requests:
+ cpu: 200m
+ memory: 2Gi
+ unlimited: {}
+*/ -}}
+{{- define "common.resources" -}}
+{{- $flavor := include "common.flavor" . -}}
+{{- toYaml (pluck $flavor .Values.resources | first) | indent 12 -}}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_service.tpl b/deployments/helm/v2/onap4k8s/common/templates/_service.tpl
new file mode 100644
index 00000000..77b77d05
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_service.tpl
@@ -0,0 +1,31 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+*/}}
+
+{{/*
+ Resolve the name of a chart's service.
+
+ The default will be the chart name (or .Values.nameOverride if set).
+ And the use of .Values.service.name overrides all.
+
+ - .Values.service.name : override default service (ie. chart) name
+*/}}
+{{/*
+ Expand the service name for a chart.
+*/}}
+{{- define "common.servicename" -}}
+ {{- $name := default .Chart.Name .Values.nameOverride -}}
+ {{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/common/templates/_servicemco.tpl b/deployments/helm/v2/onap4k8s/common/templates/_servicemco.tpl
new file mode 100644
index 00000000..d791abba
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/templates/_servicemco.tpl
@@ -0,0 +1,48 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 "common.servicemco" -}}
+{{- $common := dict "Values" .Values.common -}}
+{{- $noCommon := omit .Values "common" -}}
+{{- $overrides := dict "Values" $noCommon -}}
+{{- $noValues := omit . "Values" -}}
+{{- with merge $noValues $overrides $common -}}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - name: {{ .Values.service.PortName }}
+ {{if eq .Values.service.type "NodePort" -}}
+ port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.service.nodePort }}
+ {{- else -}}
+ port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ {{- end}}
+ protocol: TCP
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+{{- end -}}
+{{- end -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/common/values.yaml b/deployments/helm/v2/onap4k8s/common/values.yaml
new file mode 100644
index 00000000..852f15c8
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/common/values.yaml
@@ -0,0 +1,18 @@
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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 configuration default values that can be inherited by
+# all subcharts.
+#################################################################
diff --git a/deployments/helm/v2/onap4k8s/emco-db/Chart.yaml b/deployments/helm/v2/onap4k8s/emco-db/Chart.yaml
new file mode 100644
index 00000000..ad67c3e2
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-db/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Multicluster Edge Orchestrator Databases Package
+name: emco-db
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/emco-db/requirements.yaml b/deployments/helm/v2/onap4k8s/emco-db/requirements.yaml
new file mode 100644
index 00000000..52a40b64
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-db/requirements.yaml
@@ -0,0 +1,24 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
+ - name: mongo
+ version: ~4.x-0
+ repository: '@local'
+ - name: etcd
+ version: ~3.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/emco-db/values.yaml b/deployments/helm/v2/onap4k8s/emco-db/values.yaml
new file mode 100644
index 00000000..359d73bc
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-db/values.yaml
@@ -0,0 +1,65 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+#Mongo chart overrides for emco
+mongo:
+ nameOverride: emco-mongo
+ service:
+ name: emco-mongo
+ internalPort: 27017
+ nfsprovisionerPrefix: emco
+ sdnctlPrefix: emco
+ persistence:
+ mountSubPath: emco/mongo/data
+ enabled: true
+ disableNfsProvisioner: true
+
+#etcd chart overrides for k8splugin
+etcd:
+ nameOverride: emco-etcd
+ service:
+ name: emco-etcd
+ persistence:
+ mountSubPath: emco/etcd/data
+ enabled: true
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/emco-services/Chart.yaml b/deployments/helm/v2/onap4k8s/emco-services/Chart.yaml
new file mode 100644
index 00000000..a1a3808c
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-services/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Multicluster Edge Orchestrator Services Package
+name: emco-services
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/emco-services/requirements.yaml b/deployments/helm/v2/onap4k8s/emco-services/requirements.yaml
new file mode 100644
index 00000000..9cd7b475
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-services/requirements.yaml
@@ -0,0 +1,33 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
+ - name: orchestrator
+ version: ~0.x-0
+ repository: '@local'
+ - name: ncm
+ version: ~0.x-0
+ repository: '@local'
+ - name: rsync
+ version: ~0.x-0
+ repository: '@local'
+ - name: clm
+ version: ~0.x-0
+ repository: '@local'
+ - name: ovnaction
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/emco-services/values.yaml b/deployments/helm/v2/onap4k8s/emco-services/values.yaml
new file mode 100644
index 00000000..359d73bc
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-services/values.yaml
@@ -0,0 +1,65 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+#Mongo chart overrides for emco
+mongo:
+ nameOverride: emco-mongo
+ service:
+ name: emco-mongo
+ internalPort: 27017
+ nfsprovisionerPrefix: emco
+ sdnctlPrefix: emco
+ persistence:
+ mountSubPath: emco/mongo/data
+ enabled: true
+ disableNfsProvisioner: true
+
+#etcd chart overrides for k8splugin
+etcd:
+ nameOverride: emco-etcd
+ service:
+ name: emco-etcd
+ persistence:
+ mountSubPath: emco/etcd/data
+ enabled: true
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/emco-tools/Chart.yaml b/deployments/helm/v2/onap4k8s/emco-tools/Chart.yaml
new file mode 100644
index 00000000..576f55f4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-tools/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Multicluster Edge Orchestrator Tools Package
+name: emco-tools
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/emco-tools/requirements.yaml b/deployments/helm/v2/onap4k8s/emco-tools/requirements.yaml
new file mode 100644
index 00000000..ddb91c51
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-tools/requirements.yaml
@@ -0,0 +1,21 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
+ - name: fluentd
+ version: ~1.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/emco-tools/values.yaml b/deployments/helm/v2/onap4k8s/emco-tools/values.yaml
new file mode 100644
index 00000000..359d73bc
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco-tools/values.yaml
@@ -0,0 +1,65 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+#Mongo chart overrides for emco
+mongo:
+ nameOverride: emco-mongo
+ service:
+ name: emco-mongo
+ internalPort: 27017
+ nfsprovisionerPrefix: emco
+ sdnctlPrefix: emco
+ persistence:
+ mountSubPath: emco/mongo/data
+ enabled: true
+ disableNfsProvisioner: true
+
+#etcd chart overrides for k8splugin
+etcd:
+ nameOverride: emco-etcd
+ service:
+ name: emco-etcd
+ persistence:
+ mountSubPath: emco/etcd/data
+ enabled: true
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/emco/Chart.yaml b/deployments/helm/v2/onap4k8s/emco/Chart.yaml
new file mode 100644
index 00000000..d14197ff
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Multicluster Edge Orchestrator
+name: emco
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/emco/requirements.yaml b/deployments/helm/v2/onap4k8s/emco/requirements.yaml
new file mode 100644
index 00000000..21649c38
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco/requirements.yaml
@@ -0,0 +1,25 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: emco-db
+ version: ~0.x-0
+ repository: '@local'
+ - name: emco-tools
+ version: ~0.x-0
+ repository: '@local'
+ - name: emco-services
+ version: ~0.x-0
+ repository: '@local'
+
diff --git a/deployments/helm/v2/onap4k8s/emco/values.yaml b/deployments/helm/v2/onap4k8s/emco/values.yaml
new file mode 100644
index 00000000..b0078f38
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/emco/values.yaml
@@ -0,0 +1,25 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
diff --git a/deployments/helm/v2/onap4k8s/etcd/.helmignore b/deployments/helm/v2/onap4k8s/etcd/.helmignore
new file mode 100644
index 00000000..f0c13194
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/.helmignore
@@ -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/deployments/helm/v2/onap4k8s/etcd/Chart.yaml b/deployments/helm/v2/onap4k8s/etcd/Chart.yaml
new file mode 100644
index 00000000..210b3279
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/Chart.yaml
@@ -0,0 +1,24 @@
+# Copyright © 2019 Intel Corporation
+#
+# 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
+name: etcd
+home: https://github.com/coreos/etcd
+version: 3.2.26
+appVersion: 2.2.5
+description: Distributed reliable key-value store for the most critical data of a
+ distributed system.
+-icon: https://raw.githubusercontent.com/coreos/etcd/master/logos/etcd-horizontal-color.png
+sources:
+- https://github.com/coreos/etcd
diff --git a/deployments/helm/v2/onap4k8s/etcd/requirements.yaml b/deployments/helm/v2/onap4k8s/etcd/requirements.yaml
new file mode 100644
index 00000000..d71b975c
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 Orange
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/etcd/templates/pv.yaml b/deployments/helm/v2/onap4k8s/etcd/templates/pv.yaml
new file mode 100644
index 00000000..f0cf59ce
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/templates/pv.yaml
@@ -0,0 +1,27 @@
+{{ if .Values.persistence.enabled }}
+{{- $root := . -}}
+{{ range $i, $e := until (int $root.Values.replicaCount) }}
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: {{ include "common.fullname" $root }}-data-{{ $i }}
+ namespace: {{ $root.Release.Namespace }}
+ labels:
+ type: {{ $root.Values.persistence.storageType }}
+ app: {{ include "common.fullname" $root }}
+ chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
+ release: {{ $root.Release.Name }}
+ heritage: {{ $root.Release.Service }}
+spec:
+ capacity:
+ storage: {{ $root.Values.persistence.storage }}
+ accessModes:
+ - {{ $root.Values.persistence.accessMode }}
+ storageClassName: "{{ include "common.fullname" $root }}-data"
+ hostPath:
+ path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }}
+ persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
+{{ end }}
+{{ end }}
+
diff --git a/deployments/helm/v2/onap4k8s/etcd/templates/service.yaml b/deployments/helm/v2/onap4k8s/etcd/templates/service.yaml
new file mode 100644
index 00000000..692faa9f
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/templates/service.yaml
@@ -0,0 +1,37 @@
+# Copyright 2019 Intel Corporation Inc
+#
+# 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:
+ annotations:
+ service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
+metadata:
+ name: {{ include "common.servicename" . }}
+ labels:
+ heritage: "{{ .Release.Service }}"
+ release: "{{ .Release.Name }}"
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ app: {{ include "common.name" . }}
+spec:
+ ports:
+ - name: {{ .Values.service.peerPortName }}
+ port: {{ .Values.service.peerInternalPort }}
+ - name: {{ .Values.service.clientPortName }}
+ port: {{ .Values.service.clientInternalPort }}
+ clusterIP: None
+ selector:
+ app: {{ include "common.name" . }}
+ release: "{{ .Release.Name }}"
+
diff --git a/deployments/helm/v2/onap4k8s/etcd/templates/statefulset.yaml b/deployments/helm/v2/onap4k8s/etcd/templates/statefulset.yaml
new file mode 100644
index 00000000..d0387f8e
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/templates/statefulset.yaml
@@ -0,0 +1,236 @@
+# Copyright © 2019 Intel Corporation Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ include "common.fullname" . }}
+ labels:
+ heritage: "{{ .Release.Service }}"
+ release: "{{ .Release.Name }}"
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ app: {{ include "common.name" . }}
+spec:
+ serviceName: {{ include "common.servicename" .}}
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ release: "{{ .Release.Name }}"
+ app: {{ include "common.name" . }}
+ template:
+ metadata:
+ labels:
+ release: "{{ .Release.Name }}"
+ app: {{ include "common.name" . }}
+ spec:
+{{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 8 }}
+{{- end }}
+{{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
+{{- end }}
+{{- if .Values.tolerations }}
+ tolerations:
+{{ toYaml .Values.tolerations | indent 8 }}
+{{- end }}
+ containers:
+ - name: {{ include "common.fullname" . }}
+ image: "{{ .Values.repository }}/{{ .Values.image }}"
+ imagePullPolicy: "{{ .Values.pullPolicy }}"
+ ports:
+ - containerPort: {{ .Values.service.peerInternalPort }}
+ name: {{ .Values.service.peerPortName }}
+ - containerPort: {{ .Values.service.clientInternalPort }}
+ name: {{ .Values.service.clientPortName }}
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.clientInternalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+ {{ end }}
+ resources:
+{{ include "common.resources" . | indent 10 }}
+ env:
+ - name: INITIAL_CLUSTER_SIZE
+ value: {{ .Values.replicaCount | quote }}
+ - name: SET_NAME
+ value: {{ include "common.fullname" . }}
+ - name: SERVICE_NAME
+ value: {{ include "common.servicename" . }}
+{{- if .Values.extraEnv }}
+{{ toYaml .Values.extraEnv | indent 8 }}
+{{- end }}
+ lifecycle:
+ preStop:
+ exec:
+ command:
+ - "/bin/sh"
+ - "-ec"
+ - |
+ EPS=""
+ for i in $(seq 0 $((${INITIAL_CLUSTER_SIZE} - 1))); do
+ EPS="${EPS}${EPS:+,}http://${SET_NAME}-${i}.${SERVICE_NAME}:2379"
+ done
+
+ HOSTNAME=$(hostname)
+
+ member_hash() {
+ etcdctl member list | grep http://${HOSTNAME}.${SERVICE_NAME}:2380 | cut -d':' -f1 | cut -d'[' -f1
+ }
+
+ SET_ID=${HOSTNAME##*[^0-9]}
+
+ if [ "${SET_ID}" -ge ${INITIAL_CLUSTER_SIZE} ]; then
+ echo "Removing ${HOSTNAME} from etcd cluster"
+ ETCDCTL_ENDPOINT=${EPS} etcdctl member remove $(member_hash)
+ if [ $? -eq 0 ]; then
+ # Remove everything otherwise the cluster will no longer scale-up
+ rm -rf /var/run/etcd/*
+ fi
+ fi
+ command:
+ - "/bin/sh"
+ - "-ec"
+ - |
+ HOSTNAME=$(hostname)
+
+ # store member id into PVC for later member replacement
+ collect_member() {
+ while ! etcdctl member list &>/dev/null; do sleep 1; done
+ etcdctl member list | grep http://${HOSTNAME}.${SERVICE_NAME}:2380 | cut -d':' -f1 | cut -d'[' -f1 > /var/run/etcd/member_id
+ exit 0
+ }
+
+ eps() {
+ EPS=""
+ for i in $(seq 0 $((${INITIAL_CLUSTER_SIZE} - 1))); do
+ EPS="${EPS}${EPS:+,}http://${SET_NAME}-${i}.${SERVICE_NAME}:2379"
+ done
+ echo ${EPS}
+ }
+
+ member_hash() {
+ etcdctl member list | grep http://${HOSTNAME}.${SERVICE_NAME}:2380 | cut -d':' -f1 | cut -d'[' -f1
+ }
+
+ # we should wait for other pods to be up before trying to join
+ # otherwise we got "no such host" errors when trying to resolve other members
+ for i in $(seq 0 $((${INITIAL_CLUSTER_SIZE} - 1))); do
+ while true; do
+ echo "Waiting for ${SET_NAME}-${i}.${SERVICE_NAME} to come up"
+ ping -W 1 -c 1 ${SET_NAME}-${i}.${SERVICE_NAME} > /dev/null && break
+ sleep 1s
+ done
+ done
+
+ # re-joining after failure?
+ if [[ -e /var/run/etcd/default.etcd && -f /var/run/etcd/member_id ]]; then
+ echo "Re-joining etcd member"
+ member_id=$(cat /var/run/etcd/member_id)
+
+ # re-join member
+ ETCDCTL_ENDPOINT=$(eps) etcdctl member update ${member_id} http://${HOSTNAME}.${SERVICE_NAME}:2380 | true
+ exec etcd --name ${HOSTNAME} \
+ --listen-peer-urls http://0.0.0.0:2380 \
+ --listen-client-urls http://0.0.0.0:2379\
+ --advertise-client-urls http://${HOSTNAME}.${SERVICE_NAME}:2379 \
+ --data-dir /var/run/etcd/default.etcd
+ fi
+
+ # etcd-SET_ID
+ SET_ID=${HOSTNAME##*[^0-9]}
+
+ # adding a new member to existing cluster (assuming all initial pods are available)
+ if [ "${SET_ID}" -ge ${INITIAL_CLUSTER_SIZE} ]; then
+ export ETCDCTL_ENDPOINT=$(eps)
+
+ # member already added?
+ MEMBER_HASH=$(member_hash)
+ if [ -n "${MEMBER_HASH}" ]; then
+ # the member hash exists but for some reason etcd failed
+ # as the datadir has not be created, we can remove the member
+ # and retrieve new hash
+ etcdctl member remove ${MEMBER_HASH}
+ fi
+
+ echo "Adding new member"
+ etcdctl member add ${HOSTNAME} http://${HOSTNAME}.${SERVICE_NAME}:2380 | grep "^ETCD_" > /var/run/etcd/new_member_envs
+
+ if [ $? -ne 0 ]; then
+ echo "Exiting"
+ rm -f /var/run/etcd/new_member_envs
+ exit 1
+ fi
+
+ cat /var/run/etcd/new_member_envs
+ source /var/run/etcd/new_member_envs
+
+ collect_member &
+
+ exec etcd --name ${HOSTNAME} \
+ --listen-peer-urls http://0.0.0.0:2380 \
+ --listen-client-urls http://0.0.0.0:2379 \
+ --advertise-client-urls http://${HOSTNAME}.${SERVICE_NAME}:2379 \
+ --data-dir /var/run/etcd/default.etcd \
+ --initial-advertise-peer-urls http://${HOSTNAME}.${SERVICE_NAME}:2380 \
+ --initial-cluster ${ETCD_INITIAL_CLUSTER} \
+ --initial-cluster-state ${ETCD_INITIAL_CLUSTER_STATE}
+ fi
+
+ PEERS=""
+ for i in $(seq 0 $((${INITIAL_CLUSTER_SIZE} - 1))); do
+ PEERS="${PEERS}${PEERS:+,}${SET_NAME}-${i}=http://${SET_NAME}-${i}.${SERVICE_NAME}:2380"
+ done
+
+ collect_member &
+
+ # join member
+ exec etcd --name ${HOSTNAME} \
+ --initial-advertise-peer-urls http://${HOSTNAME}.${SERVICE_NAME}:2380 \
+ --listen-peer-urls http://0.0.0.0:2380 \
+ --listen-client-urls http://0.0.0.0:2379 \
+ --advertise-client-urls http://${HOSTNAME}.${SERVICE_NAME}:2379 \
+ --initial-cluster-token etcd-cluster-1 \
+ --initial-cluster ${PEERS} \
+ --initial-cluster-state new \
+ --data-dir /var/run/etcd/default.etcd
+ volumeMounts:
+ - name: {{ include "common.fullname" . }}-data
+ mountPath: /var/run/etcd
+ {{- if .Values.persistence.enabled }}
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "common.fullname" . }}-data
+ spec:
+ accessModes:
+ - "{{ .Values.persistence.accessMode }}"
+ resources:
+ requests:
+ # upstream recommended max is 700M
+ storage: "{{ .Values.persistence.storage }}"
+ storageClassName: {{ include "common.fullname" . }}-data
+ {{- else }}
+ volumes:
+ - name: {{ include "common.fullname" . }}-data
+ {{- if .Values.memoryMode }}
+ emptyDir:
+ medium: Memory
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ {{- end }}
+
diff --git a/deployments/helm/v2/onap4k8s/etcd/values.yaml b/deployments/helm/v2/onap4k8s/etcd/values.yaml
new file mode 100644
index 00000000..226b4594
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/etcd/values.yaml
@@ -0,0 +1,75 @@
+# Copyright © 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+#repository: etcd
+repository: "k8s.gcr.io"
+image: "etcd-amd64:3.2.26"
+pullPolicy: Always
+
+# default number of instances in the StatefulSet
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 90
+ periodSeconds: 30
+ timeoutSeconds: 5
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+persistence:
+ enabled: false
+ volumeReclaimPolicy: Retain
+ accessMode: ReadWriteMany
+ storage: 1Gi
+ mountPath: /dockerdata-nfs
+ mountSubPath: "etcd/data"
+
+## This is only available when persistentVolume is false:
+## If persistentVolume is not enabled, one can choose to use memory mode for ETCD by setting memoryMode to "true".
+## The system will create a volume with "medium: Memory"
+memoryMode: false
+
+service:
+ name: emco-etcd
+ peerInternalPort: 2380
+ peerPortName: etcd-server
+ clientInternalPort : 2379
+ clientPortName: etcd-client
+
+## Node labels and tolerations for pod assignment
+## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
+## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
+nodeSelector: {}
+tolerations: []
+affinity: {}
+extraEnv: []
+resources: {}
+
diff --git a/deployments/helm/v2/onap4k8s/fluentd/.helmignore b/deployments/helm/v2/onap4k8s/fluentd/.helmignore
new file mode 100644
index 00000000..f0c13194
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/.helmignore
@@ -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/deployments/helm/v2/onap4k8s/fluentd/Chart.yaml b/deployments/helm/v2/onap4k8s/fluentd/Chart.yaml
new file mode 100644
index 00000000..9885c28c
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/Chart.yaml
@@ -0,0 +1,19 @@
+apiVersion: v1
+appVersion: 1.10.2
+description: Fluentd is an open source data collector for unified logging layer
+engine: gotpl
+home: https://www.fluentd.org/
+icon: https://bitnami.com/assets/stacks/fluentd/img/fluentd-stack-110x117.png
+keywords:
+- fluentd
+- logging
+- logs
+- data
+- collector
+maintainers:
+- email: containers@bitnami.com
+ name: Bitnami
+name: fluentd
+sources:
+- https://github.com/bitnami/bitnami-docker-fluentd
+version: 1.0.3
diff --git a/deployments/helm/v2/onap4k8s/fluentd/README.md b/deployments/helm/v2/onap4k8s/fluentd/README.md
new file mode 100644
index 00000000..ac07a7f2
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/README.md
@@ -0,0 +1,294 @@
+# Fluentd
+
+[Fluentd](https://www.fluentd.org/) is an open source data collector, which lets you unify the data collection and consumption for a better use and understanding of data.
+
+## TL;DR;
+
+```console
+$ helm repo add bitnami https://charts.bitnami.com/bitnami
+$ helm install my-release bitnami/fluentd
+```
+
+## Introduction
+
+This chart bootstraps a [Fluentd](https://github.com/bitnami/bitnami-docker-fluentd) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
+
+Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
+
+## Prerequisites
+
+- Kubernetes 1.12+
+- Helm 2.11+ or Helm 3.0-beta3+
+- PV provisioner support in the underlying infrastructure
+
+> Note: Please, note that the forwarder runs the container as root by default setting the `forwarder.securityContext.runAsUser` to `0` (_root_ user)
+
+## Installing the Chart
+
+To install the chart with the release name `my-release`:
+
+```console
+$ helm repo add bitnami https://charts.bitnami.com/bitnami
+$ helm install my-release bitnami/fluentd
+```
+
+These commands deploy Fluentd on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) 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` resources:
+
+```console
+$ helm delete my-release
+```
+
+The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option `--purge` to delete all history too.
+
+## Parameters
+
+The following tables lists the configurable parameters of the kibana chart and their default values.
+
+| Parameter | Description | Default |
+|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|
+| `global.imageRegistry` | Global Docker image registry | `nil` |
+| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
+| `image.registry` | Fluentd image registry | `docker.io` |
+| `image.repository` | Fluentd image name | `bitnami/fluentd` |
+| `image.tag` | Fluentd image tag | `{TAG_NAME}` |
+| `image.pullPolicy` | Fluentd image pull policy | `IfNotPresent` |
+| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
+| `nameOverride` | String to partially override fluentd.fullname template with a string (will prepend the release name) | `nil` |
+| `fullnameOverride` | String to fully override fluentd.fullname template with a string | `nil` |
+| `clusterDomain` | Kubernetes DNS domain name to use | `cluster.local` |
+| `forwarder.enabled` | Enable Fluentd forwarder | `true` |
+| `forwarder.daemonUser` | Fluentd forwarder daemon system user | `root` |
+| `forwarder.daemonGroup` | Fluentd forwarder daemon system group | `root` |
+| `forwarder.securityContext.enabled` | Enable security context for forwarder pods | `true` |
+| `forwarder.securityContext.fsGroup` | Group ID for forwarder's containers filesystem | `0` |
+| `forwarder.securityContext.runAsUser` | User ID for forwarder's containers | `0` |
+| `forwarder.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
+| `forwarder.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
+| `forwarder.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
+| `forwarder.extraEnv` | Extra environment variables to pass to the container | `[]` |
+| `forwarder.containerPorts` | Ports the forwarder containers will listen on | `Check values.yaml` |
+| `forwarder.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the forwarders | `ClusterIP` |
+| `forwarder.service.ports` | Array containing the forwarder service ports | `Check values.yaml file` |
+| `forwarder.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
+| `forwarder.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `forwarder.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
+| `forwarder.service.annotations` | Annotations for the forwarder service | `{}` |
+| `forwarder.livenessProbe.enabled` | Enable liveness probes for the forwarder | `true` |
+| `forwarder.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
+| `forwarder.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `forwarder.livenessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `forwarder.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `forwarder.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `forwarder.readinessProbe.enabled` | Enable readiness probes for the forwarder | `true` |
+| `forwarder.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
+| `forwarder.readinessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `forwarder.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `forwarder.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `forwarder.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `forwarder.updateStrategy` | Update strategy for the forwarder DaemonSet | `RollingUpdate` |
+| `forwarder.resources` | Configure resource requests and limits | `nil` |
+| `forwarder.nodeSelector` | Node labels for pod assignment | `{}` |
+| `forwarder.tolerations` | Tolerations for pod assignment | `[]` |
+| `forwarder.affinity` | Affinity for pod assignment | `{}` |
+| `forwarder.podAnnotations` | Pod annotations | `{}` |
+| `aggregator.enabled` | Enable Fluentd aggregator | `true` |
+| `aggregator.replicaCount` | Number of aggregator pods to deploy in the Stateful Set | `2` |
+| `aggregator.securityContext.enabled` | Enable security context for aggregator pods | `true` |
+| `aggregator.securityContext.fsGroup` | Group ID for aggregator's containers filesystem | `1001` |
+| `aggregator.securityContext.runAsUser` | User ID for aggregator's containers | `1001` |
+| `aggregator.configFile` | Name of the config file that will be used by Fluentd at launch under the `/opt/bitnami/fluentd/conf` directory | `fluentd.conf` |
+| `aggregator.configMap` | Name of the config map that contains the Fluentd configuration files | `nil` |
+| `aggregator.port` | Kubernetes Service port - Fluentd transport port for the aggregators | `24224` |
+| `aggregator.extraArgs` | Extra arguments for the Fluentd command line | `nil` |
+| `aggregator.extraEnv` | Extra environment variables to pass to the container | `[]` |
+| `aggregator.containerPorts` | Ports the aggregator containers will listen on | `Check values.yaml` |
+| `aggregator.service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) for the aggregators | `ClusterIP` |
+| `aggregator.service.ports` | Array containing the aggregator service ports | `Check values.yaml file` |
+| `aggregator.service.loadBalancerIP` | loadBalancerIP if service type is `LoadBalancer` | `nil` |
+| `aggregator.service.loadBalancerSourceRanges` | Addresses that are allowed when service is LoadBalancer | `[]` |
+| `aggregator.service.clusterIP` | Static clusterIP or None for headless services | `nil` |
+| `aggregator.service.annotations` | Annotations for the aggregator service | `{}` |
+| `aggregator.persistence.enabled` | Enable persistence volume for the aggregator | `false` |
+| `aggregator.persistence.storageClass` | Persistent Volume storage class | `nil` |
+| `aggregator.persistence.accessMode` | Persistent Volume access mode | `ReadWriteOnce` |
+| `aggregator.persistence.size` | Persistent Volume size | `10Gi` |
+| `aggregator.livenessProbe.enabled` | Enable liveness probes for the aggregator | `true` |
+| `aggregator.livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `60` |
+| `aggregator.livenessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `aggregator.livenessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `aggregator.livenessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `aggregator.livenessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `aggregator.readinessProbe.enabled` | Enable readiness probes for the aggregator | `true` |
+| `aggregator.readinessProbe.initialDelaySeconds` | Delay before readiness probe is initiated | `5` |
+| `aggregator.readinessProbe.periodSeconds` | How often to perform the probe | `10` |
+| `aggregator.readinessProbe.timeoutSeconds` | When the probe times out | `5` |
+| `aggregator.readinessProbe.failureThreshold` | Minimum consecutive failures for the probe to be considered failed after having succeeded. | `6` |
+| `aggregator.readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
+| `aggregator.updateStrategy` | Update strategy for the aggregator DaemonSet | `RollingUpdate` |
+| `aggregator.resources` | Configure resource requests and limits | `nil` |
+| `aggregator.nodeSelector` | Node labels for pod assignment | `{}` |
+| `aggregator.tolerations` | Tolerations for pod assignment | `[]` |
+| `aggregator.affinity` | Affinity for pod assignment | `{}` |
+| `aggregator.podAnnotations` | Pod annotations | `{}` |
+| `serviceAccount.create` | Specify whether a ServiceAccount should be created | `true` |
+| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `fluentd.fullname` template |
+| `rbac.create` | Specify whether RBAC resources should be created and used | `true` |
+| `metrics.enabled` | Enable the export of Prometheus metrics | `nil` |
+| `metrics.service.type` | Prometheus metrics service type | `ClusterIP` |
+| `metrics.service.loadBalancerIP` | Load Balancer IP if the Prometheus metrics server type is `LoadBalancer` | `nil` |
+| `metrics.service.port` | Prometheus metrics service port | `24231` |
+| `metrics.service.annotations` | Annotations for Prometheus metrics service | `{ prometheus.io/scrape: "true", prometheus.io/port: "80", prometheus.io/path: "_prometheus/metrics" }` |
+| `metrics.serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`) | `false` |
+| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `nil` |
+| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
+| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
+| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `nil` |
+| `tls.enabled` | Enable the addition of TLS certificates | `false` |
+| `tls.caCertificate` | Ca certificate | Certificate Authority (CA) bundle content |
+| `tls.serverCertificate` | Server certificate | Server certificate content |
+| `tls.serverKey` | Server Key | Server private key content |
+| `tls.existingSecret` | Existing secret with certificate content | `nil` |
+Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
+
+```console
+$ helm install my-release \
+ --set aggregator.port=24444 bitnami/fluentd
+```
+
+The above command sets the aggregators to listen on port 24444.
+
+Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
+
+```console
+$ helm install my-release -f values.yaml bitnami/fluentd
+```
+
+> **Tip**: You can use the default [values.yaml](values.yaml)
+
+## Configuration and installation details
+
+### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
+
+It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
+
+Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
+
+### Production configuration and horizontal scaling
+
+This chart includes a `values-production.yaml` file where you can find some parameters oriented to production configuration in comparison to the regular `values.yaml`. You can use this file instead of the default one.
+
+- Number of aggregator nodes:
+```diff
+- aggregator.replicaCount: 1
++ aggregator.replicaCount: 2
+```
+
+- Enable prometheus to access fluentd metrics endpoint:
+```diff
+- metrics.enabled: false
++ metrics.enabled: true
+```
+
+To horizontally scale this chart once it has been deployed, you can upgrade the deployment using a new value for the `aggregator.replicaCount` parameter.
+
+### Forwarding the logs to another service
+
+By default, the aggregators in this chart will send the processed logs to the standard output. However, a common practice is to send them to another service, like Elasticsearch, instead. This can be achieved with this Helm Chart by mounting your own configuration files. For example:
+
+**configmap.yaml**
+
+```yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: elasticsearch-output
+data:
+ fluentd.conf: |
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </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>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # TCP input to receive logs from the forwarders
+ <source>
+ @type forward
+ bind 0.0.0.0
+ port {{ .Values.aggregator.port }}
+ </source>
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ bind 0.0.0.0
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Send the logs to the standard output
+ <match **>
+ @type elasticsearch
+ include_tag_key true
+ host "#{ENV['ELASTICSEARCH_HOST']}"
+ port "#{ENV['ELASTICSEARCH_PORT']}"
+ logstash_format true
+
+ <buffer>
+ @type file
+ path /opt/bitnami/fluentd/logs/buffers/logs.buffer
+ flush_thread_count 2
+ flush_interval 5s
+ </buffer>
+ </match>
+```
+
+As an example, using the above configmap, you should specify the required parameters when upgrading or installing the chart:
+
+```console
+aggregator.configMap=elasticsearch-output
+aggregator.extraEnv[0].name=ELASTICSEARCH_HOST
+aggregator.extraEnv[0].value=your-ip-here
+aggregator.extraEnv[1].name=ELASTICSEARCH_PORT
+aggregator.extraEnv[1].value=your-port-here
+```
+
+### Notable changes
+
+## 1.0.0
+
+In this version of the chart the Fluentd forwarder daemon system user will be root by default. This is done to ensure that mounted host paths are readable by the forwarder. For more context, check this [support case](https://github.com/bitnami/charts/issues/1905).
+
+No issues are expected in the upgrade process. However, please ensure that you add extra security measures in your cluster as you will be running root containers. If you want the daemon to be run as a user different from root, you can change the `forwarder.daemonUser` and `forwarder.daemonGroup` values. In this case make sure that the user you choose has sufficient permissions to read log files under `/var/lib/docker/containers` directory.
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/NOTES.txt b/deployments/helm/v2/onap4k8s/fluentd/templates/NOTES.txt
new file mode 100644
index 00000000..eea7a2aa
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/NOTES.txt
@@ -0,0 +1,30 @@
+** Please be patient while the chart is being deployed **
+
+ To verify that Fluentd has started, run:
+
+ kubectl get all -l "app.kubernetes.io/name={{ include "fluentd.name" . }},app.kubernetes.io/instance={{ .Release.Name }}"
+{{ if and .Values.aggregator.enabled .Values.forwarder.enabled (not .Values.aggregator.configMap) }}
+ Logs are captured on each node by the forwarder pods and then sent to the aggregator pods. By default, the aggregator pods send the logs to the standard output.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=aggregator"
+
+ You can mount your own configuration files to the aggregators and the forwarders. For example, this is useful if you want to forward the aggregated logs to Elasticsearch or another service.
+{{- else if and .Values.aggregator.enabled (not .Values.forwarder.enabled) }}
+ You have deployed Fluentd in aggregator-only mode. Logs received by the aggregator will be thrown to the standard output by default.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=aggregator"
+
+ You can mount your own configuration files to the aggregators. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
+{{- else if and (not .Values.aggregator.enabled) (not .Values.forwarder.configMap) }}
+ Logs are captured on each node by the forwarder pods and sent to the standard output by default.
+ You can see all the logs by running this command:
+
+ kubectl logs -l "app.kubernetes.io/component=forwarder"
+
+ You can mount your own configuration files to the forwarders. For example, this is useful if you want to forward the logs to Elasticsearch or another service.
+{{- end }}
+
+{{- include "fluentd.validateValues" . }}
+{{- include "fluentd.checkRollingTags" . -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/_helpers.tpl b/deployments/helm/v2/onap4k8s/fluentd/templates/_helpers.tpl
new file mode 100644
index 00000000..f72f6e33
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/_helpers.tpl
@@ -0,0 +1,188 @@
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "fluentd.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 "fluentd.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 "fluentd.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/*
+Common labels
+*/}}
+{{- define "fluentd.labels" -}}
+app.kubernetes.io/name: {{ include "fluentd.name" . }}
+helm.sh/chart: {{ include "fluentd.chart" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{/*
+Labels to use on daemonset.spec.selector.matchLabels, statefulset.spec.selector.matchLabels and svc.spec.selector
+*/}}
+{{- define "fluentd.matchLabels" -}}
+app.kubernetes.io/name: {{ include "fluentd.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{/*
+Return the proper Fluentd image name
+*/}}
+{{- define "fluentd.image" -}}
+{{- $registryName := .Values.image.registry -}}
+{{- $repositoryName := .Values.image.repository -}}
+{{- $tag := .Values.image.tag | toString -}}
+{{/*
+Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
+but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic.
+Also, we can't use a single if because lazy evaluation is not an option
+*/}}
+{{- if .Values.global.imageRegistry }}
+ {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}}
+{{- else -}}
+ {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Return the proper Docker Image Registry Secret Names
+*/}}
+{{- define "fluentd.imagePullSecrets" -}}
+{{/*
+Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
+but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
+Also, we can not use a single if because lazy evaluation is not an option
+*/}}
+{{- if .Values.global.imagePullSecrets }}
+imagePullSecrets:
+{{- range .Values.global.imagePullSecrets }}
+ - name: {{ . }}
+{{- end }}
+{{- else if .Values.image.pullSecrets }}
+imagePullSecrets:
+{{- range .Values.image.pullSecrets }}
+ - name: {{ . }}
+{{- end }}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "fluentd.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create -}}
+ {{ default (include "fluentd.fullname" .) .Values.serviceAccount.name }}
+{{- else -}}
+ {{ default "default" .Values.serviceAccount.name }}
+{{- end -}}
+{{- end -}}
+
+{{/* Check if there are rolling tags in the images */}}
+{{- define "fluentd.checkRollingTags" -}}
+{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
+WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
++info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
+{{- end }}
+{{- end -}}
+
+{{/*
+Validate data
+*/}}
+{{- define "fluentd.validateValues" -}}
+{{- $messages := list -}}
+{{- $messages := append $messages (include "fluentd.validateValues.deployment" .) -}}
+{{- $messages := append $messages (include "fluentd.validateValues.rbac" .) -}}
+{{- $messages := without $messages "" -}}
+{{- $message := join "\n" $messages -}}
+ {{- if $message -}}
+{{- printf "\nVALUES VALIDATION:\n%s" $message | fail -}}
+{{- end -}}
+{{- end -}}
+
+{{/* Validate values of Fluentd - forwarders and aggregators can't be disabled at the same time */}}
+{{- define "fluentd.validateValues.deployment" -}}
+{{- if and (not .Values.forwarder.enabled) (not .Values.aggregator.enabled) -}}
+fluentd:
+ You have disabled both the forwarders and the aggregators.
+ Please enable at least one of them (--set forwarder.enabled=true) (--set aggregator.enabled=true)
+{{- end -}}
+{{- end -}}
+
+{{/* Validate values of Fluentd - must create serviceAccount to create enable RBAC */}}
+{{- define "fluentd.validateValues.rbac" -}}
+{{- if and .Values.rbac.create (not .Values.serviceAccount.create) -}}
+fluentd: rbac.create
+ A ServiceAccount is required ("rbac.create=true" is set)
+ Please create a ServiceAccount (--set serviceAccount.create=true)
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the forwarder configmap name.
+*/}}
+{{- define "fluentd.forwarder.configMap" -}}
+{{- if .Values.forwarder.configMap -}}
+ {{- printf "%s" (tpl .Values.forwarder.configMap $) -}}
+{{- else -}}
+ {{- printf "%s-forwarder-cm" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the aggregator configmap name.
+*/}}
+{{- define "fluentd.aggregator.configMap" -}}
+{{- if .Values.aggregator.configMap -}}
+ {{- printf "%s" (tpl .Values.aggregator.configMap $) -}}
+{{- else -}}
+ {{- printf "%s-aggregator-cm" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Get the certificates secret name.
+*/}}
+{{- define "fluentd.tls.secretName" -}}
+{{- if .Values.tls.existingSecret -}}
+ {{- printf "%s" (tpl .Values.tls.existingSecret $) -}}
+{{- else -}}
+ {{- printf "%s-tls" (include "fluentd.fullname" . ) -}}
+{{- end -}}
+{{- end -}}
+
+{{/*
+Renders a value that contains template.
+Usage:
+{{ include "fluentd.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
+*/}}
+{{- define "fluentd.tplValue" -}}
+ {{- if typeIs "string" .value }}
+ {{- tpl .value .context }}
+ {{- else }}
+ {{- tpl (.value | toYaml) .context }}
+ {{- end }}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-configmap.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-configmap.yaml
new file mode 100644
index 00000000..885e3b99
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-configmap.yaml
@@ -0,0 +1,65 @@
+{{- if and .Values.aggregator.enabled (not .Values.aggregator.configMap) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "fluentd.fullname" . }}-aggregator-cm
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+data:
+ fluentd.conf: |
+ {{- if .Values.metrics.enabled -}}
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </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>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # TCP input to receive logs from
+ {{- if and .Values.aggregator.port }}
+ <source>
+ @type forward
+ bind 0.0.0.0
+ port {{ .Values.aggregator.port }}
+ </source>
+ {{- end }}
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ bind 0.0.0.0
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Send the logs to the standard output
+ <match **>
+ @type stdout
+ </match>
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-statefulset.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-statefulset.yaml
new file mode 100644
index 00000000..40957cf2
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-statefulset.yaml
@@ -0,0 +1,135 @@
+{{- if .Values.aggregator.enabled -}}
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ app.kubernetes.io/component: aggregator
+ serviceName: {{ include "fluentd.fullname" . }}-headless
+ replicas: {{ .Values.aggregator.replicaCount }}
+ updateStrategy: {{- toYaml .Values.aggregator.updateStrategy | nindent 4 }}
+ template:
+ metadata:
+ labels: {{- include "fluentd.labels" . | nindent 8 }}
+ app.kubernetes.io/component: aggregator
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/aggregator-configmap.yaml") . | sha256sum }}
+ {{- if .Values.aggregator.podAnnotations }}
+ {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+ {{- include "fluentd.imagePullSecrets" . | nindent 6 }}
+ {{- if .Values.aggregator.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.aggregator.securityContext.runAsUser }}
+ fsGroup: {{ .Values.aggregator.securityContext.fsGroup }}
+ {{- end }}
+ {{- if .Values.aggregator.affinity }}
+ affinity: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.affinity "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.nodeSelector }}
+ nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.aggregator.tolerations }}
+ tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ containers:
+ - name: fluentd
+ image: {{ include "fluentd.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
+ env:
+ - name: FLUENTD_CONF
+ value: {{ .Values.aggregator.configFile }}
+ - name: FLUENTD_OPT
+ value: {{ .Values.aggregator.extraArgs | quote }}
+ {{- if .Values.aggregator.extraEnv }}
+ {{- toYaml .Values.aggregator.extraEnv | nindent 12 }}
+ {{- end }}
+ ports:
+ {{- if .Values.aggregator.port }}
+ - name: tcp
+ containerPort: {{ .Values.aggregator.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.containerPorts }}
+ {{- toYaml .Values.aggregator.containerPorts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ containerPort: {{ .Values.metrics.service.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.aggregator.livenessProbe.enabled }}
+ livenessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.livenessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.readinessProbe.enabled }}
+ readinessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.aggregator.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.aggregator.readinessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.aggregator.readinessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.aggregator.readinessProbe.successThreshold }}
+ failureThreshold: {{ .Values.aggregator.readinessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.aggregator.resources }}
+ resources: {{- toYaml .Values.aggregator.resources | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /opt/bitnami/fluentd/conf
+ {{- if .Values.aggregator.persistence.enabled }}
+ - name: {{ include "fluentd.fullname" . }}-buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- else }}
+ - name: buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- end }}
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ mountPath: /opt/bitnami/fluentd/certs
+ {{- end }}
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ secret:
+ secretName: {{ template "fluentd.tls.secretName" . }}
+ items:
+ - key: tls.crt
+ path: tls.crt
+ - key: tls.key
+ path: tls.key
+ {{- end }}
+ - name: fluentd-config
+ configMap:
+ name: {{ template "fluentd.aggregator.configMap" . }}
+ {{- if not .Values.aggregator.persistence.enabled }}
+ - name: buffer
+ emptyDir: {}
+ {{- end }}
+
+ {{- if .Values.aggregator.persistence.enabled }}
+ volumeClaimTemplates:
+ - metadata:
+ name: {{ include "fluentd.fullname" . }}-buffer
+ spec:
+ accessModes: [{{ .Values.aggregator.persistence.accessMode }}]
+ storageClassName: {{ .Values.aggregator.persistence.storageClass }}
+ resources:
+ requests:
+ storage: {{ .Values.aggregator.persistence.size }}
+ {{- end }}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-svc.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-svc.yaml
new file mode 100644
index 00000000..4ae43793
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/aggregator-svc.yaml
@@ -0,0 +1,32 @@
+{{- if and .Values.aggregator.enabled .Values.aggregator.service.ports }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-aggregator
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+ {{- if .Values.aggregator.service.annotations }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.aggregator.service.annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.aggregator.service.type }}
+ {{- if and .Values.aggregator.service.loadBalancerIP (eq .Values.aggregator.service.type "LoadBalancer") }}
+ loadBalancerIP: {{ .Values.aggregator.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.aggregator.service.loadBalancerSourceRanges (eq .Values.aggregator.service.type "LoadBalancer") }}
+ loadBalancerSourceRanges:
+ {{- with .Values.aggregator.service.loadBalancerSourceRanges }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ {{- if and (eq .Values.aggregator.service.type "ClusterIP") .Values.aggregator.service.clusterIP }}
+ clusterIP: {{ .Values.aggregator.service.clusterIP }}
+ {{- end }}
+ ports:
+ {{- range $key, $value := .Values.aggregator.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+{{- end }} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrole.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrole.yaml
new file mode 100644
index 00000000..e4c9f50e
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrole.yaml
@@ -0,0 +1,17 @@
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+rules:
+ - apiGroups:
+ - ""
+ resources:
+ - "namespaces"
+ - "pods"
+ verbs:
+ - "get"
+ - "watch"
+ - "list"
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrolebinding.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrolebinding.yaml
new file mode 100644
index 00000000..79c36e4e
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/clusterrolebinding.yaml
@@ -0,0 +1,15 @@
+{{- if and .Values.serviceAccount.create .Values.rbac.create }}
+kind: ClusterRoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+roleRef:
+ kind: ClusterRole
+ apiGroup: rbac.authorization.k8s.io
+ name: {{ template "fluentd.fullname" . }}
+subjects:
+ - kind: ServiceAccount
+ name: {{ template "fluentd.serviceAccountName" . }}
+ namespace: {{ .Release.Namespace }}
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-configmap.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-configmap.yaml
new file mode 100644
index 00000000..4fe7a762
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-configmap.yaml
@@ -0,0 +1,108 @@
+{{- if and .Values.forwarder.enabled (not .Values.forwarder.configMap) -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "fluentd.fullname" . }}-forwarder-cm
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+data:
+ fluentd.conf: |
+ {{- if .Values.metrics.enabled -}}
+ # Prometheus Exporter Plugin
+ # input plugin that exports metrics
+ <source>
+ @type prometheus
+ port {{ .Values.metrics.service.port }}
+ </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>
+ {{- end }}
+
+ # Ignore fluentd own events
+ <match fluent.**>
+ @type null
+ </match>
+
+ # HTTP input for the liveness and readiness probes
+ <source>
+ @type http
+ port 9880
+ </source>
+
+ # Throw the healthcheck to the standard output instead of forwarding it
+ <match fluentd.healthcheck>
+ @type stdout
+ </match>
+
+ # Get the logs from the containers running in the node
+ <source>
+ @type tail
+ path /var/log/containers/*mco*.log
+ # exclude Fluentd logs
+ exclude_path /var/log/containers/*fluentd*.log
+ pos_file /opt/bitnami/fluentd/logs/buffers/fluentd-docker.pos
+ tag kubernetes.*
+ read_from_head true
+ <parse>
+ @type json
+ </parse>
+ </source>
+
+ # enrich with kubernetes metadata
+ <filter kubernetes.**>
+ @type kubernetes_metadata
+ </filter>
+ {{ if .Values.aggregator.enabled }}
+ # Forward all logs to the aggregators
+ <match **>
+ @type forward
+ {{- $fullName := (include "fluentd.fullname" .) }}
+ {{- $global := . }}
+ {{- $domain := default "cluster.local" .Values.clusterDomain }}
+ {{- $port := .Values.aggregator.port | int }}
+ {{- range $i, $e := until (.Values.aggregator.replicaCount | int) }}
+ <server>
+ {{ printf "host %s-%d.%s-headless.%s.svc.%s" $fullName $i $fullName $global.Release.Namespace $domain }}
+ {{ printf "port %d" $port }}
+ {{- if ne $i 0 }}
+ standby
+ {{- end }}
+ </server>
+ {{- end}}
+
+ <buffer>
+ @type file
+ path /opt/bitnami/fluentd/logs/buffers/logs.buffer
+ flush_thread_count 2
+ flush_interval 5s
+ </buffer>
+ </match>
+ {{- else }}
+ # Send the logs to the standard output
+ <match **>
+ @type stdout
+ </match>
+ {{- end -}}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-daemonset.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-daemonset.yaml
new file mode 100644
index 00000000..7c6e44df
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-daemonset.yaml
@@ -0,0 +1,125 @@
+{{- if .Values.forwarder.enabled }}
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ app.kubernetes.io/component: forwarder
+ updateStrategy: {{- toYaml .Values.forwarder.updateStrategy | nindent 4 }}
+ template:
+ metadata:
+ labels: {{- include "fluentd.labels" . | nindent 8 }}
+ app.kubernetes.io/component: forwarder
+ annotations:
+ checksum/config: {{ include (print $.Template.BasePath "/forwarder-configmap.yaml") . | sha256sum }}
+ {{- if .Values.forwarder.podAnnotations }}
+ {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.podAnnotations "context" $) | nindent 8 }}
+ {{- end }}
+ spec:
+{{- include "fluentd.imagePullSecrets" . | nindent 6 }}
+ serviceAccountName: {{ template "fluentd.serviceAccountName" . }}
+ {{- if .Values.forwarder.affinity }}
+ affinity: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.affinity "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.nodeSelector }}
+ nodeSelector: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.nodeSelector "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.tolerations }}
+ tolerations: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.tolerations "context" $) | nindent 8 }}
+ {{- end }}
+ {{- if .Values.forwarder.securityContext.enabled }}
+ securityContext:
+ runAsUser: {{ .Values.forwarder.securityContext.runAsUser }}
+ fsGroup: {{ .Values.forwarder.securityContext.fsGroup }}
+ {{- end }}
+ containers:
+ - name: fluentd
+ image: {{ include "fluentd.image" . }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ env:
+ - name: FLUENTD_CONF
+ value: {{ .Values.forwarder.configFile }}
+ - name: FLUENTD_OPT
+ value: {{ .Values.forwarder.extraArgs | quote }}
+ - name: FLUENTD_DAEMON_USER
+ value: {{ .Values.forwarder.daemonUser | quote }}
+ - name: FLUEND_DAEMON_GROUP
+ value: {{ .Values.forwarder.daemonGroup | quote }}
+ {{- if .Values.forwarder.extraEnv }}
+ {{- toYaml .Values.forwarder.extraEnv | nindent 12 }}
+ {{- end }}
+ ports:
+ {{- if .Values.forwarder.containerPorts }}
+ {{- toYaml .Values.forwarder.containerPorts | nindent 12 }}
+ {{- end }}
+ {{- if .Values.metrics.enabled }}
+ - name: metrics
+ containerPort: {{ .Values.metrics.service.port }}
+ protocol: TCP
+ {{- end }}
+ {{- if .Values.forwarder.livenessProbe.enabled }}
+ livenessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.forwarder.livenessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.forwarder.livenessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.forwarder.livenessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.forwarder.livenessProbe.successThreshold }}
+ failureThreshold: {{ .Values.forwarder.livenessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.forwarder.readinessProbe.enabled }}
+ readinessProbe:
+ httpGet:
+ path: /fluentd.healthcheck?json=%7B%22ping%22%3A+%22pong%22%7D
+ port: http
+ initialDelaySeconds: {{ .Values.forwarder.readinessProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.forwarder.readinessProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.forwarder.readinessProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.forwarder.readinessProbe.successThreshold }}
+ failureThreshold: {{ .Values.forwarder.readinessProbe.failureThreshold }}
+ {{- end }}
+ {{- if .Values.forwarder.resources }}
+ resources: {{- toYaml .Values.forwarder.resources | nindent 12 }}
+ {{- end }}
+ volumeMounts:
+ - name: fluentd-config
+ mountPath: /opt/bitnami/fluentd/conf
+ - name: buffer
+ mountPath: /opt/bitnami/fluentd/logs/buffers
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ mountPath: /opt/bitnami/fluentd/certs
+ {{- end }}
+ - name: varlog
+ mountPath: /var/log
+ - name: varlibdockercontainers
+ mountPath: /var/lib/docker/containers
+ readOnly: true
+ volumes:
+ {{- if .Values.tls.enabled }}
+ - name: certs
+ secret:
+ secretName: {{ template "fluentd.tls.secretName" . }}
+ items:
+ - key: tls.crt
+ path: tls.crt
+ - key: tls.key
+ path: tls.key
+ {{- end }}
+ - name: fluentd-config
+ configMap:
+ name: {{ template "fluentd.forwarder.configMap" . }}
+ - name: buffer
+ emptyDir: {}
+ - name: varlog
+ hostPath:
+ path: /var/log
+ - name: varlibdockercontainers
+ hostPath:
+ path: /var/lib/docker/containers
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-svc.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-svc.yaml
new file mode 100644
index 00000000..a47d37b8
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/forwarder-svc.yaml
@@ -0,0 +1,32 @@
+{{- if and .Values.forwarder.enabled .Values.forwarder.service.ports }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-forwarder
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+ {{- if .Values.forwarder.service.annotations }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.forwarder.service.annotations "context" $) | nindent 4 }}
+ {{- end }}
+spec:
+ type: {{ .Values.forwarder.service.type }}
+ {{- if and .Values.forwarder.service.loadBalancerIP (eq .Values.forwarder.service.type "LoadBalancer") }}
+ loadBalancerIP: {{ .Values.forwarder.service.loadBalancerIP }}
+ {{- end }}
+ {{- if and .Values.forwarder.service.loadBalancerSourceRanges (eq .Values.forwarder.service.type "LoadBalancer") }}
+ loadBalancerSourceRanges:
+ {{- with .Values.forwarder.service.loadBalancerSourceRanges }}
+ {{ toYaml . | nindent 4 }}
+ {{- end }}
+ {{- end }}
+ {{- if and (eq .Values.forwarder.service.type "ClusterIP") .Values.forwarder.service.clusterIP }}
+ clusterIP: {{ .Values.forwarder.service.clusterIP }}
+ {{- end }}
+ ports:
+ {{- range $key, $value := .Values.forwarder.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{ include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: forwarder
+{{- end }} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/metrics-svc.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/metrics-svc.yaml
new file mode 100644
index 00000000..2b0c92f1
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/metrics-svc.yaml
@@ -0,0 +1,18 @@
+{{- if .Values.metrics.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-metrics
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ annotations: {{- include "fluentd.tplValue" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
+spec:
+ type: {{ .Values.metrics.service.type }}
+ {{- if and (eq .Values.metrics.service.type "LoadBalancer") .Values.metrics.service.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.metrics.service.loadBalancerIP }}
+ {{- end }}
+ ports:
+ - name: metrics
+ port: {{ .Values.metrics.service.port }}
+ targetPort: metrics
+ selector: {{- include "fluentd.matchLabels" . | nindent 4 }}
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/serviceaccount.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/serviceaccount.yaml
new file mode 100644
index 00000000..1e584759
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/serviceaccount.yaml
@@ -0,0 +1,7 @@
+{{- if .Values.serviceAccount.create -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ include "fluentd.serviceAccountName" . }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+{{- end -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/servicemonitor.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/servicemonitor.yaml
new file mode 100644
index 00000000..e884ac56
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/servicemonitor.yaml
@@ -0,0 +1,28 @@
+{{- if and .Values.metrics.enabled .Values.metrics.serviceMonitor.enabled }}
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ name: {{ include "fluentd.fullname" . }}
+ {{- if .Values.metrics.serviceMonitor.namespace }}
+ namespace: {{ .Values.metrics.serviceMonitor.namespace }}
+ {{- end }}
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ {{- range $key, $value := .Values.metrics.serviceMonitor.selector }}
+ {{ $key }}: {{ $value | quote }}
+ {{- end }}
+spec:
+ selector:
+ matchLabels: {{- include "fluentd.matchLabels" . | nindent 6 }}
+ endpoints:
+ - port: metrics
+ path: "/metrics"
+ {{- if .Values.metrics.serviceMonitor.interval }}
+ interval: {{ .Values.metrics.serviceMonitor.interval }}
+ {{- end }}
+ {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
+ scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
+ {{- end }}
+ namespaceSelector:
+ matchNames:
+ - {{ .Release.Namespace }}
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/svc-headless.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/svc-headless.yaml
new file mode 100644
index 00000000..a64899a4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/svc-headless.yaml
@@ -0,0 +1,18 @@
+{{- if and .Values.aggregator.enabled .Values.aggregator.service.ports -}}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "fluentd.fullname" . }}-headless
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+spec:
+ type: ClusterIP
+ clusterIP: None
+ ports:
+ {{- range $key, $value := .Values.aggregator.service.ports }}
+ - name: {{ $key }}
+ {{ toYaml $value | nindent 6 }}
+ {{- end }}
+ selector: {{- include "fluentd.matchLabels" . | nindent 4 }}
+ app.kubernetes.io/component: aggregator
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/templates/tls-certs.yaml b/deployments/helm/v2/onap4k8s/fluentd/templates/tls-certs.yaml
new file mode 100644
index 00000000..c37eb849
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/templates/tls-certs.yaml
@@ -0,0 +1,11 @@
+{{- if and (not .Values.tls.existingSecret) ( .Values.tls.enabled) }}
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "fluentd.fullname" . }}-tls
+ labels: {{- include "fluentd.labels" . | nindent 4 }}
+type: kubernetes.io/tls
+data:
+ tls.crt: {{ required "A valid .Values.tls.certificate entry required!" .Values.tls.certificate | b64enc }}
+ tls.key: {{ required "A valid .Values.tls.key entry required!" .Values.tls.key | b64enc }}
+{{- end }}
diff --git a/deployments/helm/v2/onap4k8s/fluentd/values-production.yaml b/deployments/helm/v2/onap4k8s/fluentd/values-production.yaml
new file mode 100644
index 00000000..d1bc5e26
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/values-production.yaml
@@ -0,0 +1,454 @@
+## Global Docker image parameters
+## Please, note that this will override the image parameters, including dependencies, configured to use the global value
+## Current available global Docker image parameters: imageRegistry and imagePullSecrets
+##
+global: {}
+# imageRegistry: myRegistryName
+# imagePullSecrets:
+# - myRegistryKeySecretName
+
+## Bitnami Fluentd image version
+## ref: https://hub.docker.com/r/bitnami/fluentd/tags/
+##
+image:
+ registry: docker.io
+ repository: bitnami/fluentd
+ tag: 1.10.2-debian-10-r11
+ ## Specify a imagePullPolicy
+ ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+ ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+ ##
+ 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:
+ # - myRegistryKeySecretName
+
+## String to partially override fluentd.fullname template (will maintain the release name)
+##
+# nameOverride:
+
+## String to fully override fluentd.fullname template
+##
+# fullnameOverride:
+
+## Cluster Domain
+##
+clusterDomain: cluster.local
+
+## Forwarder parameters
+##
+forwarder:
+ ## Enable forwarder daemonset
+ ##
+ enabled: true
+
+ ## Forwarder daemon user and group (set to root by default because it reads from host paths)
+ ##
+ daemonUser: root
+ daemonGroup: root
+
+ ## K8s Security Context for forwarder pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 0
+ fsGroup: 0
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Forwarder containers' ports
+ ##
+ containerPorts:
+ # - name: syslog-tcp
+ # containerPort: 5140
+ # protocol: TCP
+ # - name: syslog-udp
+ # containerPort: 5140
+ # protocol: UDP
+ # - name: tcp
+ # containerPort: 24224
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # syslog-udp:
+ # port: 5140
+ # targetPort: syslog-udp
+ # protocol: UDP
+ # nodePort: 31514
+ # syslog-tcp:
+ # port: 5140
+ # targetPort: syslog-tcp
+ # protocol: TCP
+ # nodePort: 31514
+ # tcp:
+ # port: 24224
+ # targetPort: tcp
+ # protocol: TCP
+ http:
+ port: 9880
+ targetPort: http
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Forwarder containers' liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Forwarder containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ 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: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## 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: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+## Agregator parameters
+##
+aggregator:
+ ## Enable Aggregator daemonset
+ ##
+ enabled: true
+ ## Number of Aggregator replicas
+ ##
+ replicaCount: 2
+
+ ## K8s Security Context for Aggregator pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 1001
+ fsGroup: 1001
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## Port the Aggregator container will listen for logs. Leave it blank to ignore.
+ ## You can specify other ports in the aggregator.containerPorts parameter
+ ##
+ port: 24224
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Aggregator containers' ports
+ ##
+ containerPorts:
+ # - name: my-port
+ # containerPort: 24222
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # http:
+ # port: 9880
+ # targetPort: http
+ # protocol: TCP
+ tcp:
+ port: 24224
+ targetPort: tcp
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Configure extra options for liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Aggregator containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ 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: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## 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: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+ ## Persist data to a persistent volume
+ persistence:
+ enabled: false
+ ## 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: 10Gi
+
+## Pods Service Account
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+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 fluentd.fullname template
+ # name:
+
+## Role Based Access
+## ref: https://kubernetes.io/docs/admin/authorization/rbac/
+##
+rbac:
+ create: true
+
+## Prometheus Exporter / Metrics
+##
+metrics:
+ enabled: true
+ ## Prometheus Exporter service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+ ## Service port
+ ##
+ port: 24231
+ ## loadBalancerIP for the Prometheus Exporter service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+ ## Annotations for the Prometheus Exporter service service
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "24231"
+ prometheus.io/path: "/metrics"
+
+ ## Prometheus Operator ServiceMonitor configuration
+ ##
+ serviceMonitor:
+ enabled: false
+ ## Namespace in which Prometheus is running
+ ##
+ # namespace: monitoring
+
+ ## Interval at which metrics should be scraped.
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # interval: 10s
+
+ ## Timeout after which the scrape is ended
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # scrapeTimeout: 10s
+
+ ## ServiceMonitor selector labels
+ ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ # selector:
+ # prometheus: my-prometheus
+
+## Mount TLS certificates
+##
+tls:
+ enabled: false
+ certificate: |-
+ key: |-
+ # existingSecret: name-of-existing-secret-to-certificates
diff --git a/deployments/helm/v2/onap4k8s/fluentd/values.yaml b/deployments/helm/v2/onap4k8s/fluentd/values.yaml
new file mode 100644
index 00000000..1feb2a19
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/fluentd/values.yaml
@@ -0,0 +1,454 @@
+## Global Docker image parameters
+## Please, note that this will override the image parameters, including dependencies, configured to use the global value
+## Current available global Docker image parameters: imageRegistry and imagePullSecrets
+##
+global: {}
+# imageRegistry: myRegistryName
+# imagePullSecrets:
+# - myRegistryKeySecretName
+
+## Bitnami Fluentd image version
+## ref: https://hub.docker.com/r/bitnami/fluentd/tags/
+##
+image:
+ registry: docker.io
+ repository: bitnami/fluentd
+ tag: 1.10.2-debian-10-r11
+ ## Specify a imagePullPolicy
+ ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
+ ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
+ ##
+ 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:
+ # - myRegistryKeySecretName
+
+## String to partially override fluentd.fullname template (will maintain the release name)
+##
+# nameOverride:
+
+## String to fully override fluentd.fullname template
+##
+# fullnameOverride:
+
+## Cluster Domain
+##
+clusterDomain: cluster.local
+
+## Forwarder parameters
+##
+forwarder:
+ ## Enable forwarder daemonset
+ ##
+ enabled: true
+
+ ## Forwarder daemon user and group (set to root by default because it reads from host paths)
+ ##
+ daemonUser: root
+ daemonGroup: root
+
+ ## K8s Security Context for forwarder pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 0
+ fsGroup: 0
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Forwarder containers' ports
+ ##
+ containerPorts:
+ # - name: syslog-tcp
+ # containerPort: 5140
+ # protocol: TCP
+ # - name: syslog-udp
+ # containerPort: 5140
+ # protocol: UDP
+ # - name: tcp
+ # containerPort: 24224
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # syslog-udp:
+ # port: 5140
+ # targetPort: syslog-udp
+ # protocol: UDP
+ # nodePort: 31514
+ # syslog-tcp:
+ # port: 5140
+ # targetPort: syslog-tcp
+ # protocol: TCP
+ # nodePort: 31514
+ # tcp:
+ # port: 24224
+ # targetPort: tcp
+ # protocol: TCP
+ http:
+ port: 9880
+ targetPort: http
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Forwarder containers' liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/#daemonset-update-strategy
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Forwarder containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ 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: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## 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: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+## Agregator parameters
+##
+aggregator:
+ ## Enable Aggregator daemonset
+ ##
+ enabled: true
+ ## Number of Aggregator replicas
+ ##
+ replicaCount: 1
+
+ ## K8s Security Context for Aggregator pods
+ ## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
+ ##
+ securityContext:
+ enabled: true
+ runAsUser: 1001
+ fsGroup: 1001
+
+ ## Name of the config file that will be used by Fluentd at launch
+ ## Fluentd will look for it under the /opt/bitnami/fluentd/conf directory
+ ##
+ configFile: fluentd.conf
+
+ ## Name of the configMap that contains the configuration files for fluentd
+ ## If not specified, one will be created by default
+ ##
+ # configMap:
+
+ ## Port the Aggregator container will listen for logs. Leave it blank to ignore.
+ ## You can specify other ports in the aggregator.containerPorts parameter
+ ##
+ port: 24224
+
+ ## String with extra arguments for the Fluentd command line
+ ## ref: https://docs.fluentd.org/deployment/command-line-option
+ ##
+ extraArgs: ""
+
+ ## Extra environment variables to pass to the container
+ ## extraEnv:
+ ## - name: MY_ENV_VAR
+ ## value: my_value
+ ##
+ extraEnv: []
+
+ ## Aggregator containers' ports
+ ##
+ containerPorts:
+ # - name: my-port
+ # containerPort: 24222
+ # protocol: TCP
+ - name: http
+ containerPort: 9880
+ protocol: TCP
+
+ ## Service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+
+ ## Service ports
+ ##
+ ports:
+ # http:
+ # port: 9880
+ # targetPort: http
+ # protocol: TCP
+ tcp:
+ port: 24224
+ targetPort: tcp
+ protocol: TCP
+
+ ## loadBalancerIP for the forwarders service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+
+ ## Load Balancer sources
+ ## https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
+ ##
+ # loadBalancerSourceRanges:
+ # - 10.10.10.0/24
+
+ ## Set the Cluster IP to use
+ ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
+ ##
+ # clusterIP: None
+
+ ## Provide any additional annotations which may be required
+ ##
+ annotations: {}
+
+ ## Configure extra options for liveness and readiness probes
+ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
+ ##
+ livenessProbe:
+ enabled: true
+ initialDelaySeconds: 60
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+ readinessProbe:
+ enabled: true
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ timeoutSeconds: 5
+ failureThreshold: 6
+ successThreshold: 1
+
+ ## Set up update strategy.
+ ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
+ ## Example:
+ # updateStrategy:
+ # type: RollingUpdate
+ # rollingUpdate:
+ # maxSurge: 25%
+ # maxUnavailable: 25%
+ updateStrategy:
+ type: RollingUpdate
+
+ ## Aggregator containers' resource requests and limits
+ ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ ##
+ 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: 500m
+ # memory: 1Gi
+ requests: {}
+ # cpu: 300m
+ # memory: 512Mi
+
+ ## 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: {}
+
+ ## Pod annotations
+ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
+ ##
+ podAnnotations: {}
+
+ ## Persist data to a persistent volume
+ persistence:
+ enabled: false
+ ## 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: 10Gi
+
+## Pods Service Account
+## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
+##
+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 fluentd.fullname template
+ # name:
+
+## Role Based Access
+## ref: https://kubernetes.io/docs/admin/authorization/rbac/
+##
+rbac:
+ create: true
+
+## Prometheus Exporter / Metrics
+##
+metrics:
+ enabled: false
+ ## Prometheus Exporter service parameters
+ ##
+ service:
+ ## Service type
+ ##
+ type: ClusterIP
+ ## Service port
+ ##
+ port: 24231
+ ## loadBalancerIP for the Prometheus Exporter service (optional, cloud specific)
+ ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
+ ##
+ # loadBalancerIP:
+ ## Annotations for the Prometheus Exporter service service
+ ##
+ annotations:
+ prometheus.io/scrape: "true"
+ prometheus.io/port: "24231"
+ prometheus.io/path: "/metrics"
+
+ ## Prometheus Operator ServiceMonitor configuration
+ ##
+ serviceMonitor:
+ enabled: false
+ ## Namespace in which Prometheus is running
+ ##
+ # namespace: monitoring
+
+ ## Interval at which metrics should be scraped.
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # interval: 10s
+
+ ## Timeout after which the scrape is ended
+ ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
+ ##
+ # scrapeTimeout: 10s
+
+ ## ServiceMonitor selector labels
+ ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
+ ##
+ # selector:
+ # prometheus: my-prometheus
+
+## Mount TLS certificates
+##
+tls:
+ enabled: false
+ certificate: |-
+ key: |-
+ # existingSecret: name-of-existing-secret-to-certificates
diff --git a/deployments/helm/v2/onap4k8s/mongo/.helmignore b/deployments/helm/v2/onap4k8s/mongo/.helmignore
new file mode 100644
index 00000000..f0c13194
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/.helmignore
@@ -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/deployments/helm/v2/onap4k8s/mongo/Chart.yaml b/deployments/helm/v2/onap4k8s/mongo/Chart.yaml
new file mode 100644
index 00000000..da922111
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright © 2018 Orange
+#
+# 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
+description: MongoDB Server
+name: mongo
+version: 4.0.8
diff --git a/deployments/helm/v2/onap4k8s/mongo/requirements.yaml b/deployments/helm/v2/onap4k8s/mongo/requirements.yaml
new file mode 100644
index 00000000..38a832b8
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright ? 2019 Intel Corporation
+# #
+# # 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/nfs-provisoner.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/nfs-provisoner.yaml
new file mode 100644
index 00000000..355ad382
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/nfs-provisoner.yaml
@@ -0,0 +1,78 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{ if not .Values.disableNfsProvisioner }}
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ #replicas: {{ .Values.replicaCount }}
+ strategy:
+ type: Recreate
+ template:
+ metadata:
+ labels:
+ app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ image: "{{ .Values.global.nfsprovisionerRepository | default .Values.nfsprovisionerRepository }}/{{ .Values.nfsprovisionerImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - name: nfs
+ containerPort: {{ .Values.service.nfsPort }}
+ - name: mountd
+ containerPort: {{ .Values.service.mountdPort }}
+ - name: rpcbind
+ containerPort: {{ .Values.service.rpcbindPort }}
+ - name: rpcbind-udp
+ containerPort: {{ .Values.service.rpcbindUdpPort }}
+ protocol: UDP
+ securityContext:
+ capabilities:
+ add:
+ - DAC_READ_SEARCH
+ - SYS_RESOURCE
+ args:
+ - "-provisioner={{ include "common.fullname" . }}/nfs"
+ env:
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: SERVICE_NAME
+ value: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ volumeMounts:
+ - name: export-volume
+ mountPath: /export
+ volumes:
+ - name: export-volume
+ hostPath:
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{ end }}
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/pv.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/pv.yaml
new file mode 100644
index 00000000..824dcbb8
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/pv.yaml
@@ -0,0 +1,38 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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 (and (and (.Values.persistence.enabled) (not .Values.persistence.existingClaim)) ( .Values.disableNfsProvisioner)) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" . }}-data
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+ name: {{ include "common.fullname" . }}
+spec:
+ capacity:
+ storage: {{ .Values.persistence.size}}
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
+ persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+ hostPath:
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/pvc.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/pvc.yaml
new file mode 100644
index 00000000..372c1068
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/pvc.yaml
@@ -0,0 +1,43 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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 and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+ name: {{ include "common.fullname" . }}-data
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ release: "{{ .Release.Name }}"
+ heritage: "{{ .Release.Service }}"
+ name: {{ include "common.fullname" . }}
+{{- if .Values.persistence.annotations }}
+ annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+ accessModes:
+ - {{ .Values.persistence.accessMode }}
+ resources:
+ requests:
+ storage: {{ .Values.persistence.size }}
+ selector:
+ matchLabels:
+ name: {{ include "common.fullname" . }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
+{{- end -}}
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/service.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/service.yaml
new file mode 100644
index 00000000..df55854e
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/service.yaml
@@ -0,0 +1,97 @@
+{{/*
+# Copyright © 2018 Orange
+#
+# 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: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ ports:
+ - port: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ clusterIP: None
+#{{ if not .Values.disableNfsProvisioner }}
+---
+kind: Service
+apiVersion: v1
+metadata:
+ name: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+spec:
+ ports:
+ - name: nfs
+ port: {{ .Values.service.nfsPort }}
+ - name: mountd
+ port: {{ .Values.service.mountdPort }}
+ - name: rpcbind
+ port: {{ .Values.service.rpcbindPort }}
+ - name: rpcbind-udp
+ port: {{ .Values.service.rpcbindUdpPort }}
+ protocol: UDP
+ selector:
+ app: {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+#{{ end }}
+---
+# Client service for connecting to any Mongo instance for reads.
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}-read
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+spec:
+ ports:
+ - port: {{ .Values.service.internalPort }}
+ name: {{ .Values.service.portName }}
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+---
+{{ if .Values.geoEnabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "common.servicename" . }}-nodeport
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+spec:
+ ports:
+ - name: {{ .Values.service.internalPort }}
+ port: {{ .Values.service.internalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort1 }}
+ - name: {{ .Values.xtrabackup.internalPort }}
+ port: {{ .Values.xtrabackup.internalPort }}
+ targetPort: {{ .Values.xtrabackup.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.externalPort2 }}
+ type: NodePort
+ selector:
+ statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0
+ release: {{ .Release.Name }}
+{{ end }}
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/statefulset.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/statefulset.yaml
new file mode 100644
index 00000000..56f669e9
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/statefulset.yaml
@@ -0,0 +1,108 @@
+{{/*
+# Copyright © 2018 Orange
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ serviceName: {{ .Values.service.name }}
+ replicas: {{ .Values.replicaCount }}
+ selector:
+ matchLabels:
+ release: "{{ .Release.Name }}"
+ app: {{ include "common.name" . }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ initContainers:
+#{{ if not .Values.disableNfsProvisioner }}
+ - name: {{ include "common.name" . }}-readiness
+ command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - {{ .Values.nfsprovisionerPrefix }}-nfs-provisioner
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#{{ end }}
+
+ containers:
+ - name: {{ include "common.name" . }}
+ image: "{{ .Values.dockerHubRepository }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ env:
+ - name: MONGO_INITDB_DATABASE
+ value: "{{ .Values.config.dbName }}"
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ exec:
+ command:
+ - mongo
+ - --eval
+ - "db.adminCommand('ping')"
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
+ {{end }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - mountPath: /data/db
+ name: {{ include "common.fullname" . }}-data
+ resources:
+{{ include "common.resources" . | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name: {{ include "common.fullname" . }}-data
+#{{ if .Values.persistence.enabled }}
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}-data
+#{{ else }}
+ emptyDir: {}
+#{{ end }}
diff --git a/deployments/helm/v2/onap4k8s/mongo/templates/storageclass.yaml b/deployments/helm/v2/onap4k8s/mongo/templates/storageclass.yaml
new file mode 100644
index 00000000..3cd502ea
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/templates/storageclass.yaml
@@ -0,0 +1,24 @@
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+
+{{ if not .Values.disableNfsProvisioner }}
+kind: StorageClass
+apiVersion: storage.k8s.io/v1
+metadata:
+ name: "{{ include "common.fullname" . }}-data"
+ namespace: {{ include "common.namespace" . }}
+provisioner: {{ include "common.fullname" . }}/nfs
+{{ end }}
diff --git a/deployments/helm/v2/onap4k8s/mongo/values.yaml b/deployments/helm/v2/onap4k8s/mongo/values.yaml
new file mode 100644
index 00000000..0a6f8570
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/mongo/values.yaml
@@ -0,0 +1,107 @@
+# Copyright © 2018 Orange
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefix: 302
+ persistence: {}
+ readinessRepository: oomk8s
+ readinessImage: readiness-check:2.0.0
+
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+
+dockerHubRepository: registry.hub.docker.com
+image: library/mongo:4.0.8
+pullPolicy: Always
+
+# application configuration
+config:
+ dbName: mongo
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+disableNfsProvisioner: true
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 30
+ periodSeconds: 10
+ timeoutSeconds: 5
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 5
+ periodSeconds: 10
+
+## Persist data to a persitent volume
+persistence:
+ enabled: false
+ volumeReclaimPolicy: Retain
+ accessMode: ReadWriteMany
+ size: 1Gi
+ mountPath: /dockerdata-nfs
+ mountSubPath: "mongo/data"
+
+service:
+ name: mongo
+ portName: mongo
+ internalPort: 27017
+ # nfs provisioner ports
+ nfsPort: 2049
+ mountdPort: 20048
+ rpcbindPort: 111
+ rpcbindUdpPort: 111
+
+ingress:
+ enabled: false
+
+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:'.
+ #
+ # Example:
+ # Configure resource requests and limits
+ # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+ # Minimum memory for development is 2 CPU cores and 4GB memory
+ # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+# limits:
+# cpu: 2
+# memory: 4Gi
+# requests:
+# cpu: 2
+# memory: 4Gi
+
+
+nfsprovisionerRepository: quay.io
+nfsprovisionerImage: kubernetes_incubator/nfs-provisioner:v1.0.8
+nfsprovisionerPrefix: mongo
+
+sdnctlPrefix: mongo
+
+geoEnabled: false
+geoSiteId: 1
diff --git a/deployments/helm/v2/onap4k8s/ncm/Chart.yaml b/deployments/helm/v2/onap4k8s/ncm/Chart.yaml
new file mode 100644
index 00000000..224cc2d7
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Network Configuration Manager
+name: ncm
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/ncm/requirements.yaml b/deployments/helm/v2/onap4k8s/ncm/requirements.yaml
new file mode 100644
index 00000000..c2253cf4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/ncm/resources/config/config.json b/deployments/helm/v2/onap4k8s/ncm/resources/config/config.json
new file mode 100644
index 00000000..81728ea9
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/resources/config/config.json
@@ -0,0 +1,7 @@
+{
+
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9016"
+} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/ncm/templates/configmap.yaml b/deployments/helm/v2/onap4k8s/ncm/templates/configmap.yaml
new file mode 100644
index 00000000..c9d55fed
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/onap4k8s/ncm/templates/deployment.yaml b/deployments/helm/v2/onap4k8s/ncm/templates/deployment.yaml
new file mode 100644
index 00000000..cf73fe21
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/templates/deployment.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.deployment" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/ncm/templates/service.yaml b/deployments/helm/v2/onap4k8s/ncm/templates/service.yaml
new file mode 100644
index 00000000..c9ab68d3
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/templates/service.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.servicemco" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/ncm/values.yaml b/deployments/helm/v2/onap4k8s/ncm/values.yaml
new file mode 100644
index 00000000..ce700e9b
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ncm/values.yaml
@@ -0,0 +1,84 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: rtsood/emco:0.0.1
+pullPolicy: IfNotPresent
+command: "/opt/emco/entrypoint"
+args: "ncm"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: ClusterIP
+ name: ncm
+ portName: ncm
+ internalPort: 9031
+ externalPort: 9031
+ nodePort: 31
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/Chart.yaml b/deployments/helm/v2/onap4k8s/orchestrator/Chart.yaml
new file mode 100644
index 00000000..8c0f1d98
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Orchestrator
+name: orchestrator
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/requirements.yaml b/deployments/helm/v2/onap4k8s/orchestrator/requirements.yaml
new file mode 100644
index 00000000..c2253cf4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/resources/config/config.json b/deployments/helm/v2/onap4k8s/orchestrator/resources/config/config.json
new file mode 100644
index 00000000..83b035e9
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/resources/config/config.json
@@ -0,0 +1,6 @@
+{
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9015"
+} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/templates/configmap.yaml b/deployments/helm/v2/onap4k8s/orchestrator/templates/configmap.yaml
new file mode 100644
index 00000000..c9d55fed
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/templates/deployment.yaml b/deployments/helm/v2/onap4k8s/orchestrator/templates/deployment.yaml
new file mode 100644
index 00000000..dea9f79c
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/templates/deployment.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.deployment" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/templates/service.yaml b/deployments/helm/v2/onap4k8s/orchestrator/templates/service.yaml
new file mode 100644
index 00000000..c9ab68d3
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/templates/service.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.servicemco" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/orchestrator/values.yaml b/deployments/helm/v2/onap4k8s/orchestrator/values.yaml
new file mode 100644
index 00000000..0ba1a9e8
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/orchestrator/values.yaml
@@ -0,0 +1,85 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: rtsood/emco:0.0.1
+pullPolicy: IfNotPresent
+command: "/opt/emco/entrypoint"
+args: "orchestrator"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: orchestrator
+ portName: orchestrator
+ internalPort: 9015
+ externalPort: 9015
+ nodePort: 15
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/Chart.yaml b/deployments/helm/v2/onap4k8s/ovnaction/Chart.yaml
new file mode 100644
index 00000000..9047dd0f
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Ovn Action Controller
+name: ovnaction
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/requirements.yaml b/deployments/helm/v2/onap4k8s/ovnaction/requirements.yaml
new file mode 100644
index 00000000..c2253cf4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/resources/config/config.json b/deployments/helm/v2/onap4k8s/ovnaction/resources/config/config.json
new file mode 100644
index 00000000..1fdfafce
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/resources/config/config.json
@@ -0,0 +1,6 @@
+{
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9051"
+} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/templates/configmap.yaml b/deployments/helm/v2/onap4k8s/ovnaction/templates/configmap.yaml
new file mode 100644
index 00000000..c9d55fed
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/templates/deployment.yaml b/deployments/helm/v2/onap4k8s/ovnaction/templates/deployment.yaml
new file mode 100644
index 00000000..56c62699
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/templates/deployment.yaml
@@ -0,0 +1,85 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*/}}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ selector:
+ matchLabels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ containers:
+ - image: "{{ include "common.repository" . }}/{{ .Values.image }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: {{ include "common.name" . }}
+ command: [{{ .Values.command }}]
+ args: [{{ .Values.args }}]
+ workingDir: {{ .Values.workingDir }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ - containerPort: {{ .Values.serviceInternal.internalPort }}
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /opt/emco/config.json
+ name: {{ include "common.name" .}}
+ subPath: config.json
+ resources:
+{{ include "common.resources" . }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity }}
+ {{- end }}
+ volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ - name : {{ include "common.name" . }}
+ configMap:
+ name: {{ include "common.fullname" . }}
+ imagePullSecrets:
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/templates/service.yaml b/deployments/helm/v2/onap4k8s/ovnaction/templates/service.yaml
new file mode 100644
index 00000000..e9e59d38
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/templates/service.yaml
@@ -0,0 +1,49 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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: {{ include "common.servicename" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.fullname" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ type: {{ .Values.service.type }}
+ ports:
+ - name: {{ .Values.service.name }}
+ {{if eq .Values.service.type "NodePort" -}}
+ port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.service.nodePort }}
+ {{- else -}}
+ port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
+ {{- end}}
+ protocol: TCP
+ - name: {{ .Values.serviceInternal.name }}
+ {{if eq .Values.serviceInternal.type "NodePort" -}}
+ port: {{ .Values.serviceInternal.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefixExt | default "302" }}{{ .Values.serviceInternal.nodePort }}
+ {{- else -}}
+ port: {{ .Values.serviceInternal.externalPort }}
+ targetPort: {{ .Values.serviceInternal.internalPort }}
+ {{- end}}
+ protocol: TCP
+ selector:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/ovnaction/values.yaml b/deployments/helm/v2/onap4k8s/ovnaction/values.yaml
new file mode 100644
index 00000000..815f3fec
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/ovnaction/values.yaml
@@ -0,0 +1,93 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: rtsood/emco:0.0.1
+pullPolicy: IfNotPresent
+command: "/opt/emco/entrypoint"
+args: "ovnaction"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: true
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: ovnaction
+ portName: ovnaction
+ internalPort: 9071
+ externalPort: 9071
+ nodePort: 71
+
+serviceInternal:
+ type: NodePort
+ name: internal
+ portName: internal
+ internalPort: 9073
+ externalPort: 9073
+ nodePort: 73
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}
diff --git a/deployments/helm/v2/onap4k8s/rsync/Chart.yaml b/deployments/helm/v2/onap4k8s/rsync/Chart.yaml
new file mode 100644
index 00000000..25043af1
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/Chart.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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
+description: Resource Synchronizer
+name: rsync
+version: 0.1.0
diff --git a/deployments/helm/v2/onap4k8s/rsync/requirements.yaml b/deployments/helm/v2/onap4k8s/rsync/requirements.yaml
new file mode 100644
index 00000000..c2253cf4
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/requirements.yaml
@@ -0,0 +1,18 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: common
+ version: ~0.x-0
+ repository: '@local'
diff --git a/deployments/helm/v2/onap4k8s/rsync/resources/config/config.json b/deployments/helm/v2/onap4k8s/rsync/resources/config/config.json
new file mode 100644
index 00000000..484bdf04
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/resources/config/config.json
@@ -0,0 +1,6 @@
+{
+ "database-type": "mongo",
+ "database-ip": "emco-mongo",
+ "etcd-ip": "emco-etcd",
+ "service-port": "9017"
+} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/rsync/templates/configmap.yaml b/deployments/helm/v2/onap4k8s/rsync/templates/configmap.yaml
new file mode 100644
index 00000000..c9d55fed
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/templates/configmap.yaml
@@ -0,0 +1,28 @@
+{{/*
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/deployments/helm/v2/onap4k8s/rsync/templates/deployment.yaml b/deployments/helm/v2/onap4k8s/rsync/templates/deployment.yaml
new file mode 100644
index 00000000..cf73fe21
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/templates/deployment.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.deployment" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/rsync/templates/service.yaml b/deployments/helm/v2/onap4k8s/rsync/templates/service.yaml
new file mode 100644
index 00000000..c9ab68d3
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/templates/service.yaml
@@ -0,0 +1,16 @@
+{{/*
+# Copyright 2020 Intel Corporation, Inc
+#
+# 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.
+*/}}
+{{- template "common.servicemco" . -}} \ No newline at end of file
diff --git a/deployments/helm/v2/onap4k8s/rsync/values.yaml b/deployments/helm/v2/onap4k8s/rsync/values.yaml
new file mode 100644
index 00000000..07e4b356
--- /dev/null
+++ b/deployments/helm/v2/onap4k8s/rsync/values.yaml
@@ -0,0 +1,84 @@
+# Copyright 2019 Intel Corporation, Inc
+#
+# 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 configuration defaults.
+#################################################################
+global:
+ nodePortPrefixExt: 304
+ persistence: {}
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: registry.hub.docker.com
+image: rtsood/emco:0.0.1
+pullPolicy: IfNotPresent
+command: "/opt/emco/entrypoint"
+args: "rsync"
+workingDir: /opt/emco
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration is via config files
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+ # necessary to disable liveness probe when setting breakpoints
+ # in debugger so K8s doesn't restart unresponsive container
+ enabled: false
+
+readiness:
+ initialDelaySeconds: 10
+ periodSeconds: 30
+
+service:
+ type: NodePort
+ name: rsync
+ portName: rsync
+ internalPort: 9041
+ externalPort: 9041
+ nodePort: 41
+
+ingress:
+ enabled: false
+
+# Configure resource requests and limits
+flavor: large
+resources:
+ small:
+ limits:
+ cpu: 200m
+ memory: 500Mi
+ requests:
+ cpu: 10m
+ memory: 10Mi
+ large:
+ limits:
+ cpu: 400m
+ memory: 1Gi
+ requests:
+ cpu: 10m
+ memory: 100Mi
+ unlimited: {}