From: wrider Date: Thu, 5 Sep 2019 17:26:29 +0000 (-0400) Subject: Add chart for VESPA Mgr X-Git-Tag: 0.0.2~16^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=01adf4c86818ed16f46d8c0f9e9c691792bb233a;p=it%2Fdep.git Add chart for VESPA Mgr Signed-off-by: wrider Change-Id: Ie6e1f977ec7eed84f28272c9dc8e2d44d73b8b33 Signed-off-by: wrider --- diff --git a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE index c89eb5ab..c8e9c04a 100644 --- a/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE +++ b/RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE @@ -156,6 +156,14 @@ submgr: name: ric-plt-submgr tag: 0.5.0 +# VESPA Manager +vespamgr: + # Use the following option to override the docker registry value + # repositoryOverride: + image: + name: ric-plt-vespamgr + tag: 0.0.1 + # the service for redirecting to AUX cluster extsvcplt: auxip: diff --git a/ric-common/Common-Template/helm/ric-common/Chart.yaml b/ric-common/Common-Template/helm/ric-common/Chart.yaml index cc0d1cbe..597dd549 100644 --- a/ric-common/Common-Template/helm/ric-common/Chart.yaml +++ b/ric-common/Common-Template/helm/ric-common/Chart.yaml @@ -18,4 +18,4 @@ apiVersion: v1 description: Common templates for inclusion in other charts name: ric-common -version: 2.0.3 +version: 2.0.4 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 b80a7ad5..913ed16b 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl @@ -55,6 +55,11 @@ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.containername.vespamgr" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.containername.nexus" -}} {{- $name := ( include "common.fullname.nexus" . ) -}} {{- 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 c7a0ed22..e946ed34 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl @@ -55,6 +55,11 @@ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.deploymentname.vespamgr" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.deploymentname.nexus" -}} {{- $name := ( include "common.fullname.nexus" . ) -}} {{- printf "deployment-%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 bbfce4fc..6402565e 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_name.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_name.tpl @@ -182,6 +182,27 @@ {{- end -}} +{{- define "common.name.vespamgr" -}} + {{- if .Values.vespamgr -}} + {{- if .Values.vespamgr.nameOverride -}} + {{- printf "%s" .Values.vespamgr.nameOverride -}} + {{- else -}} + {{- printf "vespamgr" -}} + {{- end -}} + {{- else -}} + {{- printf "vespamgr" -}} + {{- end -}} +{{- end -}} + + +{{- define "common.fullname.vespamgr" -}} + {{- $name := ( include "common.name.vespamgr" . ) -}} + {{- $namespace := ( include "common.namespace.platform" . ) -}} + {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + + {{- define "common.name.nexus" -}} {{- if .Values.nexus -}} 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 c5db0658..0b9b6a55 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ports.tpl @@ -53,6 +53,8 @@ {{- define "common.serviceport.appmgr.rmr.route" -}}4561{{- end -}} {{- define "common.serviceport.appmgr.http" -}}8080{{- end -}} +{{- define "common.serviceport.vespamgr.http" -}}8080{{- end -}} + {{- define "common.serviceport.nexus.http" -}}8080{{- end -}} {{- define "common.serviceport.chartmuseum.http" -}}8080{{- 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 index 4d828483..509daed2 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl @@ -93,6 +93,11 @@ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.vespamgr.http" -}} + {{- $name := ( include "common.fullname.vespamgr" . ) -}} + {{- 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 "-" -}} diff --git a/ric-platform/50-RIC-Platform/bin/install b/ric-platform/50-RIC-Platform/bin/install index ddfeaafb..c14781a5 100755 --- a/ric-platform/50-RIC-Platform/bin/install +++ b/ric-platform/50-RIC-Platform/bin/install @@ -60,7 +60,7 @@ else fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr" echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]" echo "Helm Release Name: $RELEASE_NAME" diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index 9baaf5e7..21a8e3fa 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -30,7 +30,7 @@ else RELEASE_NAME=$RICPLT_RELEASE_NAME fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr" echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]" diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore b/ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore new file mode 100644 index 00000000..d29b3993 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore @@ -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. + +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/Chart.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/Chart.yaml new file mode 100644 index 00000000..8b224af9 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/Chart.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. + +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: vespamgr +version: 0.0.1 diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/README b/ric-platform/50-RIC-Platform/helm/vespamgr/README new file mode 100644 index 00000000..9e7d7fec --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/README @@ -0,0 +1 @@ +The files under this directory and the subdirectories can be used as an example. diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/requirements.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/requirements.yaml new file mode 100644 index 00000000..2ab71b4e --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/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-platform/50-RIC-Platform/helm/vespamgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/deployment.yaml new file mode 100644 index 00000000..9ea06392 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/deployment.yaml @@ -0,0 +1,59 @@ +# 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/v1 +kind: Deployment +metadata: + name: {{ include "common.deploymentname.vespamgr" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.vespamgr.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }} + release: {{ .Release.Name }} + template: + metadata: + {{- if .Values.vespamgr.annotations }} + annotations: + {{- .Values.vespamgr.annotations | nindent 8 -}} + {{ end }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.vespamgr" . }} + imagePullSecrets: + - name: {{ include "common.repositoryCred" . }} + containers: + - name: {{ include "common.containername.vespamgr" . }} + image: {{ include "common.repository" . }}/{{ .Values.vespamgr.image.name }}:{{ .Values.vespamgr.image.tag }} + imagePullPolicy: {{ include "common.pullPolicy" . }} + ports: + - name: http + containerPort: {{ include "common.serviceport.vespamgr.http" . }} + protocol: TCP + #envFrom: + # - configMapRef: + # name: vespa-config + # - secretRef: + # name: vespa-secrets + + diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml new file mode 100644 index 00000000..cb26519c --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml @@ -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. + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename.vespamgr.http" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.vespamgr.http" . }} + protocol: "TCP" + name: "http" + targetPort: "http" + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }} + release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/values.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/values.yaml new file mode 100644 index 00000000..0b4024b5 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/vespamgr/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. # +################################################################################ + +################################################################# +# Application configuration defaults. +################################################################# +# application image + +repository: "nexus3.o-ran-sc.org:10004" +imagePullPolicy: IfNotPresent +repositoryCred: docker-reg-cred + +vespamgr: + replicaCount: 1 + + image: + name: ric-plt-vespamgr + tag: 0.0.1 + + # Service ports are now defined in + # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file. + # If need to change a service port, make the code change necessary, then + # update the _ports.tpl file with the new port number.