From: Lusheng Ji Date: Tue, 23 Jul 2019 18:44:01 +0000 (+0000) Subject: Merge "change the kong-infra ingress controller nodeport to 29080 to avoid going... X-Git-Tag: 0.0.2~55 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=b361b2091909dc2e77d4d172b95c210f8b1b2abb;hp=4258a602a4b8fe2bd0995f0926b1ed06e0f7d35c;p=it%2Fdep.git Merge "change the kong-infra ingress controller nodeport to 29080 to avoid going out of port range" --- diff --git a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE index 3912aeac..e20150a1 100644 --- a/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_INFRA_RECIPE_EXAMPLE @@ -88,3 +88,11 @@ nexus: datapath: /tmp/nexus3-data/ storagesize: 20Gi +chartmuseum: + repositoryOverride: "registry.hub.docker.com" + image: + name: chartmuseum/chartmuseum + tag: v0.8.2 + + storagesize: 2Gi + datapath: /tmp/chartmuseum-data/ diff --git a/bin/package-ric-deployment-tools b/bin/package-ric-deployment-tools new file mode 100755 index 00000000..d932fb9e --- /dev/null +++ b/bin/package-ric-deployment-tools @@ -0,0 +1,116 @@ +#!/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. # +################################################################################ + +# This script package RIC deployment tools as a debian package + +VERSION=$1 + +if [ -z "$VERSION" ];then +echo "Please provide a version number." +exit 1 + +fi + +DPKG_BUILDPACKAGE=$(whereis dpkg-buildpackage | awk '{print $2}') + +if [ -z "$DPKG_BUILDPACKAGE" ];then +echo "dpkg-buildpackage not found. Please run \"apt install -y dpkg-dev\"" +exit 1 + +fi + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +mkdir -p /tmp/ric-deployment-tools-$VERSION +cp -r $DIR/../* /tmp/ric-deployment-tools-$VERSION/ + + +DIR=/tmp/ric-deployment-tools-$VERSION + + +mkdir $DIR/debian + +cat <$DIR/debian/changelog +ric-deployment-tools ($VERSION) stable; urgency=low + + * Release $VERSION + + -- Zhe Huang $(date -R) +EOF + +cat <$DIR/debian/compat +9 +EOF + +cat <$DIR/debian/control +Source: ric-deployment-tools +Section: Miscellaneous +Priority: optional +Maintainer: Zhe Huang +Build-Depends: debhelper (>= 9) +Standards-Version: 4.1.2 +Homepage: https://gerrit.o-ran-sc.org/r/admin/repos/it/dep +#Vcs-Git: https://anonscm.debian.org/git/collab-maint/ric-deployment.git +#Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/ric-deployment.git + +Package: ric-deployment-tools +Architecture: all +Depends: \${misc:Depends} +Description: Utility tools to deploy RAN intelligent controller + ric-deployment-tools provides scripts and helm charts to deploy RIC platform components and RIC auxiliary functions. +EOF + +cat <$DIR/debian/rules +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +export DESTROOT=\$(CURDIR)/debian/ric-deployment-tools + +%: + dh \$@ + +override_dh_auto_install: + dh_auto_install + install -d \$(DESTROOT)/opt/ric/ric-deployment-tools + rsync -a \$(CURDIR)/* \$(DESTROOT)/opt/ric/ric-deployment-tools --exclude debian +# dh_make generated override targets +# This is example for Cmake (See https://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=\$(DEB_HOST_MULTIARCH) + + +EOF + + +cd $DIR +dpkg-buildpackage -us -uc + + +echo "RIC it/dep repo has been packaged as /tmp/ric-deployment-tools_${VERSION}_all.deb." diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl index 9f89c39c..1aba1a6d 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/_genurl.tpl @@ -20,38 +20,38 @@ Generate the URLS of the endpoints. */}} -{{- define "dashboard.endpoint.a1mediator" -}} +{{- define "dashboard.prefix.a1mediator" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.a1med.url.override -}} - {{- printf "%s" .Values.dashboard.properties.a1med.url.override -}} + {{- if .Values.dashboard.properties.a1med.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.a1med.url.prefix -}} {{- else -}} - {{- printf "http://%s/a1mediator%s" $ingress .Values.dashboard.properties.a1med.url.suffix -}} + {{- printf "http://%s/a1mediator" $ingress -}} {{- end -}} {{- end -}} -{{- define "dashboard.endpoint.anrxapp" -}} +{{- define "dashboard.prefix.anrxapp" -}} {{- $ingress := ( include "common.ingressurl.ricxapp" . ) -}} - {{- if .Values.dashboard.properties.anrxapp.url.override -}} - {{- printf "%s" .Values.dashboard.properties.anrxapp.url.override -}} + {{- if .Values.dashboard.properties.anrxapp.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.anrxapp.url.prefix -}} {{- else -}} - {{- printf "http://%s/anr%s" $ingress .Values.dashboard.properties.anrxapp.url.suffix -}} + {{- printf "http://%s/anr" $ingress -}} {{- end -}} {{- end -}} -{{- define "dashboard.endpoint.e2mgr" -}} +{{- define "dashboard.prefix.e2mgr" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.e2mgr.url.override -}} - {{- printf "%s" .Values.dashboard.properties.e2mgr.url.override -}} + {{- if .Values.dashboard.properties.e2mgr.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.e2mgr.url.prefix -}} {{- else -}} - {{- printf "http://%s/e2mgr%s" $ingress .Values.dashboard.properties.e2mgr.url.suffix -}} + {{- printf "http://%s/e2mgr" $ingress -}} {{- end -}} {{- end -}} - -{{- define "dashboard.endpoint.xappmgr" -}} + +{{- define "dashboard.prefix.appmgr" -}} {{- $ingress := ( include "common.ingressurl.ricplt" . ) -}} - {{- if .Values.dashboard.properties.xappmgr.url.override -}} - {{- printf "%s" .Values.dashboard.properties.xappmgr.url.override -}} + {{- if .Values.dashboard.properties.appmgr.url.prefix -}} + {{- printf "%s" .Values.dashboard.properties.appmgr.url.prefix -}} {{- else -}} - {{- printf "http://%s/appmgr%s" $ingress .Values.dashboard.properties.xappmgr.url.suffix -}} + {{- printf "http://%s/appmgr" $ingress -}} {{- end -}} {{- end -}} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml index 2b68de28..e6358c56 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/templates/appconfig.yaml @@ -26,9 +26,11 @@ data: application.properties: | # appconfig.yaml server.port = {{ .Values.dashboard.service.http.containerPort }} - a1med.url = {{ include "dashboard.endpoint.a1mediator" . }} - anrxapp.url = {{ include "dashboard.endpoint.anrxapp" . }} - e2mgr.url = {{ include "dashboard.endpoint.e2mgr" . }} - # mock names for R1 testing, removing this entry disables the mock - e2mgr.mock.rannames = {{ .Values.dashboard.properties.e2mgr.mock.rannames }} - xappmgr.url = {{ include "dashboard.endpoint.xappmgr" . }} + a1med.url.prefix = {{ include "dashboard.prefix.a1mediator" . }} + a1med.url.suffix = {{ .Values.dashboard.properties.a1med.url.suffix }} + anrxapp.url.prefix = {{ include "dashboard.prefix.anrxapp" . }} + anrxapp.url.suffix = {{ .Values.dashboard.properties.anrxapp.url.suffix }} + appmgr.url.prefix = {{ include "dashboard.prefix.appmgr" . }} + appmgr.url.suffix = {{ .Values.dashboard.properties.appmgr.url.suffix }} + e2mgr.url.prefix = {{ include "dashboard.prefix.e2mgr" . }} + e2mgr.url.suffix = {{ .Values.dashboard.properties.e2mgr.url.suffix }} diff --git a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml index 17188ac5..77a3a5cd 100644 --- a/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml +++ b/ric-aux/80-Auxiliary-Functions/helm/dashboard/values.yaml @@ -23,8 +23,8 @@ repositoryCred: docker-reg-cred dashboard: image: - name: ric-dash-be - tag: 1.0.5 + name: ric-dashboard + tag: 1.2.0 replicaCount: 1 service: http: @@ -33,34 +33,28 @@ dashboard: containerPort: 8080 # config URLs must be specified at deployment properties: - # These URLs use K8S/Kong service names + # The URL prefixes use K8S/Kong service names a1med: - # The URL will be provided by the RIC common template url: - # no suffix required - suffix: "" - # You can override the URL using the following option - # override: http://ricplt-entry/a1mediator + # The default a1mediator endpoint is http://ricplt-entry/a1mediator + # You can override the a1mediator endpoint using the following option + # prefix: + suffix: '' anrxapp: - # The URL will be provided by the RIC common template url: - # no suffix required - suffix: "" - # You can override the URL using the following option - # override: http://ricxapp-entry/anr - e2mgr: - # The URL will be provided by the RIC common template + # The default anrxapp endpoint is http://ricxapp-entry/anr + # You can override the anrxapp endpoint using the following option + # prefix: + suffix: '' + appmgr: url: - # suffix must be "/v1" - suffix: "/v1" - # You can override the URL using the following option - # override: http://ricplt-entry/e2mgr/v1 - mock: - rannames: "" # mock with CSV; e.g., ABCD123456, EFGH123456 - xappmgr: - # The URL will be provided by the RIC common template + # The default appmgr endpoint is http://ricplt-entry/appmgr + # You can override the appmgr endpoint using the following option + # prefix: + suffix: /ric/v1 + e2mgr: url: - # suffix must be "/ric/v1" - suffix: "/ric/v1" - # You can override the URL using the following option - # override: http://ricplt-entry/appmgr/ric/v1 + # The default e2mgr endpoint is http://ricplt-entry/e2mgr + # You can override the e2mgr endpoint using the following option + # prefix: + suffix: /v1 diff --git a/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl index 1210d91a..c9fcebf8 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl @@ -62,6 +62,11 @@ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.configmapname.chartmuseum" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.configmapname.dashboard" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl index e0dbc3b3..b80a7ad5 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl @@ -60,6 +60,11 @@ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.containername.chartmuseum" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.containername.dashboard" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl index 3b11c3ee..c7a0ed22 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl @@ -60,6 +60,11 @@ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.deploymentname.chartmuseum" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.deploymentname.dashboard" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl index d10ebcf9..ec5951fd 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl @@ -52,6 +52,11 @@ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.ingressname.chartmuseum" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.ingressname.ves" -}} {{- $name := ( include "common.fullname.ves" . ) -}} {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_name.tpl b/ric-common/Common-Template/helm/ric-common/templates/_name.tpl index 9ad9ffac..bbfce4fc 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_name.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_name.tpl @@ -202,6 +202,24 @@ {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.name.chartmuseum" -}} + {{- if .Values.chartmuseum -}} + {{- if .Values.chartmuseum.nameOverride -}} + {{- printf "%s" .Values.chartmuseum.nameOverride -}} + {{- else -}} + {{- printf "chartmuseum" -}} + {{- end -}} + {{- else -}} + {{- printf "chartmuseum" -}} + {{- end -}} +{{- end -}} + + +{{- define "common.fullname.chartmuseum" -}} + {{- $name := ( include "common.name.chartmuseum" . ) -}} + {{- $namespace := ( include "common.namespace.infra" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} {{- define "common.name.dashboard" -}} {{- if .Values.dashboard -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl index fe463c28..36f91c42 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl @@ -55,6 +55,8 @@ {{- define "common.serviceport.nexus.http" -}}8080{{- end -}} +{{- define "common.serviceport.chartmuseum.http" -}}8080{{- end -}} + {{- define "common.serviceport.dashboard.http" -}}30080{{- end -}} {{- define "common.serviceport.dashboard.container" -}}8080{{- end -}} @@ -68,4 +70,4 @@ {{- define "common.serviceport.ves.http" -}}30235{{- end -}} {{- define "common.serviceport.ves.http.container" -}}8080{{- end -}} {{- define "common.serviceport.ves.https" -}}30417{{- end -}} -{{- define "common.serviceport.ves.https.container" -}}8443{{- end -}} \ No newline at end of file +{{- define "common.serviceport.ves.https.container" -}}8443{{- end -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_serviceaccountname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_serviceaccountname.tpl index 9daabc91..8e9c3f36 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_serviceaccountname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_serviceaccountname.tpl @@ -55,6 +55,11 @@ {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.serviceaccountname.chartmuseum" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.serviceaccountname.dashboard" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl index 81d20260..8af2a972 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl @@ -98,6 +98,11 @@ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.chartmuseum.http" -}} + {{- $name := ( include "common.fullname.chartmuseum" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.dashboard.http" -}} {{- $name := ( include "common.fullname.dashboard" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-infra/15-Chartmuseum/bin/clear_data_path b/ric-infra/15-Chartmuseum/bin/clear_data_path new file mode 100755 index 00000000..f7a37808 --- /dev/null +++ b/ric-infra/15-Chartmuseum/bin/clear_data_path @@ -0,0 +1,47 @@ +#!/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. # +################################################################################ + +OVERRIDEYAML=$1 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + + + + + + +if [ -z $OVERRIDEYAML ]; then + + DATAPATH=$(cat $DIR/../helm/chartmuseum/values.yaml | awk '/^.*datapath:.*/{ print $2;}') + +else + DATAPATH=$(cat $OVERRIDEYAML | awk '/^chartmuseum:.*/{ getline; while ( match($0, / .*/) || (!$0)){ if(getline == 0){break;}; if (match($0, /^ .*datapath:.*/)){print $2}} }') + + + if [ -z $DATAPATH ]; then + DATAPATH=$(cat $DIR/../helm/chartmuseum/values.yaml | awk '/^.*datapath:.*/{ print $2;}') + fi + +fi + + rm -rf $DATAPATH + + mkdir -p $DATAPATH + + + chmod -R a+rwx $DATAPATH + diff --git a/ric-infra/15-Chartmuseum/bin/install b/ric-infra/15-Chartmuseum/bin/install new file mode 100755 index 00000000..f1a3bb83 --- /dev/null +++ b/ric-infra/15-Chartmuseum/bin/install @@ -0,0 +1,94 @@ +#!/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. # +################################################################################ + + +OVERRIDEYAML=$1 + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +source $DIR/../etc/chartmuseum.conf + +if [ -z "$RICINFRA_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICINFRA_RELEASE_NAME +fi +# Namespace configuration +if [ -z "$RICPLT_NAMESPACE" ];then + PLT_NAMESPACE=$plt_namespace +else + PLT_NAMESPACE=$RICPLT_NAMESPACE +fi +if [ -z "$RICXAPP_NAMESPACE" ];then + XAPP_NAMESPACE=$xapp_namespace +else + XAPP_NAMESPACE=$RICXAPP_NAMESPACE +fi +if [ -z "$RICAUX_NAMESPACE" ];then + AUX_NAMESPACE=$aux_namespace +else + AUX_NAMESPACE=$RICAUX_NAMESPACE +fi +if [ -z "$RICINFRA_NAMESPACE" ];then + INFRA_NAMESPACE=$infra_namespace +else + INFRA_NAMESPACE=$RICINFRA_NAMESPACE +fi + +if [ -z "$RIC_COMMON_OVERRIDE" ];then + COMMON_OVERRIDE="--set global.namespace.platform=$PLT_NAMESPACE --set global.namespace.xapp=$XAPP_NAMESPACE --set global.namespace.aux=$AUX_NAMESPACE --set global.namespace.infra=$INFRA_NAMESPACE" +else + COMMON_OVERRIDE=$RIC_COMMON_OVERRIDE +fi + + + + +NODENAME=$(kubectl get node | awk 'NR==2{print $1}') +kubectl label --overwrite nodes $NODENAME helm-node=enable + +DIRTEMP=$DIR +. ./clear_data_path +DIR=$DIRTEMP + + +RICINFRA_COMPONENTS="chartmuseum" + +echo "Deploying RIC infra components [$RICINFRA_COMPONENTS]" +echo "Helm Release Name: $RELEASE_NAME" + + +COMMON_CHART_VERSION=$(cat $DIR/../../../ric-common/Common-Template/helm/ric-common/Chart.yaml | grep version | awk '{print $2}') +helm package -d /tmp $DIR/../../../ric-common/Common-Template/helm/ric-common + + + + + +for component in $RICINFRA_COMPONENTS; do + + mkdir -p $DIR/../helm/$component/charts/ + cp /tmp/ric-common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ + + if [ -z $OVERRIDEYAML ]; then + helm install --debug --namespace "${INFRA_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component + else + helm install -f $OVERRIDEYAML --namespace "${INFRA_NAMESPACE}" --name "${RELEASE_NAME}-$component" $COMMON_OVERRIDE $DIR/../helm/$component + fi +done diff --git a/ric-infra/15-Chartmuseum/bin/uninstall b/ric-infra/15-Chartmuseum/bin/uninstall new file mode 100755 index 00000000..79ca2d7d --- /dev/null +++ b/ric-infra/15-Chartmuseum/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. # +################################################################################ + + + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + + +source $DIR/../etc/chartmuseum.conf + +if [ -z "$RICINFRA_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICINFRA_RELEASE_NAME +fi + +RICINFRA_COMPONENTS="chartmuseum" + +echo "Undeploying RIC infra components [$RICINFRA_COMPONENTS]" +echo "Helm Release Name: $RELEASE_NAME" + + +for component in $RICINFRA_COMPONENTS; do + helm delete --purge "${RELEASE_NAME}-${component}" +done diff --git a/ric-infra/15-Chartmuseum/etc/chartmuseum.conf b/ric-infra/15-Chartmuseum/etc/chartmuseum.conf new file mode 100644 index 00000000..92008b59 --- /dev/null +++ b/ric-infra/15-Chartmuseum/etc/chartmuseum.conf @@ -0,0 +1,37 @@ +################################################################################ +# 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 RIC +# It will be overrided by RICPLT_RELEASE_NAME +helm_release_name=r1 + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICPLT_NAMESPACE +plt_namespace=ricplt + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICXAPP_NAMESPACE +xapp_namespace=ricxapp + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICAUX_NAMESPACE +aux_namespace=ricaux + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICINFRA_NAMESPACE +infra_namespace=ricinfra diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/Chart.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/Chart.yaml new file mode 100644 index 00000000..7594952b --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/Chart.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 +description: A Helm chart for helm repository for RIC +name: chartmuseum +version: 0.0.1 +appVersion: 0.1 diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/requirements.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/requirements.yaml new file mode 100644 index 00000000..2ab71b4e --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/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-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.tpl new file mode 100644 index 00000000..9dcbdb94 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/_gen-cert.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. # +################################################################################i + +{{/* +Generate certificates for the docker registry +*/}} + +{{- define "chartmuseum.gen-cert" -}} +{{- $altNames := list ( include "common.ingressurl.localhelm" . ) -}} +{{- $ca := genCA "docker-registry-ca" 365 -}} +{{- $cert := genSignedCert ( include "common.ingressurl.localhelm" . ) nil $altNames 365 $ca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end -}} + diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/deployment.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/deployment.yaml new file mode 100644 index 00000000..c283c19d --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/deployment.yaml @@ -0,0 +1,63 @@ +################################################################################ +# 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: apps/v1beta2 +kind: Deployment +metadata: + name: {{ include "common.deploymentname.chartmuseum" .}} + labels: + app: {{ include "common.namespace.infra" . }}-{{ include "common.name.chartmuseum" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.chartmuseum.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.infra" . }}-{{ include "common.name.chartmuseum" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.infra" . }}-{{ include "common.name.chartmuseum" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ .Chart.Name }} + imagePullSecrets: + - name: {{ include "common.repositoryCred" . }} + containers: + - name: {{ include "common.containername.chartmuseum" . }} + image: {{ include "common.repository" . }}/{{ .Values.chartmuseum.image.name }}:{{ .Values.chartmuseum.image.tag }} + imagePullPolicy: {{ include "common.pullPolicy" . }} + envFrom: + - configMapRef: + name: {{ include "common.configmapname.chartmuseum" . }}-env + # volumeMounts: + #- name: certs + # mountPath: /var/run/certs + # readOnly: true + ports: + - name: http + containerPort: {{ include "common.serviceport.chartmuseum.http" . }} + protocol: TCP + volumeMounts: + - name: chart-data + mountPath: /charts + volumes: + - name: chart-data + persistentVolumeClaim: + claimName: pvc-{{ include "common.name.chartmuseum" . }} diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/env.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/env.yaml new file mode 100644 index 00000000..8565e887 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/env.yaml @@ -0,0 +1,24 @@ +################################################################################ +# 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.configmapname.chartmuseum" . }}-env +data: + DEBUG: "true" + STORAGE: "local" + STORAGE_LOCAL_ROOTDIR: "/charts" diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml new file mode 100644 index 00000000..8ecd7e19 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/ingress.yaml @@ -0,0 +1,33 @@ +################################################################################ +# 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: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.ingressname.chartmuseum" . }} +spec: + tls: + - hosts: + - {{ include "common.ingressurl.localhelm" . }} + secretName: secret-{{ include "common.name.chartmuseum" . }} + rules: + - host: {{ include "common.ingressurl.localhelm" . }} + http: + paths: + - backend: + serviceName: {{ include "common.servicename.chartmuseum.http" . }} + servicePort: http + path: "/" diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/job-save-certs.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/job-save-certs.yaml new file mode 100644 index 00000000..01f5ac64 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/job-save-certs.yaml @@ -0,0 +1,44 @@ +################################################################################ +# 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: batch/v1 +kind: Job +metadata: + name: job-{{ include "common.fullname.chartmuseum" . }}-save-certs +spec: + template: + spec: + containers: + - name: cert-copy + image: alpine + command: [ "/bin/sh","-c","cp -rL /var/run/helmcerts/..data/tls.crt /var/run/certs-copy/helmtls.crt"] + # command: ["tail", "-f", "/dev/null"] + volumeMounts: + - name: helmcerts + mountPath: /var/run/helmcerts + readOnly: true + - name: write-to-volume + mountPath: /var/run/certs-copy + volumes: + - name: helmcerts + secret: + secretName: secret-{{ include "common.name.chartmuseum" . }} + - name: write-to-volume + hostPath: + path: /tmp + restartPolicy: Never + backoffLimit: 4 diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolume.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolume.yaml new file mode 100644 index 00000000..93127ca6 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolume.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-{{ include "common.name.chartmuseum" . }} +spec: + capacity: + storage: {{ .Values.chartmuseum.storagesize }} + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: storageclass-{{ include "common.name.chartmuseum" . }} + local: + path: {{ .Values.chartmuseum.datapath }} + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: helm-node + operator: In + values: + - enable diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolumeClaim.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolumeClaim.yaml new file mode 100644 index 00000000..11e0314a --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/persistentVolumeClaim.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: pvc-{{ include "common.name.chartmuseum" . }} +spec: + accessModes: + - ReadWriteOnce + storageClassName: storageclass-{{ include "common.name.chartmuseum" . }} + resources: + requests: + storage: {{ .Values.chartmuseum.storagesize }} diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/secret.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/secret.yaml new file mode 100644 index 00000000..54905280 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/secret.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. # +################################################################################ + +apiVersion: v1 +kind: Secret +type: kubernetes.io/tls +metadata: + name: secret-{{ include "common.name.chartmuseum" . }} + annotations: + "helm.sh/hook": "pre-install" + "helm.sh/hook-delete-policy": "before-hook-creation" +data: +{{ ( include "chartmuseum.gen-cert" . ) | indent 2 }} diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/service.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/service.yaml new file mode 100644 index 00000000..89e35920 --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/service.yaml @@ -0,0 +1,37 @@ +################################################################################ +# 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: Service +metadata: + name: {{ include "common.servicename.chartmuseum.http" . }} + namespace: {{ include "common.namespace.infra" . }} + labels: + app: {{ include "common.namespace.infra" . }}-{{ include "common.name.chartmuseum" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.chartmuseum.http" . }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ include "common.namespace.infra" . }}-{{ include "common.name.chartmuseum" . }} + release: {{ .Release.Name }} diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/storageClass.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/storageClass.yaml new file mode 100644 index 00000000..85eed19d --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/templates/storageClass.yaml @@ -0,0 +1,6 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: storageclass-{{ include "common.name.chartmuseum" . }} +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer diff --git a/ric-infra/15-Chartmuseum/helm/chartmuseum/values.yaml b/ric-infra/15-Chartmuseum/helm/chartmuseum/values.yaml new file mode 100644 index 00000000..203a678a --- /dev/null +++ b/ric-infra/15-Chartmuseum/helm/chartmuseum/values.yaml @@ -0,0 +1,37 @@ +################################################################################ +# 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. # +################################################################################ + +# Default values for nexus. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +repository: "registry.hub.docker.com" +imagePullPolicy: IfNotPresent +repositoryCred: docker-reg-cred +helmRepositoryCert: xapp-mgr-certs + +chartmuseum: + replicaCount: 1 + + +# This is designed to be deployed using local image + image: + name: chartmuseum/chartmuseum + tag: v0.8.2 + + + storagesize: 2Gi + datapath: /tmp/chartmuseum-data/ diff --git a/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml index ffa41a39..d6acd6e0 100644 --- a/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/a1mediator/templates/deployment.yaml @@ -34,6 +34,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.a1mediator.annotations }} + annotations: + {{- .Values.a1mediator.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.a1mediator" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/a1mediator/values.yaml b/ric-platform/50-RIC-Platform/helm/a1mediator/values.yaml index d07c0ab3..e92e4ed5 100644 --- a/ric-platform/50-RIC-Platform/helm/a1mediator/values.yaml +++ b/ric-platform/50-RIC-Platform/helm/a1mediator/values.yaml @@ -40,4 +40,3 @@ a1mediator: rmr_timeout_config: rcv_retry_interval_ms: 500 rcv_retry_times: 20 - diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml index 5620cd02..ce05589c 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.appmgr.annotations }} + annotations: + {{- .Values.appmgr.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/appmgr/templates/serviceaccount.yaml b/ric-platform/50-RIC-Platform/helm/appmgr/templates/serviceaccount.yaml index 8dbb63c7..6164f73d 100644 --- a/ric-platform/50-RIC-Platform/helm/appmgr/templates/serviceaccount.yaml +++ b/ric-platform/50-RIC-Platform/helm/appmgr/templates/serviceaccount.yaml @@ -12,8 +12,8 @@ metadata: namespace: {{ include "common.helmrepositorytillernamespace" . }} rules: - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "list"] + resources: ["pods", "pods/portforward"] + verbs: ["get", "list", "create"] --- apiVersion: rbac.authorization.k8s.io/v1beta1 kind: RoleBinding diff --git a/ric-platform/50-RIC-Platform/helm/dbaas/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/dbaas/templates/deployment.yaml index fb6ec819..7095b184 100644 --- a/ric-platform/50-RIC-Platform/helm/dbaas/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/dbaas/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.dbaas.annotations }} + annotations: + {{- .Values.dbaas.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/deployment.yaml index 56932876..c10fa6b7 100644 --- a/ric-platform/50-RIC-Platform/helm/e2mgr/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/e2mgr/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.e2mgr.annotations }} + annotations: + {{- .Values.e2mgr.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2mgr" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/e2term/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/e2term/templates/deployment.yaml index 6c6d71d4..ed80b846 100644 --- a/ric-platform/50-RIC-Platform/helm/e2term/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/e2term/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.e2term.annotations }} + annotations: + {{- .Values.e2term.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.e2term" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml index b796de5a..2183db15 100644 --- a/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml +++ b/ric-platform/50-RIC-Platform/helm/e2term/templates/env.yaml @@ -24,6 +24,8 @@ data: DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }} DBAAS_PORT_6379_TCP_PORT: {{ include "common.serviceport.dbaas.tcp" . | quote }} RMR_RTG_SVC: {{ include "common.serviceport.e2term.rmr.route" . | quote }} + RMR_SEED_RT: "router.txt" + RMR_VCTL_FILE: "/tmp/rmr_verbose" sctp: {{ include "common.serviceport.e2term.sctp" . | quote }} nano: {{ include "common.serviceport.e2term.rmr.data" . | quote }} print: "{{ .Values.e2term.env.print }}" diff --git a/ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml index 2cffaa90..592309eb 100644 --- a/ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/rtmgr/templates/deployment.yaml @@ -33,6 +33,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.rtmgr.annotations }} + annotations: + {{- .Values.rtmgr.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rtmgr" . }} release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml index bb4808a0..2c66c7bf 100644 --- a/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml +++ b/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml @@ -38,6 +38,10 @@ spec: release: {{ .Release.Name }} template: metadata: + {{- if .Values.submgr.annotations }} + annotations: + {{- .Values.submgr.annotations | nindent 8 -}} + {{ end }} labels: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} release: {{ .Release.Name }} @@ -62,4 +66,4 @@ spec: protocol: TCP - name: rmrdata containerPort: {{ include "common.serviceport.submgr.rmr.data" . }} - protocol: TCP \ No newline at end of file + protocol: TCP