From: John Keeney Date: Fri, 18 Jun 2021 09:21:21 +0000 (+0000) Subject: Merge "Kong ingress controller The Nonrtric deployment script will not install Kong... X-Git-Tag: f-release~46 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=30bf13193742047dcf72c67d8efc46570aa568b5;hp=5142c8625abe92afb01c799079d743db5d400f07;p=it%2Fdep.git Merge "Kong ingress controller The Nonrtric deployment script will not install Kong Gateway. The flag is set to prevent the ingress deployment if Kong is unavailable." --- diff --git a/INFO.yaml b/INFO.yaml index 0b108248..f90fb125 100644 --- a/INFO.yaml +++ b/INFO.yaml @@ -44,6 +44,36 @@ committers: company: 'AT&T Labs-Research' id: 'multics' timezone: 'America/New_York' + - name: 'Thoralf Czichy' + email: 'thoralf.czichy@nokia.com' + company: 'Nokia' + id: 'czichy' + timezone: 'Europe/Helsinki' + - name: 'John Keeney' + email: 'John.Keeney@est.tech' + id: 'johnkeeney' + company: 'Ericsson Software Technology' + timezone: 'Europe/Dublin' + - name: 'Martin Skorupski' + email: 'martin.skorupski@highstreet-technologies.com' + id: 'demx8as6' + company: 'highstreet technologies GmbH' + timezone: 'Germany/Berlin' + - name: 'Mahesh Jethanandani' + email: 'mjethanandani@gmail.com' + id: 'mjethanandani' + company: 'VMware' + timezone: 'America/Los_Angeles' + - name: 'Alex Stancu' + email: 'alexandru.stancu@highstreet-technologies.com' + id: 'alex.stancu' + company: 'highstreet technologies GmbH' + timezone: 'Europe/Bucharest' + - name: 'Xiaohua Zhang' + email: 'xiaohua.zhang@windriver.com' + company: 'Windriver' + id: 'Xiaohua626' + timezone: 'China/Beijing' - name: 'Chris Lott' email: 'clott@research.att.com' company: 'AT&T Labs-Research' @@ -52,3 +82,22 @@ committers: tsc: # yamllint disable rule:line-length approval: 'https://wiki.o-ran-sc.org/display/TOC#O-RANSCTechnicalOversightCommittee(TOC)-20190821' + changes: + - type: 'promotion' + name: 'Thoralf Czichy' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' + - type: 'promotion' + name: 'John Keeney' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' + - type: 'promotion' + name: 'Martin Skorupski' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' + - type: 'promotion' + name: 'Mahesh Jethanandani' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' + - type: 'promotion' + name: 'Alex Stancu' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' + - type: 'promotion' + name: 'Xiaohua Zhang' + link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800' diff --git a/bin/deploy-nonrtric b/bin/deploy-nonrtric index 887c04ee..0643f4b4 100755 --- a/bin/deploy-nonrtric +++ b/bin/deploy-nonrtric @@ -125,4 +125,29 @@ helm repo add local http://127.0.0.1:8879/charts --force-update echo "Finished Packaging NONRTRIC components [$COMPONENTS]" -$ROOT_DIR/../nonrtric/bin/install -f $OVERRIDEYAML + +COMMON_BLOCK=$(cat $OVERRIDEYAML | awk '/^common:/{getline; while ($0 ~ /^ +.*|^ *$/) {print $0; if (getline == 0) {break}}}') +NAMESPACE_BLOCK=$(cat $OVERRIDEYAML | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') +NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') +RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') + +if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then + kubectl create ns ${NONRTRIC_NAMESPACE:-nonrtric} +fi +if ! kubectl get ns onap > /dev/null 2>&1; then + kubectl create ns onap +fi + +kubectl create configmap -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe --from-file=recipe=$OVERRIDEYAML + +echo "Deploying NONRTRIC" + +HELM_NAME_OPT="" +if [ -z $IS_HELM3 ];then + HELM_NAME_OPT="--name" +fi + +echo "helm install -f $OVERRIDEYAML --namespace ${NONRTRIC_NAMESPACE:-nonrtric} ${HELM_NAME_OPT} ${RELEASE_PREFIX} $ROOT_DIR/../nonrtric/helm/nonrtric" +helm install -f $OVERRIDEYAML --namespace "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" "$ROOT_DIR/../nonrtric/helm/nonrtric" + + diff --git a/bin/undeploy-nonrtric b/bin/undeploy-nonrtric index 2a6c3fd4..9e3c0cb2 100755 --- a/bin/undeploy-nonrtric +++ b/bin/undeploy-nonrtric @@ -17,5 +17,34 @@ # This script to undeploy the NONRTRIC -ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -$ROOT_DIR/../nonrtric/bin/uninstall + +COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway" +RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}') +kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml + +if [ ! -s /tmp/recipe.yaml ]; then + echo "NONRTRIC recipe is not found. Are you sure it's deployed successfully?" + exit 0 +fi + +COMMON_BLOCK=$(cat /tmp/recipe.yaml | awk '/^common:/{getline; while ($0 ~ /^ +.*|^ *$/) {print $0; if (getline == 0) {break}}}') +NAMESPACE_BLOCK=$(cat /tmp/recipe.yaml | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') +NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') +RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') + +echo "Undeploying NONRTRIC components [$COMPONENTS]" + +IS_HELM3=$(helm version -c --short|grep -e "^v3") +HELM_FLAG='' +if [ $IS_HELM3 ] +then + HELM_FLAG=' -n '${NONRTRIC_NAMESPACE:-nonrtric} +else + HELM_FLAG='--purge' +fi + +helm delete ${HELM_FLAG} ${RELEASE_PREFIX} + +kubectl delete cm -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe + +kubectl delete ns ${NONRTRIC_NAMESPACE:-nonrtric} diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 4aa274d6..2d3a2c99 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -18,15 +18,24 @@ # Global common setting #------------------------------------------------------------------------- + +# Here you can enable inclusion or exclusion of each component. A not installd component will not be installed. +nonrtric: + installPms: true + installA1controller: false + installA1simulator: false + installControlpanel: false + installEnrichmentservice: true + installRappcatalogueservice: false + installNonrtricgateway: false + common: releasePrefix: r2-dev-nonrtric # Change the namespaces using the following options namespace: nonrtric: nonrtric ingressClassName: kong -# any nonrtric chart can be installed: nonrtric (all components), controlpanel, a1controller, a1simulator, policymanagementservice, -# enrichmentservice, rappcatalogueservice, nonrtricgateway -component: nonrtric + # A1 Conttroller may take few more minutes to start. Increase the initialDelaySeconds in liveness to avoid container restart. a1controller: diff --git a/nonrtric/bin/install b/nonrtric/bin/install deleted file mode 100755 index 8b14da0b..00000000 --- a/nonrtric/bin/install +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - -IS_HELM3=$(helm version -c --short|grep -e "^v3") -while [ -n "$1" ]; do # while loop starts - - case "$1" in - - -f) OVERRIDEYAML=$2 - shift - ;; - *) echo "Option $1 not recognized" ;; # In case you typed a different option other than a,b,c - - esac - - shift - -done - - -if [ -z "$OVERRIDEYAML" ];then - echo "****************************************************************************************************************" - echo " ERROR " - echo "****************************************************************************************************************" - echo "RIC deployment without deployment recipe is currently disabled. Please specify an recipe with the -f option." - echo "****************************************************************************************************************" - exit 1 -fi - - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" - -COMMON_BLOCK=$(cat $OVERRIDEYAML | awk '/^common:/{getline; while ($0 ~ /^ +.*|^ *$/) {print $0; if (getline == 0) {break}}}') -NAMESPACE_BLOCK=$(cat $OVERRIDEYAML | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') -NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') -RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') -PARENT_CHART=$(cat $OVERRIDEYAML | awk '/^ *component:/{print $2}') -echo "Chart name- $PARENT_CHART" - -if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then - kubectl create ns ${NONRTRIC_NAMESPACE:-nonrtric} -fi -if ! kubectl get ns onap > /dev/null 2>&1; then - kubectl create ns onap -fi - -kubectl create configmap -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe --from-file=recipe=$OVERRIDEYAML - -echo "Deploying NONRTRIC [$PARENT_CHART]" - -HELM_NAME_OPT="" -if [ -z $IS_HELM3 ];then - HELM_NAME_OPT="--name" -fi - -echo "helm install -f $OVERRIDEYAML --namespace ${NONRTRIC_NAMESPACE:-nonrtric} ${HELM_NAME_OPT} ${RELEASE_PREFIX} $DIR/../helm/${PARENT_CHART}" -helm install -f $OVERRIDEYAML --namespace "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" $DIR/../helm/"${PARENT_CHART}" - diff --git a/nonrtric/bin/uninstall b/nonrtric/bin/uninstall deleted file mode 100755 index d0549f57..00000000 --- a/nonrtric/bin/uninstall +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - - -COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice rappcatalogueservice nonrtricgateway" -RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}') -kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml - -if [ ! -s /tmp/recipe.yaml ]; then - echo "NONRTRIC recipe is not found. Are you sure it's deployed successfully?" - exit 0 -fi - -COMMON_BLOCK=$(cat /tmp/recipe.yaml | awk '/^common:/{getline; while ($0 ~ /^ +.*|^ *$/) {print $0; if (getline == 0) {break}}}') -NAMESPACE_BLOCK=$(cat /tmp/recipe.yaml | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') -NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') -RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') - -echo "Undeploying NONRTRIC components [$COMPONENTS]" - -IS_HELM3=$(helm version -c --short|grep -e "^v3") -HELM_FLAG='' -if [ $IS_HELM3 ] -then - HELM_FLAG=' -n '${NONRTRIC_NAMESPACE:-nonrtric} -else - HELM_FLAG='--purge' -fi - -helm delete ${HELM_FLAG} ${RELEASE_PREFIX} - -kubectl delete cm -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe - -kubectl delete ns ${NONRTRIC_NAMESPACE:-nonrtric} diff --git a/nonrtric/helm/enrichmentservice/templates/ingress.yaml b/nonrtric/helm/enrichmentservice/templates/ingress.yaml index 364e0000..f7520221 100644 --- a/nonrtric/helm/enrichmentservice/templates/ingress.yaml +++ b/nonrtric/helm/enrichmentservice/templates/ingress.yaml @@ -28,7 +28,7 @@ spec: rules: - http: paths: - - path: "/ei-producer" + - path: "/data-producer" backend: service: name: {{ include "common.name.enrichmentservice" . }} diff --git a/nonrtric/helm/enrichmentservice/templates/pv.yaml b/nonrtric/helm/enrichmentservice/templates/pv.yaml deleted file mode 100755 index 66deec70..00000000 --- a/nonrtric/helm/enrichmentservice/templates/pv.yaml +++ /dev/null @@ -1,36 +0,0 @@ -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ include "common.name.enrichmentservice" . }} - namespace: {{ include "common.namespace.nonrtric" . }} - labels: - app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - name: {{ include "common.name.enrichmentservice" . }} -spec: - capacity: - storage: {{ .Values.enrichmentservice.persistence.size}} - accessModes: - - {{ .Values.enrichmentservice.persistence.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.enrichmentservice.persistence.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.enrichmentservice.persistence.mountPath }}/{{ .Values.enrichmentservice.persistence.mountSubPath }} - storageClassName: "{{ include "common.name.enrichmentservice" . }}" \ No newline at end of file diff --git a/nonrtric/helm/enrichmentservice/templates/pvc.yaml b/nonrtric/helm/enrichmentservice/templates/pvc.yaml deleted file mode 100755 index a9795b7b..00000000 --- a/nonrtric/helm/enrichmentservice/templates/pvc.yaml +++ /dev/null @@ -1,33 +0,0 @@ -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "common.name.enrichmentservice" . }}-pvc - namespace: {{ include "common.namespace.nonrtric" . }} - labels: - app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - accessModes: - - {{ .Values.enrichmentservice.persistence.accessMode }} - resources: - requests: - storage: {{ .Values.enrichmentservice.persistence.size}} - storageClassName: "{{ include "common.name.enrichmentservice" . }}" \ No newline at end of file diff --git a/nonrtric/helm/enrichmentservice/templates/statefulset.yaml b/nonrtric/helm/enrichmentservice/templates/statefulset.yaml index 7bc9a75b..4e2169fc 100644 --- a/nonrtric/helm/enrichmentservice/templates/statefulset.yaml +++ b/nonrtric/helm/enrichmentservice/templates/statefulset.yaml @@ -64,12 +64,23 @@ spec: volumeMounts: - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config mountPath: /opt/app/enrichment-coordinator-service/config - - name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol + - name: {{ include "common.name.enrichmentservice" . }}-vardata mountPath: /var/enrichment-coordinator-service volumes: - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config configMap: name: {{ include "common.name.enrichmentservice" . }}-configmap - - name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol - persistentVolumeClaim: - claimName: {{ include "common.name.enrichmentservice" . }}-pvc + + volumeClaimTemplates: + - metadata: + name: {{ include "common.name.enrichmentservice" . }}-vardata + spec: + accessModes: + - {{ .Values.enrichmentservice.persistence.accessMode }} + resources: + requests: + storage: "{{ .Values.enrichmentservice.persistence.size }}" + + + + diff --git a/nonrtric/helm/nonrtric/Chart.yaml b/nonrtric/helm/nonrtric/Chart.yaml index 7b92e5cf..9fb66d0c 100644 --- a/nonrtric/helm/nonrtric/Chart.yaml +++ b/nonrtric/helm/nonrtric/Chart.yaml @@ -18,3 +18,44 @@ apiVersion: v1 description: NonRealTime RAN Intelligent Controller name: nonrtric version: 2.0.0 + +dependencies: + - name: a1controller + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installA1controller + + - name: a1simulator + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installA1simulator + + - name: controlpanel + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installControlpanel + + - name: policymanagementservice + version: ~2.0.0 + repository: "@local" + condition: nonrtric.installPms + + - name: enrichmentservice + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installEnrichmentservice + + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" + condition: true + + - name: rappcatalogueservice + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installRappcatalogueservice + + - name: nonrtricgateway + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installA1controller diff --git a/nonrtric/helm/nonrtric/requirements.yaml b/nonrtric/helm/nonrtric/requirements.yaml deleted file mode 100644 index bc6a3b07..00000000 --- a/nonrtric/helm/nonrtric/requirements.yaml +++ /dev/null @@ -1,41 +0,0 @@ -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - -dependencies: - - name: a1controller - version: ~2.0.0 - repository: "@local" - - name: a1simulator - version: ~2.0.0 - repository: "@local" - - name: controlpanel - version: ~2.0.0 - repository: "@local" - - name: policymanagementservice - version: ~2.0.0 - repository: "@local" - - name: enrichmentservice - version: ~1.0.0 - repository: "@local" - - name: nonrtric-common - version: ^2.0.0 - repository: "@local" - - name: rappcatalogueservice - version: ~1.0.0 - repository: "@local" - - name: nonrtricgateway - version: ~1.0.0 - repository: "@local" \ No newline at end of file diff --git a/nonrtric/helm/nonrtric/values.yaml b/nonrtric/helm/nonrtric/values.yaml index adf2fa54..b4728c5b 100644 --- a/nonrtric/helm/nonrtric/values.yaml +++ b/nonrtric/helm/nonrtric/values.yaml @@ -15,4 +15,12 @@ ################################################################################ - + +nonrtric: + installPms: true + installA1controller: true + installA1simulator: true + installControlpanel: true + installEnrichmentservice: true + installRappcatalogueservice: true + installNonrtricgateway: true diff --git a/nonrtric/helm/policymanagementservice/resources/config/application.yaml b/nonrtric/helm/policymanagementservice/resources/config/application.yaml index a5faac5d..5fc5051e 100644 --- a/nonrtric/helm/policymanagementservice/resources/config/application.yaml +++ b/nonrtric/helm/policymanagementservice/resources/config/application.yaml @@ -35,8 +35,9 @@ logging: org.springframework: ERROR org.springframework.data: ERROR org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR - org.onap.ccsdk.oran.a1policymanagementservice: INFO - file: /var/log/policy-agent/application.log + org.onap.ccsdk.oran.a1policymanagementservice: INFO + file: + name: /var/log/policy-agent/application.log server: # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework. diff --git a/nonrtric/helm/policymanagementservice/templates/pv.yaml b/nonrtric/helm/policymanagementservice/templates/pv.yaml deleted file mode 100644 index 929c7e5e..00000000 --- a/nonrtric/helm/policymanagementservice/templates/pv.yaml +++ /dev/null @@ -1,37 +0,0 @@ -################################################################################ -# Copyright (c) 2020 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - - -kind: PersistentVolume -apiVersion: v1 -metadata: - name: {{ include "common.name.policymanagementservice" . }} - namespace: {{ include "common.namespace.nonrtric" . }} - labels: - app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - name: {{ include "common.name.policymanagementservice" . }} -spec: - capacity: - storage: {{ .Values.policymanagementservice.persistence.size}} - accessModes: - - {{ .Values.policymanagementservice.persistence.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.policymanagementservice.persistence.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.policymanagementservice.persistence.mountPath }}/{{ .Values.policymanagementservice.persistence.mountSubPath }} - storageClassName: "{{ .Values.policymanagementservice.persistence.storageClass }}" diff --git a/nonrtric/helm/policymanagementservice/templates/pvc.yaml b/nonrtric/helm/policymanagementservice/templates/pvc.yaml deleted file mode 100644 index 1c84e7bd..00000000 --- a/nonrtric/helm/policymanagementservice/templates/pvc.yaml +++ /dev/null @@ -1,35 +0,0 @@ -################################################################################ -# Copyright (c) 2021 Nordix Foundation. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -################################################################################ - - -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "common.name.policymanagementservice" . }}-vardata-pvc - namespace: {{ include "common.namespace.nonrtric" . }} - labels: - app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: "{{ .Values.policymanagementservice.persistence.size }}" - storageClassName: "{{ .Values.policymanagementservice.persistence.storageClass }}" - diff --git a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml index 779d51f0..d67bb1ef 100644 --- a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml +++ b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml @@ -75,6 +75,12 @@ spec: - name: {{ include "common.name.policymanagementservice" . }}-policy-data configMap: name: {{ include "common.name.policymanagementservice" . }}-configmap-data - - name: {{ include "common.name.policymanagementservice" . }}-vardata - persistentVolumeClaim: - claimName: {{ include "common.name.policymanagementservice" . }}-vardata-pvc + volumeClaimTemplates: + - metadata: + name: {{ include "common.name.policymanagementservice" . }}-vardata + spec: + accessModes: + - {{ .Values.policymanagementservice.persistence.accessMode }} + resources: + requests: + storage: "{{ .Values.policymanagementservice.persistence.size }}" diff --git a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl index 6801ceef..c6be83cb 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl @@ -24,40 +24,29 @@ {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - -{{- define "common.deploymentname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "common.configmapname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.labels" -}} +helm.sh/chart: {{ include "common.influxdb.chart" . }} +{{ include "common.influxdb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} -{{- define "common.containername.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "common.name.influxdb" . }} +app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} - -{{- define "common.pvname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "common.pvcname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.servicename.influxdb.http" -}} +{{- define "common.influxdb.serviceAccountName" -}} {{- $name := ( include "common.fullname.influxdb" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}} {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}} {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}} @@ -66,15 +55,3 @@ {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}} {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}} {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}} - - -{{- define "common.serviceaccountname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.ingressname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}}