From 4abc62ffad1ae1f29be6b8aeabd346b05606ccb8 Mon Sep 17 00:00:00 2001 From: Zhe Huang Date: Tue, 24 Mar 2020 11:38:56 -0400 Subject: [PATCH] Add xapp-onboarder, upgrade ric-common version. Issue-ID: RIC-215 Signed-off-by: Zhe Huang Change-Id: I8191b06461234b0fded0f17168fe8c7de1866d56 --- RECIPE_EXAMPLE/example_recipe.yaml | 14 +++- bin/install | 2 +- bin/uninstall | 2 +- helm/a1mediator/requirements.yaml | 2 +- helm/appmgr/requirements.yaml | 2 +- helm/appmgr/templates/appconfig.yaml | 2 +- helm/appmgr/templates/deployment.yaml | 15 ---- helm/appmgr/templates/service-http.yaml | 4 - helm/appmgr/values.yaml | 4 - helm/dbaas1/requirements.yaml | 2 +- helm/dbaasha/requirements.yaml | 2 +- helm/e2mgr/requirements.yaml | 2 +- helm/e2term/requirements.yaml | 2 +- helm/infrastructure/requirements.yaml | 2 +- .../certificate-manager/requirements.yaml | 2 +- .../subcharts/docker-credential/requirements.yaml | 2 +- .../subcharts/extsvcplt/requirements.yaml | 2 +- helm/jaegeradapter/requirements.yaml | 2 +- helm/o1mediator/requirements.yaml | 2 +- helm/rsm/requirements.yaml | 2 +- helm/rtmgr/requirements.yaml | 2 +- helm/submgr/requirements.yaml | 2 +- helm/vespamgr/requirements.yaml | 2 +- helm/xapp-onboarder/.helmignore | 22 ++++++ helm/xapp-onboarder/Chart.yaml | 22 ++++++ helm/xapp-onboarder/requirements.yaml | 21 ++++++ helm/xapp-onboarder/templates/deployment.yaml | 87 ++++++++++++++++++++++ .../templates/env-chartmuseum.yaml | 4 +- .../templates/env-xapp-onboarder.yaml | 38 ++++++++++ .../templates/ingress-chartmuseum.yaml | 12 +++ .../templates/ingress-xapp-onboarder.yaml | 12 +++ helm/xapp-onboarder/templates/service-http.yaml | 43 +++++++++++ .../values.yaml} | 36 +++++---- 33 files changed, 311 insertions(+), 61 deletions(-) create mode 100644 helm/xapp-onboarder/.helmignore create mode 100644 helm/xapp-onboarder/Chart.yaml create mode 100644 helm/xapp-onboarder/requirements.yaml create mode 100644 helm/xapp-onboarder/templates/deployment.yaml rename helm/{appmgr => xapp-onboarder}/templates/env-chartmuseum.yaml (89%) create mode 100644 helm/xapp-onboarder/templates/env-xapp-onboarder.yaml create mode 100644 helm/xapp-onboarder/templates/ingress-chartmuseum.yaml create mode 100644 helm/xapp-onboarder/templates/ingress-xapp-onboarder.yaml create mode 100644 helm/xapp-onboarder/templates/service-http.yaml rename helm/{appmgr/templates/ingress-chartmuseum.yaml => xapp-onboarder/values.yaml} (70%) diff --git a/RECIPE_EXAMPLE/example_recipe.yaml b/RECIPE_EXAMPLE/example_recipe.yaml index 88287ff..c86a166 100644 --- a/RECIPE_EXAMPLE/example_recipe.yaml +++ b/RECIPE_EXAMPLE/example_recipe.yaml @@ -19,7 +19,7 @@ #------------------------------------------------------------------------- common: - releasePrefix: r3 + releasePrefix: r4 # If a local docker registry is used, please specify it using the following option # localregistry: nexus3.o-ran-sc.org:10004 @@ -171,3 +171,15 @@ o1mediator: registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" name: ric-plt-o1 tag: 0.3.2 + +xapponboarder: + image: + xapponboarder: + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: xapp-onboarder + tag: 1.0.0 + chartmuseum: + registry: "docker.io" + name: chartmuseum/chartmuseum + tag: v0.8.2 + allow_redeploy: "True" diff --git a/bin/install b/bin/install index 3408bea..dc66832 100755 --- a/bin/install +++ b/bin/install @@ -71,7 +71,7 @@ INFRANAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *infra:/{print $2}') XAPPNAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *xapp:/{print $2}') RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') # replace the dbaasha with dbaas1 if deploying non HA DBaaS -COMPONENTS=${LIST_OF_COMPONENTS:-"infrastructure appmgr rtmgr dbaasha e2mgr e2term a1mediator submgr vespamgr jaegeradapter o1mediator"} +COMPONENTS=${LIST_OF_COMPONENTS:-"infrastructure xapp-onboarder appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr jaegeradapter o1mediator"} echo "Deploying RIC infra components [$COMPONENTS]" diff --git a/bin/uninstall b/bin/uninstall index 862bf49..9f4f385 100755 --- a/bin/uninstall +++ b/bin/uninstall @@ -16,7 +16,7 @@ # limitations under the License. # ################################################################################ -COMPONENTS="appmgr rtmgr dbaas1 dbaasha e2mgr e2term a1mediator submgr vespamgr jaegeradapter infrastructure o1mediator" +COMPONENTS="xapp-onboarder appmgr rtmgr dbaas1 dbaasha e2mgr e2term a1mediator submgr vespamgr jaegeradapter infrastructure o1mediator" RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep ricplt-recipe | awk '{print $1}') kubectl get configmap -n $RECIPE_NAMESPACE ricplt-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml diff --git a/helm/a1mediator/requirements.yaml b/helm/a1mediator/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/a1mediator/requirements.yaml +++ b/helm/a1mediator/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/appmgr/requirements.yaml b/helm/appmgr/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/appmgr/requirements.yaml +++ b/helm/appmgr/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/appmgr/templates/appconfig.yaml b/helm/appmgr/templates/appconfig.yaml index cc38085..2cbc0a1 100644 --- a/helm/appmgr/templates/appconfig.yaml +++ b/helm/appmgr/templates/appconfig.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.configmapname.appmgr" . }}-appconfig data: {{- $restport := (printf ":%s" (include "common.serviceport.appmgr.http" .) ) | quote -}} - {{- $defaulthelmrepo := (printf "http://127.0.0.1:%s" (include "common.serviceport.appmgr.chartmuseum.http" .) ) | quote -}} + {{- $defaulthelmrepo := (printf "http://%s:%s" (include "common.servicename.xapp-onboarder.server" .) (include "common.serviceport.xapp-onboarder.chartmuseum" .) ) | quote -}} {{- $helmrepo := default $defaulthelmrepo .Values.appmgr.repoUrl | quote -}} {{- $reponame := default "helm-repo" .Values.appmgr.reponame | quote -}} {{- $tillerdeploynamespace := include "common.tillerDeployNameSpace" $ctx -}} diff --git a/helm/appmgr/templates/deployment.yaml b/helm/appmgr/templates/deployment.yaml index 1b19211..26ad883 100644 --- a/helm/appmgr/templates/deployment.yaml +++ b/helm/appmgr/templates/deployment.yaml @@ -86,21 +86,6 @@ spec: subPath: appmgr-tiller-secret-copier.sh {{- end }} containers: - - name: {{ include "common.containername.appmgr.chartmuseum" . }} - {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.chartmuseum.registry }} - image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.appmgr.image.chartmuseum.name }}:{{ .Values.appmgr.image.chartmuseum.tag }} - {{- $newctx := dict "ctx" $topCtx "defaultpullpolicy" .Values.appmgr.imagePullPolicy }} - imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }} - securityContext: - fsGroup: 0 - runAsUser: 0 - envFrom: - - configMapRef: - name: {{ include "common.configmapname.appmgr" . }}-chartmuseum-env - ports: - - name: chartmuseum - containerPort: {{ include "common.serviceport.appmgr.chartmuseum.http" . }} - protocol: TCP - name: {{ include "common.containername.appmgr" . }} {{- $newctx := dict "ctx" $topCtx "defaultregistry" .Values.appmgr.image.appmgr.registry }} image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.appmgr.image.appmgr.name }}:{{ .Values.appmgr.image.appmgr.tag }} diff --git a/helm/appmgr/templates/service-http.yaml b/helm/appmgr/templates/service-http.yaml index 56a52a1..bda793c 100644 --- a/helm/appmgr/templates/service-http.yaml +++ b/helm/appmgr/templates/service-http.yaml @@ -32,10 +32,6 @@ spec: protocol: "TCP" name: "http" targetPort: "http" - - port: {{ include "common.serviceport.appmgr.chartmuseum.http" . }} - targetPort: chartmuseum - protocol: TCP - name: chartmuseum selector: app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }} release: {{ .Release.Name }} diff --git a/helm/appmgr/values.yaml b/helm/appmgr/values.yaml index 8accbd0..30b9950 100644 --- a/helm/appmgr/values.yaml +++ b/helm/appmgr/values.yaml @@ -64,10 +64,6 @@ appmgr: registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" name: ric-plt-appmgr tag: 0.2.0 - chartmuseum: - registry: "docker.io" - name: chartmuseum/chartmuseum - tag: v0.8.2 diff --git a/helm/dbaas1/requirements.yaml b/helm/dbaas1/requirements.yaml index 18add19..b9983c0 100644 --- a/helm/dbaas1/requirements.yaml +++ b/helm/dbaas1/requirements.yaml @@ -16,5 +16,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/dbaasha/requirements.yaml b/helm/dbaasha/requirements.yaml index d47f0ff..e2f6cf2 100644 --- a/helm/dbaasha/requirements.yaml +++ b/helm/dbaasha/requirements.yaml @@ -17,7 +17,7 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" #- name: dbaasha # condition: dbaasha.enabled diff --git a/helm/e2mgr/requirements.yaml b/helm/e2mgr/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/e2mgr/requirements.yaml +++ b/helm/e2mgr/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/e2term/requirements.yaml b/helm/e2term/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/e2term/requirements.yaml +++ b/helm/e2term/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/infrastructure/requirements.yaml b/helm/infrastructure/requirements.yaml index 2a935b4..359c6a6 100644 --- a/helm/infrastructure/requirements.yaml +++ b/helm/infrastructure/requirements.yaml @@ -17,7 +17,7 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" - name: extsvcplt version: 0.2.0 diff --git a/helm/infrastructure/subcharts/certificate-manager/requirements.yaml b/helm/infrastructure/subcharts/certificate-manager/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/infrastructure/subcharts/certificate-manager/requirements.yaml +++ b/helm/infrastructure/subcharts/certificate-manager/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/infrastructure/subcharts/docker-credential/requirements.yaml b/helm/infrastructure/subcharts/docker-credential/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/infrastructure/subcharts/docker-credential/requirements.yaml +++ b/helm/infrastructure/subcharts/docker-credential/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/infrastructure/subcharts/extsvcplt/requirements.yaml b/helm/infrastructure/subcharts/extsvcplt/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/infrastructure/subcharts/extsvcplt/requirements.yaml +++ b/helm/infrastructure/subcharts/extsvcplt/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/jaegeradapter/requirements.yaml b/helm/jaegeradapter/requirements.yaml index 18add19..b9983c0 100644 --- a/helm/jaegeradapter/requirements.yaml +++ b/helm/jaegeradapter/requirements.yaml @@ -16,5 +16,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/o1mediator/requirements.yaml b/helm/o1mediator/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/o1mediator/requirements.yaml +++ b/helm/o1mediator/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/rsm/requirements.yaml b/helm/rsm/requirements.yaml index 18add19..b9983c0 100644 --- a/helm/rsm/requirements.yaml +++ b/helm/rsm/requirements.yaml @@ -16,5 +16,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/rtmgr/requirements.yaml b/helm/rtmgr/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/rtmgr/requirements.yaml +++ b/helm/rtmgr/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/submgr/requirements.yaml b/helm/submgr/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/submgr/requirements.yaml +++ b/helm/submgr/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/vespamgr/requirements.yaml b/helm/vespamgr/requirements.yaml index db3a74b..40a2e9b 100644 --- a/helm/vespamgr/requirements.yaml +++ b/helm/vespamgr/requirements.yaml @@ -17,5 +17,5 @@ dependencies: - name: ric-common - version: ~3.0.0 + version: ~3.1.0 repository: "@local" diff --git a/helm/xapp-onboarder/.helmignore b/helm/xapp-onboarder/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/helm/xapp-onboarder/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm/xapp-onboarder/Chart.yaml b/helm/xapp-onboarder/Chart.yaml new file mode 100644 index 0000000..86d50fa --- /dev/null +++ b/helm/xapp-onboarder/Chart.yaml @@ -0,0 +1,22 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0" +description: Helm Chart for xapp_onboarder +name: xapp-onboarder +version: 3.0.0 diff --git a/helm/xapp-onboarder/requirements.yaml b/helm/xapp-onboarder/requirements.yaml new file mode 100644 index 0000000..40a2e9b --- /dev/null +++ b/helm/xapp-onboarder/requirements.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ + +dependencies: + - name: ric-common + version: ~3.1.0 + repository: "@local" diff --git a/helm/xapp-onboarder/templates/deployment.yaml b/helm/xapp-onboarder/templates/deployment.yaml new file mode 100644 index 0000000..c7d1390 --- /dev/null +++ b/helm/xapp-onboarder/templates/deployment.yaml @@ -0,0 +1,87 @@ +################################################################################ +# 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.xapp-onboarder" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.xapponboarder.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }} + release: {{ .Release.Name }} + template: + metadata: + {{- if .Values.xapponboarder.annotations }} + annotations: + {{- .Values.xapponboarder.annotations | nindent 8 -}} + {{ end }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.xapp-onboarder" . }} + imagePullSecrets: + {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.xapponboarder.registry }} + - name: {{ include "common.dockerregistry.credential" $newctx }} + containers: + - name: {{ include "common.containername.xapp-onboarder.chartmuseum" . }} + {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.chartmuseum.registry }} + image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.xapponboarder.image.chartmuseum.name }}:{{ .Values.xapponboarder.image.chartmuseum.tag }} + {{- $newctx := dict "ctx" $ "defaultpullpolicy" .Values.xapponboarder.imagePullPolicy }} + imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }} + securityContext: + fsGroup: 0 + runAsUser: 0 + envFrom: + - configMapRef: + name: {{ include "common.configmapname.xapp-onboarder" . }}-chartmuseum-env + ports: + - name: chartmuseum + containerPort: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }} + protocol: TCP + - name: {{ include "common.containername.xapp-onboarder" . }} + {{- $newctx := dict "ctx" $ "defaultregistry" .Values.xapponboarder.image.xapponboarder.registry }} + image: {{ include "common.dockerregistry.url" $newctx }}/{{ .Values.xapponboarder.image.xapponboarder.name }}:{{ .Values.xapponboarder.image.xapponboarder.tag }} + {{- $newctx := dict "ctx" $ "defaultpullpolicy" .Values.xapponboarder.imagePullPolicy }} + imagePullPolicy: {{ include "common.dockerregistry.pullpolicy" $newctx }} + ports: + - name: server + containerPort: {{ include "common.serviceport.xapp-onboarder.server" . }} + protocol: TCP + envFrom: + - configMapRef: + name: {{ include "common.configmapname.xapp-onboarder" . }}-env + livenessProbe: + #exec: + # command: + # - /bin/bash + # - -c + # - ps -ef | grep {{ .Values.livenessprocessname }}| grep -v "grep" + #initialDelaySeconds: 120 + #periodSeconds: 30 + readinessProbe: + # httpGet: + # path: / + # port: http + restartPolicy: Always diff --git a/helm/appmgr/templates/env-chartmuseum.yaml b/helm/xapp-onboarder/templates/env-chartmuseum.yaml similarity index 89% rename from helm/appmgr/templates/env-chartmuseum.yaml rename to helm/xapp-onboarder/templates/env-chartmuseum.yaml index ec419d5..85f5131 100644 --- a/helm/appmgr/templates/env-chartmuseum.yaml +++ b/helm/xapp-onboarder/templates/env-chartmuseum.yaml @@ -17,9 +17,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.configmapname.appmgr" . }}-chartmuseum-env + name: {{ include "common.configmapname.xapp-onboarder" . }}-chartmuseum-env data: DEBUG: "true" STORAGE: "local" STORAGE_LOCAL_ROOTDIR: "/charts" - PORT: {{ include "common.serviceport.appmgr.chartmuseum.http" . | quote }} + PORT: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . | quote }} diff --git a/helm/xapp-onboarder/templates/env-xapp-onboarder.yaml b/helm/xapp-onboarder/templates/env-xapp-onboarder.yaml new file mode 100644 index 0000000..93ba4c3 --- /dev/null +++ b/helm/xapp-onboarder/templates/env-xapp-onboarder.yaml @@ -0,0 +1,38 @@ +################################################################################ +# 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.xapp-onboarder" . }}-env +data: + FLASK_PORT: {{ include "common.serviceport.xapp-onboarder.server" . | quote }} + FLASK_DEBUG: "False" + DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }} + DBAAS_SERVICE_PORT: {{ include "common.serviceport.dbaas.tcp" . | quote }} + DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }} + DBAAS_PORT_6379_TCP_PORT: {{ include "common.serviceport.dbaas.tcp" . | quote }} + DBAAS_MASTER_NAME: {{ include "common.servicename.dbaasha.tcp" . | quote }} + DBAAS_SERVICE_SENTINEL_PORT: {{ include "common.serviceport.dbaasha.sentinel" . | quote }} + CHART_WORKSPACE_PATH: {{.Values.xapponboarder.chart_workspace_path | quote}} + CHART_REPO_URL: "http://0.0.0.0:8080" + HELM_VERSION: {{.Values.xapponboarder.helm_version | quote }} + HTTP_RETRY: {{.Values.xapponboarder.http_retry | quote }} + ALLOW_REDEPLOY: {{.Values.xapponboarder.allow_redeploy | quote }} + CHART_WORKSPACE_SIZE: {{.Values.xapponboarder.chart_workspace_size | quote }} + MOCK_TEST_MODE: "False" + MOCK_TEST_HELM_REPO_TEMP_DIR: "/tmp/mock_helm_repo" + diff --git a/helm/xapp-onboarder/templates/ingress-chartmuseum.yaml b/helm/xapp-onboarder/templates/ingress-chartmuseum.yaml new file mode 100644 index 0000000..2fbf815 --- /dev/null +++ b/helm/xapp-onboarder/templates/ingress-chartmuseum.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.ingressname.xapp-onboarder" . }}-chartmuseum +spec: + rules: + - http: + paths: + - path: {{ include "common.kongpath.ric.chartmuseum" . }} + backend: + serviceName: {{ include "common.servicename.xapp-onboarder.server" . }} + servicePort: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }} diff --git a/helm/xapp-onboarder/templates/ingress-xapp-onboarder.yaml b/helm/xapp-onboarder/templates/ingress-xapp-onboarder.yaml new file mode 100644 index 0000000..ea47fa6 --- /dev/null +++ b/helm/xapp-onboarder/templates/ingress-xapp-onboarder.yaml @@ -0,0 +1,12 @@ +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.ingressname.xapp-onboarder" . }}-server +spec: + rules: + - http: + paths: + - path: {{ include "common.kongpath.ric.xapp-onboarder" . }} + backend: + serviceName: {{ include "common.servicename.xapp-onboarder.server" . }} + servicePort: {{ include "common.serviceport.xapp-onboarder.server" . }} diff --git a/helm/xapp-onboarder/templates/service-http.yaml b/helm/xapp-onboarder/templates/service-http.yaml new file mode 100644 index 0000000..1338537 --- /dev/null +++ b/helm/xapp-onboarder/templates/service-http.yaml @@ -0,0 +1,43 @@ +################################################################################ +# 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.xapp-onboarder.server" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.xapp-onboarder.server" . }} + protocol: "TCP" + name: "server" + targetPort: "server" + - port: {{ include "common.serviceport.xapp-onboarder.chartmuseum" . }} + targetPort: "chartmuseum" + protocol: TCP + name: "chartmuseum" + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.xapp-onboarder" . }} + release: {{ .Release.Name }} + + diff --git a/helm/appmgr/templates/ingress-chartmuseum.yaml b/helm/xapp-onboarder/values.yaml similarity index 70% rename from helm/appmgr/templates/ingress-chartmuseum.yaml rename to helm/xapp-onboarder/values.yaml index a681e3a..bfda46f 100644 --- a/helm/appmgr/templates/ingress-chartmuseum.yaml +++ b/helm/xapp-onboarder/values.yaml @@ -14,20 +14,24 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: {{ include "common.ingressname.appmgr" . }}-chartmuseum -spec: - tls: - - hosts: - - {{ include "common.ingresscontroller.url.platform" . }} - secretName: secret-plt-ingress-cert - rules: - - http: - paths: - - backend: - serviceName: {{ include "common.servicename.appmgr.http" . }} - servicePort: {{ include "common.serviceport.appmgr.chartmuseum.http" . }} - path: {{ include "common.kongpath.ric.helmrepo" . }} + + +xapponboarder: + chart_workspace_size: "500MB" + chart_workspace_path: "/tmp/xapp-onboarder" + http_retry: "3" + helm_version: "2.12.3" + allow_redeploy: "True" + + replicaCount: 1 + imagePullPolicy: IfNotPresent + image: + xapponboarder: + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: xapp-onboarder + tag: 1.0.0 + chartmuseum: + registry: "docker.io" + name: chartmuseum/chartmuseum + tag: v0.8.2 -- 2.16.6