New version of the common template. It unifies the naming convention between platform and xapp components, enabling cross referencing.
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: I683f36a64512854dfb4c30c1df3e4204da7b708b
diff --git a/ric-common/Common-Template/helm/ric-common/Chart.yaml b/ric-common/Common-Template/helm/ric-common/Chart.yaml
new file mode 100644
index 0000000..a6dde6e
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/Chart.yaml
@@ -0,0 +1,21 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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: ric-common
+version: 2.0.0
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_chart.tpl b/ric-common/Common-Template/helm/ric-common/templates/_chart.tpl
new file mode 100644
index 0000000..1236b4b
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_chart.tpl
@@ -0,0 +1,21 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl
new file mode 100644
index 0000000..8cb57d7
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl
@@ -0,0 +1,58 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 configmap.
+
+*/}}
+
+
+{{- define "common.configmapname.appmgr" -}}
+ {{- $name := ( include "common.fullname.appmgr" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.dbaas" -}}
+ {{- $name := ( include "common.fullname.dbaas" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}:
+
+{{- define "common.configmapname.e2mgr" -}}
+ {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.e2term" -}}
+ {{- $name := ( include "common.fullname.e2term" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.rtmgr" -}}
+ {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.configmapname.a1mediator" -}}
+ {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.configmapname.nexus" -}}
+ {{- $name := ( include "common.fullname.nexus" . ) -}}
+ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl
new file mode 100644
index 0000000..4242ab8
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl
@@ -0,0 +1,58 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 deployment.
+*/}}
+
+
+{{- define "common.deploymentname.appmgr" -}}
+ {{- $name := ( include "common.fullname.appmgr" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.dbaas" -}}
+ {{- $name := ( include "common.fullname.dbaas" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.e2mgr" -}}
+ {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.e2term" -}}
+ {{- $name := ( include "common.fullname.e2term" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.rtmgr" -}}
+ {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.deploymentname.a1mediator" -}}
+ {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+{{- define "common.deploymentname.nexus" -}}
+ {{- $name := ( include "common.fullname.nexus" . ) -}}
+ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_docker_credential_name.tpl b/ric-common/Common-Template/helm/ric-common/templates/_docker_credential_name.tpl
new file mode 100644
index 0000000..717d238
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_docker_credential_name.tpl
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.dockercred.prefix" -}}
+ {{- printf "secret-docker" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_dockerregistry.tpl b/ric-common/Common-Template/helm/ric-common/templates/_dockerregistry.tpl
new file mode 100644
index 0000000..ac692ea
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_dockerregistry.tpl
@@ -0,0 +1,174 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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" -}}
+ {{- $componentname := .Chart.Name -}}
+ {{- $firsttier := (index .Values (printf "%s" $componentname)) -}}
+ {{- if $firsttier -}}
+ {{- $secondtier := (index .Values (printf "%s" $componentname) (printf "%s" "repositoryOverride")) -}}
+ {{- if $secondtier -}}
+ {{- printf "%s" $secondtier -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.repository -}}
+ {{- printf "%s" .Values.global.repository -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repository -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repository -}}
+ {{- end -}}
+ {{- end -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.repository -}}
+ {{- printf "%s" .Values.global.repository -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repository -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repository -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the docker image repository secret token configmap.
+ The secret token should be installed by K8S system admin.
+ The value for .Values.repositoryCred is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.repositoryCred : override default docker registry credential
+ - .Values.repositoryCredOverride : override global and default docker registry credential
+*/}}
+{{- define "common.repositoryCred" -}}
+ {{- $componentname := .Chart.Name -}}
+ {{- $firsttier := (index .Values (printf "%s" $componentname)) -}}
+ {{- if $firsttier -}}
+ {{- $secondtier := (index .Values (printf "%s" $componentname) (printf "%s" "repositoryCredOverride")) -}}
+ {{- if $secondtier -}}
+ {{- printf "%s" $secondtier -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.repositoryCred -}}
+ {{- printf "%s" .Values.global.repositoryCred -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCred -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCred -}}
+ {{- end -}}
+ {{- end -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.repositoryCred -}}
+ {{- printf "%s" .Values.global.repositoryCred -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCred -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCred -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{{/*
+ Define the golbal image pull policy.
+ The value for .Values.imagePullPolicy is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.imagePullPolicy : override default pull policy
+ - .Values.imagePullPolicyOverride : override global and default pull policy
+*/}}
+{{- define "common.pullPolicy" -}}
+ {{- if .Values.imagePullPolicyOverride -}}
+ {{- printf "%s" .Values.imagePullPolicyOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.imagePullPolicy -}}
+ {{- printf "%s" .Values.global.imagePullPolicy -}}
+ {{- else -}}
+ {{- printf "%s" .Values.imagePullPolicy -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.imagePullPolicy -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the docker registry certificate name.
+ The value for .Values.repositoryCert is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.repositoryCert : override default repository certificate
+ - .Values.repositoryCertOverride : override global and default repository certificate
+*/}}
+{{- define "common.repositorycert" -}}
+ {{- if .Values.repositoryCertOverride -}}
+ {{- printf "%s" .Values.repositoryCertOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.repositoryCert -}}
+ {{- printf "%s" .Values.global.repositoryCert -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCert -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.repositoryCert -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+
+
+
+
+{{/*
+Generate certificates for the docker registry
+*/}}
+{{- define "common.repository.gen-certs" -}}
+{{- $altNames := list ( printf "docker.%s" .Values.ingress.hostpostfix ) -}}
+{{- $ca := genCA "docker-registry-ca" 365 -}}
+{{- $cert := genSignedCert ( include "nexus.name" . ) nil $altNames 365 $ca -}}
+tls.crt: {{ $cert.Cert | b64enc }}
+tls.key: {{ $cert.Key | b64enc }}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_helm_credential_name.tpl b/ric-common/Common-Template/helm/ric-common/templates/_helm_credential_name.tpl
new file mode 100644
index 0000000..cac7f1f
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_helm_credential_name.tpl
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.helmcred.prefix" -}}
+ {{- printf "secret-helm" -}}
+{{- end -}}
+
+{{- define "common.helmcert.prefix" -}}
+ {{- printf "configmap-helm" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_helmrepo.tpl b/ric-common/Common-Template/helm/ric-common/templates/_helmrepo.tpl
new file mode 100644
index 0000000..c662cf5
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_helmrepo.tpl
@@ -0,0 +1,181 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 helm repository.
+ The value for .Values.helmRepository is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmRepository : override default helm repository for all components that use helm
+ - .Values.helmRepositoryOverride : override global and default helm repository on a per component base
+*/}}
+{{- define "common.helmrepository" -}}
+ {{- if .Values.helmRepositoryOverride -}}
+ {{- printf "%s" .Values.helmRepositoryOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepository -}}
+ {{- printf "%s" .Values.global.helmRepository -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepository -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepository -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the helm repository secret token.
+ The secret token should be installed by K8S system admin.
+ The value for .Values.helmRepositoryCred is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmRepositoryCred : override default helm repository credential
+ - .Values.helmRepositoryCredOverride : override global and default helm repository credential
+*/}}
+{{- define "common.helmrepositorycred" -}}
+ {{- if .Values.helmRepositoryCredOverride -}}
+ {{- printf "%s" .Values.helmRepositoryCredOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepositoryCred -}}
+ {{- printf "%s" .Values.global.helmRepositoryCred -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryCred -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryCred -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+ Resolve the helm repository certificate.
+ The certificate should be installed by K8S system admin.
+ The value for .Values.helmRepositoryCert is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmrepositoryCert : override default helm repository certificate
+ - .Values.helmRepositoryCertOverride : override global and default helm repository certificate
+*/}}
+{{- define "common.helmrepositorycert" -}}
+ {{- if .Values.helmRepositoryCertOverride -}}
+ {{- printf "%s" .Values.helmRepositoryCertOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepositoryCert -}}
+ {{- printf "%s" .Values.global.helmRepositoryCert -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryCert -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryCert -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the helm repository tiller service name.
+ The tiller should be installed by K8S system admin.
+ The value for .Values.helmRepositoryTiller is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmrepositoryTiller : override default helm repository tiller
+ - .Values.helmRepositoryTillerOverride : override global and default helm repository tiller
+*/}}
+{{- define "common.helmrepositorytiller" -}}
+ {{- if .Values.helmRepositoryTillerOverride -}}
+ {{- printf "%s" .Values.helmRepositoryTillerOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepositoryTiller -}}
+ {{- printf "%s" .Values.global.helmRepositoryTiller -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryTiller -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryTiller -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the helm repository tiller service namespace.
+ The tiller should be installed by K8S system admin.
+ The value for .Values.helmRepositoryTillerNamespace is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmrepositoryTillerNamespace : override default helm repository tiller namespace
+ - .Values.helmRepositoryTillerNamespaceOverride : override global and default helm repository tiller namespace
+*/}}
+{{- define "common.helmrepositorytillernamespace" -}}
+ {{- if .Values.helmRepositoryTillerNamespaceOverride -}}
+ {{- printf "%s" .Values.helmRepositoryTillerNamespaceOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepositoryTillerNamespace -}}
+ {{- printf "%s" .Values.global.helmRepositoryTillerNamespace -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryTillerNamespace -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%s" .Values.helmRepositoryTillerNamespace -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{/*
+ Resolve the helm repository tiller service port.
+ The tiller should be installed by K8S system admin.
+ The value for .Values.helmRepositoryTillerPort is used by default,
+ unless either override mechanism is used.
+
+ - .Values.global.helmrepositoryTillerPort : override default helm repository tiller port
+ - .Values.helmRepositoryTillerPortOverride : override global and default helm repository tiller port
+*/}}
+{{- define "common.helmrepositorytillerport" -}}
+ {{- if .Values.helmRepositoryTillerPortOverride -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPortOverride -}}
+ {{- else -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.helmRepositoryTillerPort -}}
+ {{- printf "%.0f" .Values.global.helmRepositoryTillerPort -}}
+ {{- else -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "%.0f" .Values.helmRepositoryTillerPort -}}
+ {{- end -}}
+ {{- end -}}
+{{- end -}}
+
+{{/*
+Generate certificates for the helm repo
+*/}}
+{{- define "common.helmrepository.gen-certs" -}}
+{{- $altNames := list ( printf "helm.%s" .Values.ingress.hostpostfix ) -}}
+{{- $ca := genCA "helm-repository-ca" 365 -}}
+{{- $cert := genSignedCert ( include "nexus.name" . ) nil $altNames 365 $ca -}}
+tls.crt: {{ $cert.Cert | b64enc }}
+tls.key: {{ $cert.Key | b64enc }}
+{{- end -}}
+
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl
new file mode 100644
index 0000000..5602418
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_ingresscontroller.tpl
@@ -0,0 +1,183 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 ingress controller addresses.
+*/}}
+
+####################### Service URL #####################################
+{{- define "common.ingressurl.ricplt" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.platform -}}
+ {{- printf "%s" .Values.global.ingressurl.platform -}}
+ {{- else -}}
+ {{- printf "ricplt-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricplt-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricplt-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricxapp" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.xapp -}}
+ {{- printf "%s" .Values.global.ingressurl.xapp -}}
+ {{- else -}}
+ {{- printf "ricxapp-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricxapp-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricxapp-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricaux" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.aux -}}
+ {{- printf "%s" .Values.global.ingressurl.aux -}}
+ {{- else -}}
+ {{- printf "ricaux-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricaux-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricaux-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.ricinfra" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.infra -}}
+ {{- printf "%s" .Values.global.ingressurl.infra -}}
+ {{- else -}}
+ {{- printf "ricinfra-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricinfra-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "ricinfra-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.localdocker" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.localdocker -}}
+ {{- printf "%s" .Values.global.ingressurl.localdocker -}}
+ {{- else -}}
+ {{- printf "docker-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "docker-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "docker-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.ingressurl.localhelm" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.localhelm -}}
+ {{- printf "%s" .Values.global.ingressurl.localhelm -}}
+ {{- else -}}
+ {{- printf "helm-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "helm-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "helm-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.ingressurl.localnexus" -}}
+ {{- if .Values.global -}}
+ {{- if .Values.global.ingressurl -}}
+ {{- if .Values.global.ingressurl.localnexus -}}
+ {{- printf "%s" .Values.global.ingressurl.localnexus -}}
+ {{- else -}}
+ {{- printf "nexus-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "nexus-entry" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "nexus-entry" -}}
+ {{- end -}}
+{{- end -}}
+
+
+
+
+
+
+####################### Ingress Controller Ports ###########################################
+## Currently the below values are hard-coded due to the fact that kong ingress controller #
+## helm charts are not using this common template. We need to make sure that these values #
+## agree with the values in the kong helm charts values.yaml files. #
+############################################################################################
+{{- define "common.ingresshttpport.ricplt" -}}
+ {{- printf "30080" -}}
+{{- end -}}
+
+{{- define "common.ingresshttpsport.ricplt" -}}
+ {{- printf "30443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricxapp" -}}
+ {{- printf "31080" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpsport.ricxapp" -}}
+ {{- printf "31443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricaux" -}}
+ {{- printf "32080" -}}
+{{- end -}}
+
+{{- define "common.ingresshttpsport.ricaux" -}}
+ {{- printf "32443" -}}
+{{- end -}}
+
+
+{{- define "common.ingresshttpport.ricinfra" -}}
+ {{- printf "33080" -}}
+{{- end -}}
+
+
+
+{{- define "common.ingresshttpsport.ricinfra" -}}
+ {{- printf "33443" -}}
+{{- end -}}
+
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl
new file mode 100644
index 0000000..894ad05
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl
@@ -0,0 +1,48 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.ingressname.appmgr" -}}
+ {{- $name := ( include "common.fullname.appmgr" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.e2mgr" -}}
+ {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.e2term" -}}
+ {{- $name := ( include "common.fullname.e2term" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.rtmgr" -}}
+ {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.a1mediator" -}}
+ {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.ingressname.nexus" -}}
+ {{- $name := ( include "common.fullname.nexus" . ) -}}
+ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_name.tpl b/ric-common/Common-Template/helm/ric-common/templates/_name.tpl
new file mode 100644
index 0000000..f712184
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_name.tpl
@@ -0,0 +1,189 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+
+{{/*
+ This is the root file that define the name of each component. Value here will be used to define other K8S resource name.
+*/}}
+
+
+
+{{- define "common.name.appmgr" -}}
+ {{- if .Values.appmgr -}}
+ {{- if .Values.appmgr.nameOverride -}}
+ {{- printf "%s" .Values.appmgr.nameOverride -}}
+ {{- else -}}
+ {{- printf "appmgr" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "appmgr" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.fullname.appmgr" -}}
+ {{- $name := ( include "common.name.appmgr" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.name.dbaas" -}}
+ {{- if .Values.dbaas -}}
+ {{- if .Values.dbaas.nameOverride -}}
+ {{- printf "%s" .Values.dbaas.nameOverride -}}
+ {{- else -}}
+ {{- printf "dbaas" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "dbaas" -}}
+ {{- end -}}
+{{- end -}}
+
+{{- define "common.fullname.dbaas" -}}
+ {{- $name := ( include "common.name.dbaas" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+
+
+
+
+
+
+
+
+{{- define "common.name.e2mgr" -}}
+ {{- if .Values.e2mgr -}}
+ {{- if .Values.e2mgr.nameOverride -}}
+ {{- printf "%s" .Values.e2mgr.nameOverride -}}
+ {{- else -}}
+ {{- printf "e2mgr" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "e2mgr" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.e2mgr" -}}
+ {{- $name := ( include "common.name.e2mgr" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.name.e2term" -}}
+ {{- if .Values.e2term -}}
+ {{- if .Values.e2term.nameOverride -}}
+ {{- printf "%s" .Values.e2term.nameOverride -}}
+ {{- else -}}
+ {{- printf "e2term" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "e2term" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.e2term" -}}
+ {{- $name := ( include "common.name.e2term" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+
+
+
+
+
+
+{{- define "common.name.rtmgr" -}}
+ {{- if .Values.rtmgr -}}
+ {{- if .Values.rtmgr.nameOverride -}}
+ {{- printf "%s" .Values.rtmgr.nameOverride -}}
+ {{- else -}}
+ {{- printf "rtmgr" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "rtmgr" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.rtmgr" -}}
+ {{- $name := ( include "common.name.rtmgr" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+
+
+
+{{- define "common.name.a1mediator" -}}
+ {{- if .Values.a1mediator -}}
+ {{- if .Values.a1mediator.nameOverride -}}
+ {{- printf "%s" .Values.a1mediator.nameOverride -}}
+ {{- else -}}
+ {{- printf "a1mediator" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "a1mediator" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.a1mediator" -}}
+ {{- $name := ( include "common.name.a1mediator" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+{{- define "common.name.nexus" -}}
+ {{- if .Values.nexus -}}
+ {{- if .Values.nexus.nameOverride -}}
+ {{- printf "%s" .Values.nexus.nameOverride -}}
+ {{- else -}}
+ {{- printf "nexus" -}}
+ {{- end -}}
+ {{- else -}}
+ {{- printf "nexus" -}}
+ {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.nexus" -}}
+ {{- $name := ( include "common.name.nexus" . ) -}}
+ {{- printf "%s-%s" .Release.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
+
+
+{{- 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.Namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/templates/_namespace.tpl b/ric-common/Common-Template/helm/ric-common/templates/_namespace.tpl
new file mode 100644
index 0000000..a657432
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_namespace.tpl
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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/ric-common/Common-Template/helm/ric-common/templates/_resources.tpl b/ric-common/Common-Template/helm/ric-common/templates/_resources.tpl
new file mode 100644
index 0000000..de0e736
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_resources.tpl
@@ -0,0 +1,61 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
new file mode 100644
index 0000000..c9804f5
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
@@ -0,0 +1,96 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.
+*/}}
+
+
+###################### RMR Service ##################################
+{{- define "common.servicename.appmgr.rmr" -}}
+ {{- $name := ( include "common.fullname.appmgr" . ) -}}
+ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.servicename.e2mgr.rmr" -}}
+ {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.rmr" -}}
+ {{- $name := ( include "common.fullname.e2term" . ) -}}
+ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.rmr" -}}
+ {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.a1mediator.rmr" -}}
+ {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+ {{- printf "service-%s-rmr" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+###################### Http Service ##################################
+
+{{- define "common.servicename.appmgr.http" -}}
+ {{- $name := ( include "common.fullname.appmgr" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2mgr.http" -}}
+ {{- $name := ( include "common.fullname.e2mgr" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.e2term.http" -}}
+ {{- $name := ( include "common.fullname.e2term" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.rtmgr.http" -}}
+ {{- $name := ( include "common.fullname.rtmgr" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.servicename.a1mediator.http" -}}
+ {{- $name := ( include "common.fullname.a1mediator" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+{{- define "common.servicename.nexus.http" -}}
+ {{- $name := ( include "common.fullname.nexus" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+###################### TCP Service ##################################
+
+{{- define "common.servicename.dbaas.tcp" -}}
+ {{- $name := ( include "common.fullname.dbaas" . ) -}}
+ {{- printf "service-%s-tcp" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
diff --git a/ric-common/Common-Template/helm/ric-common/values.yaml b/ric-common/Common-Template/helm/ric-common/values.yaml
new file mode 100644
index 0000000..8543211
--- /dev/null
+++ b/ric-common/Common-Template/helm/ric-common/values.yaml
@@ -0,0 +1,21 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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/ric-common/Docker-Credential/bin/install b/ric-common/Docker-Credential/bin/install
new file mode 100755
index 0000000..fadb3e6
--- /dev/null
+++ b/ric-common/Docker-Credential/bin/install
@@ -0,0 +1,52 @@
+#!/bin/bash
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+
+
+
+NAMESPACE=$1
+
+DOCKERREG=$2
+
+DOCKERREG_NORMALIZED=${DOCKERREG/:/.}
+DOCKERREG_NORMALIZED=${DOCKERREG_NORMALIZED/\//.}
+
+DOCKERUSERNAME=$3
+
+DOCKERPASSWORD=$4
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+ RELEASE_NAME=$helm_release_name
+else
+ RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+COMMON_CHART_VERSION=$(cat $DIR/../../Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../Common-Template/helm/ric-common
+
+
+mkdir -p $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+
+
+helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-cred-${NAMESPACE}-${DOCKERREG_NORMALIZED}" --set repository="$DOCKERREG" --set repositoryCredential.user="$DOCKERUSERNAME" --set repositoryCredential.password="$DOCKERPASSWORD" $DIR/../helm
+
diff --git a/ric-common/Docker-Credential/bin/uninstall b/ric-common/Docker-Credential/bin/uninstall
new file mode 100755
index 0000000..777f3ea
--- /dev/null
+++ b/ric-common/Docker-Credential/bin/uninstall
@@ -0,0 +1,39 @@
+#!/bin/bash
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+
+
+
+NAMESPACE=$1
+
+DOCKERREG=$2
+
+DOCKERREG_NORMALIZED=${DOCKERREG/:/.}
+DOCKERREG_NORMALIZED=${DOCKERREG_NORMALIZED/\//.}
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+ RELEASE_NAME=$helm_release_name
+else
+ RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+helm delete --purge "${RELEASE_NAME}-cred-${NAMESPACE}-${DOCKERREG_NORMALIZED}"
+
diff --git a/ric-common/Docker-Credential/etc/credential.conf b/ric-common/Docker-Credential/etc/credential.conf
new file mode 100644
index 0000000..8bee714
--- /dev/null
+++ b/ric-common/Docker-Credential/etc/credential.conf
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+
+
+# helm_release_name defines the release name helm will use to deploy the credential
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r0
+
+
diff --git a/ric-common/Docker-Credential/helm/Chart.yaml b/ric-common/Docker-Credential/helm/Chart.yaml
new file mode 100644
index 0000000..4624181
--- /dev/null
+++ b/ric-common/Docker-Credential/helm/Chart.yaml
@@ -0,0 +1,22 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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
+appVersion: "1.0"
+description: A Helm chart for setting up k8s resources for accessing external and infrastructure resources before RIC deployment"
+name: docker-credential
+version: 1.1.0
diff --git a/ric-common/Docker-Credential/helm/requirements.yaml b/ric-common/Docker-Credential/helm/requirements.yaml
new file mode 100644
index 0000000..2ab71b4
--- /dev/null
+++ b/ric-common/Docker-Credential/helm/requirements.yaml
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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: ric-common
+ version: ~2.0.0
diff --git a/ric-common/Docker-Credential/helm/templates/_helper.tpl b/ric-common/Docker-Credential/helm/templates/_helper.tpl
new file mode 100644
index 0000000..b3dd35f
--- /dev/null
+++ b/ric-common/Docker-Credential/helm/templates/_helper.tpl
@@ -0,0 +1,35 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 image repository secret token.
+ The value for .Values.global.repositoryCred is used:
+ repositoryCred:
+ user: user
+ password: password
+ mail: email (optional)
+*/}}
+{{- define "repository.secret" -}}
+ {{- $repo := .Values.repository }}
+ {{- $cred := .Values.repositoryCredential }}
+ {{- $user := default "docker" $cred.user }}
+ {{- $password := default "docker" $cred.password }}
+ {{- $mail := default "@" $cred.mail }}
+ {{- $auth := printf "%s:%s" $user $password | b64enc }}
+ {{- printf "{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}" $repo $user $password $mail $auth | b64enc -}}
+{{- end -}}
+
diff --git a/ric-common/Docker-Credential/helm/templates/secrets-docker-reg.yaml b/ric-common/Docker-Credential/helm/templates/secrets-docker-reg.yaml
new file mode 100644
index 0000000..fb0f95d
--- /dev/null
+++ b/ric-common/Docker-Credential/helm/templates/secrets-docker-reg.yaml
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.dockercred.prefix" . }}-{{ .Values.repository | replace "." "-" | replace ":" "-" | replace "/" "-" }}
+data:
+ .dockercfg: {{ include "repository.secret" . }}
+type: kubernetes.io/dockercfg
diff --git a/ric-common/Docker-Credential/helm/values.yaml b/ric-common/Docker-Credential/helm/values.yaml
new file mode 100644
index 0000000..4b02dc9
--- /dev/null
+++ b/ric-common/Docker-Credential/helm/values.yaml
@@ -0,0 +1,27 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+# Values for setting up Kubernetes resources for accessing infrastructure such as docker registry
+# helm repo, etc.
+
+repository: "nexus3.o-ran-sc.org:10004"
+
+repositoryCredential:
+ user: "docker"
+ password: "docker"
+
+
diff --git a/ric-common/Helm-Credential/bin/install b/ric-common/Helm-Credential/bin/install
new file mode 100755
index 0000000..00e11bc
--- /dev/null
+++ b/ric-common/Helm-Credential/bin/install
@@ -0,0 +1,55 @@
+#!/bin/bash
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+NAMESPACE=$1
+
+HELMREPO=$2
+
+HELMREPO_NORMALIZED=${HELMREPO/:/.}
+
+HELMREPO_NORMALIZED=${HELMREPO_NORMALIZED/\//.}
+
+HELMUSERNAME=$3
+
+HELMPASSWORD=$4
+
+HELMCERTPATH=$5
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+cp $HELMCERTPATH $DIR/../helm/cert/tls.crt
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+ RELEASE_NAME=$helm_release_name
+else
+ RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+COMMON_CHART_VERSION=$(cat $DIR/../../Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}')
+helm package -d /tmp $DIR/../../Common-Template/helm/ric-common
+
+
+mkdir -p $DIR/../helm/charts/
+cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/charts/
+
+helm install --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-cred-${NAMESPACE}-${HELMREPO_NORMALIZED}" --set helmrepo="$HELMREPO" --set helmrepoCredential.user="$DOCKERUSERNAME" --set helmrepoCredential.password="$DOCKERPASSWORD" $DIR/../helm
+
+
+rm $DIR/../helm/cert/tls.crt
diff --git a/ric-common/Helm-Credential/bin/uninstall b/ric-common/Helm-Credential/bin/uninstall
new file mode 100755
index 0000000..caee118
--- /dev/null
+++ b/ric-common/Helm-Credential/bin/uninstall
@@ -0,0 +1,41 @@
+#!/bin/bash
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+NAMESPACE=$1
+
+HELMREPO=$2
+
+HELMREPO_NORMALIZED=${HELMREPO/:/.}
+
+HELMREPO_NORMALIZED=${HELMREPO_NORMALIZED/\//.}
+
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+
+source $DIR/../etc/credential.conf
+
+if [ -z "$RICPLT_RELEASE_NAME" ];then
+ RELEASE_NAME=$helm_release_name
+else
+ RELEASE_NAME=$RICPLT_RELEASE_NAME
+fi
+
+
+helm delete --purge "${RELEASE_NAME}-cred-${NAMESPACE}-${HELMREPO_NORMALIZED}"
+
+
diff --git a/ric-common/Helm-Credential/etc/credential.conf b/ric-common/Helm-Credential/etc/credential.conf
new file mode 100644
index 0000000..8bee714
--- /dev/null
+++ b/ric-common/Helm-Credential/etc/credential.conf
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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. #
+################################################################################
+
+
+# helm_release_name defines the release name helm will use to deploy the credential
+# It will be overrided by RICPLT_RELEASE_NAME
+helm_release_name=r0
+
+
diff --git a/ric-common/Helm-Credential/helm/Chart.yaml b/ric-common/Helm-Credential/helm/Chart.yaml
new file mode 100644
index 0000000..69bdcc4
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/Chart.yaml
@@ -0,0 +1,22 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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
+appVersion: "1.0"
+description: A Helm chart for setting up k8s resources for accessing external and infrastructure resources before RIC deployment"
+name: credential
+version: 1.1.0
diff --git a/ric-common/Helm-Credential/helm/requirements.yaml b/ric-common/Helm-Credential/helm/requirements.yaml
new file mode 100644
index 0000000..2ab71b4
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/requirements.yaml
@@ -0,0 +1,20 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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: ric-common
+ version: ~2.0.0
diff --git a/ric-common/Helm-Credential/helm/templates/_helper.tpl b/ric-common/Helm-Credential/helm/templates/_helper.tpl
new file mode 100644
index 0000000..9666aa4
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/templates/_helper.tpl
@@ -0,0 +1,29 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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 "helmrepo.secret.user" -}}
+ {{- $user := default "helm" .Values.helmrepoCredential.user -}}
+ {{- printf "%s" $user |b64enc }}
+{{- end -}}
+
+
+{{- define "helmrepo.secret.password" -}}
+ {{- $pass := default "helm" .Values.helmrepoCredential.password -}}
+ {{- printf "%s" $pass |b64enc }}
+{{- end -}}
diff --git a/ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml b/ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml
new file mode 100644
index 0000000..8485c3e
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/templates/config-helm-cert.yaml
@@ -0,0 +1,23 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# 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.helmcert.prefix" . }}-{{ .Values.helmrepo | replace "." "-" | replace ":" "-" | replace "/" "-" }}
+data:
+ {{ (.Files.Glob "cert/tls.crt").AsConfig | nindent 2 }}
diff --git a/ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml b/ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml
new file mode 100644
index 0000000..2c7034b
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/templates/secrets-helm-xapp.yaml
@@ -0,0 +1,25 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ include "common.helmcred.prefix" . }}-{{ .Values.helmrepo | replace "." "-" | replace ":" "-" | replace "/" "-" }}
+type: Opaque
+data:
+ helm_repo_username: {{ include "helmrepo.secret.user" . }}
+ helm_repo_password: {{ include "helmrepo.secret.password" . }}
diff --git a/ric-common/Helm-Credential/helm/values.yaml b/ric-common/Helm-Credential/helm/values.yaml
new file mode 100644
index 0000000..dc1008d
--- /dev/null
+++ b/ric-common/Helm-Credential/helm/values.yaml
@@ -0,0 +1,26 @@
+################################################################################
+# Copyright (c) 2019 AT&T Intellectual Property. #
+# Copyright (c) 2019 Nokia. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+# Values for setting up Kubernetes resources for accessing infrastructure such as docker registry
+# helm repo, etc.
+
+helmrepo: "ricaux-entry/helm"
+
+
+helmrepoCredential:
+ user: "helm"
+ password: "helm"
diff --git a/ric-common/Initcontainer/docker/Dockerfile b/ric-common/Initcontainer/docker/Dockerfile
new file mode 100644
index 0000000..8c38d71
--- /dev/null
+++ b/ric-common/Initcontainer/docker/Dockerfile
@@ -0,0 +1,34 @@
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2019 Nokia.
+#
+# 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.
+FROM alpine
+
+MAINTAINER "RIC"
+
+LABEL name="Generic initcontainer image for RIC Platform components"
+
+RUN apk update
+
+# iproute2: required for e2 termination
+RUN apk add iproute2
+# kubectl: required for xapp/ricplt helm installers
+RUN apk add openssl
+# kubectl: required for xapp/ricplt helm installers
+ADD https://storage.googleapis.com/kubernetes-release/release/v1.14.1/bin/linux/amd64/kubectl /bin/kubectl
+RUN chmod +x /bin/kubectl
+
+COPY bin/ricplt-init.sh /ricplt-init.sh
+
+#
+CMD /ricplt-init.sh
diff --git a/ric-common/Initcontainer/docker/bin/ricplt-init.sh b/ric-common/Initcontainer/docker/bin/ricplt-init.sh
new file mode 100755
index 0000000..c16ad95
--- /dev/null
+++ b/ric-common/Initcontainer/docker/bin/ricplt-init.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+# Copyright (c) 2019 AT&T Intellectual Property.
+# Copyright (c) 2019 Nokia.
+#
+# 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.
+# this is placeholder script, intended
+# to be overridden by individual RIC
+# component charts.
+exit 0