aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/nbi
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/nbi')
-rw-r--r--kubernetes/nbi/.helmignore21
-rw-r--r--kubernetes/nbi/Chart.yaml45
-rw-r--r--kubernetes/nbi/README.md17
-rw-r--r--kubernetes/nbi/templates/deployment.yaml112
-rw-r--r--kubernetes/nbi/templates/ingress.yaml17
-rw-r--r--kubernetes/nbi/templates/secret.yaml17
-rw-r--r--kubernetes/nbi/templates/service.yaml17
-rw-r--r--kubernetes/nbi/tests/deployment_test.yaml205
-rw-r--r--kubernetes/nbi/values.yaml193
9 files changed, 0 insertions, 644 deletions
diff --git a/kubernetes/nbi/.helmignore b/kubernetes/nbi/.helmignore
deleted file mode 100644
index f0c1319444..0000000000
--- a/kubernetes/nbi/.helmignore
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
diff --git a/kubernetes/nbi/Chart.yaml b/kubernetes/nbi/Chart.yaml
deleted file mode 100644
index 6f403f7f74..0000000000
--- a/kubernetes/nbi/Chart.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-# Modifications Copyright © 2018,2021 Orange
-# Modifications Copyright © 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.
-
-apiVersion: v2
-description: ONAP Northbound Interface
-name: nbi
-version: 13.1.0
-
-dependencies:
- - name: common
- version: ~13.x-0
- # local reference to common chart, as it is
- # a part of this chart's package and will not
- # be published independently to a repo (at this point)
- repository: '@local'
- - name: mongodb
- version: 14.12.3
- repository: '@local'
- - name: mariadb-galera
- version: ~13.x-0
- repository: '@local'
- condition: global.mariadbGalera.localCluster
- - name: mariadb-init
- version: ~13.x-0
- repository: '@local'
- condition: global.mariadbGalera.globalCluster
- - name: repositoryGenerator
- version: ~13.x-0
- repository: '@local'
- - name: serviceAccount
- version: ~13.x-0
- repository: '@local'
diff --git a/kubernetes/nbi/README.md b/kubernetes/nbi/README.md
deleted file mode 100644
index 9d79efe618..0000000000
--- a/kubernetes/nbi/README.md
+++ /dev/null
@@ -1,17 +0,0 @@
-# NBI
-
-## Introduction
-
-NBI stands for NorthBound Interface. It brings to ONAP a set of API that can be
-used by external systems as BSS for example. These API are based on TMF API.
-
-Full description is on [ONAP Read the Doc](https://onap.readthedocs.io/en/latest/submodules/externalapi/nbi.git/docs/offeredapis/index.html).
-
-## Requirements
-
-NBI needs the following ONAP projects to work:
-
-- AAI
-- SO
-- SDC
-- MSB
diff --git a/kubernetes/nbi/templates/deployment.yaml b/kubernetes/nbi/templates/deployment.yaml
deleted file mode 100644
index 863926a8ce..0000000000
--- a/kubernetes/nbi/templates/deployment.yaml
+++ /dev/null
@@ -1,112 +0,0 @@
-{{/*
-# Copyright © 2018 Orange
-# Modifications Copyright © 2018 Amdocs, Bell Canada
-# Modifications Copyright © 2020 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: {{- include "common.resourceMetadata" . | nindent 2 }}
-spec:
- selector: {{- include "common.selectors" . | nindent 4 }}
- replicas: {{ .Values.replicaCount }}
- template:
- metadata: {{- include "common.templateMetadata" . | nindent 6 }}
- spec:
- containers:
- - name: {{ include "common.name" . }}
- image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports: {{ include "common.containerPorts" . | nindent 12 }}
- # disable liveness probe when breakpoints set in debugger
- # so K8s doesn't restart unresponsive container
- {{ if .Values.liveness.enabled }}
- livenessProbe:
- httpGet:
- port: {{ .Values.service.internalPort }}
- path: {{ .Values.liveness.path }}
- scheme: HTTP
- initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end }}
- readinessProbe:
- httpGet:
- port: {{ .Values.service.internalPort }}
- path: {{ .Values.readiness.path }}
- scheme: HTTP
- initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.readiness.periodSeconds }}
- env:
- - name: SPRING_DATASOURCE_URL
- value: jdbc:mariadb://{{ include "common.mariadbService" . }}:{{ include "common.mariadbPort" . }}/{{ index .Values "mariadb-galera" "db" "name" }}
- - name: SPRING_DATASOURCE_USERNAME
- {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "login") | indent 14 }}
- - name: SPRING_DATASOURCE_PASSWORD
- {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "nbi-db-secret" "key" "password") | indent 14 }}
- - name: SPRING_DATA_MONGODB_HOST
- value: {{ .Values.mongodb.service.nameOverride }}.{{ include "common.namespace" . }}
- - name: SPRING_DATA_MONGODB_PORT
- value: "{{ .Values.mongodb.service.port }}"
- - name: SPRING_DATA_MONGODB_DATABASE
- value: {{ .Values.mongodb.config.dbName }}
- - name: ONAP_LCPCLOUDREGIONID
- value: {{ .Values.config.openStackRegion }}
- - name: ONAP_TENANTID
- value: {{ .Values.config.openStackVNFTenantId | quote }}
- - name: ONAP_CLOUDOWNER
- value: {{ .Values.config.cloudOwner }}
- - name: ONAP_K8SCLOUDREGIONID
- value: {{ .Values.config.k8sCloudRegionId }}
- - name: ONAP_K8SCLOUDOWNER
- value: {{ .Values.config.k8sCloudOwner }}
- - name: NBI_URL
- value: "http://nbi.{{ include "common.namespace" . }}:{{ .Values.service.internalPort }}/nbi/api/v4"
- - name: SDC_HOST
- value: "http://sdc-be.{{ include "common.namespace" . }}:8080"
- - name: SDC_HEADER_ECOMPINSTANCEID
- value: {{ .Values.config.ecompInstanceId }}
- - name: SDC_HEADER_AUTHORIZATION
- value: {{ .Values.sdc_authorization }}
- - name: AAI_HOST
- value: "http://aai.{{ include "common.namespace" . }}:80"
- - name: AAI_HEADER_AUTHORIZATION
- value: {{ .Values.aai_authorization }}
- - name: SO_HOST
- value: http://so.{{ include "common.namespace" . }}:8080
- {{- if .Values.so_authorization }}
- - name: SO_HEADER_AUTHORIZATION
- value: {{ .Values.so_authorization }}
- {{- end }}
- - name: DMAAP_HOST
- value: "http://message-router.{{ include "common.namespace" . }}:3904"
- - name: LOGGING_LEVEL_ORG_ONAP_NBI
- value: {{ .Values.config.loglevel }}
- - name: MSB_ENABLED
- value: "{{ .Values.global.msbEnabled }}"
- - name: MSB_DISCOVERY_HOST
- value: "msb-discovery.{{ include "common.namespace" . }}"
- - name: MSB_DISCOVERY_PORT
- value: "10081"
- resources: {{ include "common.resources" . | nindent 12 }}
- {{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
- {{- end -}}
- {{- if .Values.affinity }}
- affinity:
-{{ toYaml .Values.affinity | indent 10 }}
- {{- end }}
- serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
- {{- include "common.imagePullSecrets" . | nindent 6 }}
diff --git a/kubernetes/nbi/templates/ingress.yaml b/kubernetes/nbi/templates/ingress.yaml
deleted file mode 100644
index 06e66ebbf1..0000000000
--- a/kubernetes/nbi/templates/ingress.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-{{/*
-# Copyright © 2020 Samsung, Orange
-#
-# 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.
-*/}}
-
-{{ include "common.ingress" . }}
diff --git a/kubernetes/nbi/templates/secret.yaml b/kubernetes/nbi/templates/secret.yaml
deleted file mode 100644
index 34932b713d..0000000000
--- a/kubernetes/nbi/templates/secret.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-{{/*
-# Copyright © 2020 Samsung Electronics
-#
-# 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.
-*/}}
-
-{{ include "common.secretFast" . }}
diff --git a/kubernetes/nbi/templates/service.yaml b/kubernetes/nbi/templates/service.yaml
deleted file mode 100644
index 11fae18dc1..0000000000
--- a/kubernetes/nbi/templates/service.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-{{/*
-# Copyright © 2017 Amdocs, Bell Canada, Orange
-#
-# 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.
-*/}}
-
-{{ include "common.service" . }} \ No newline at end of file
diff --git a/kubernetes/nbi/tests/deployment_test.yaml b/kubernetes/nbi/tests/deployment_test.yaml
deleted file mode 100644
index fe9d0d2977..0000000000
--- a/kubernetes/nbi/tests/deployment_test.yaml
+++ /dev/null
@@ -1,205 +0,0 @@
----
-suite: test deployment behavior
-templates:
- - deployment.yaml
-tests:
- - it: "should render with default values (global)"
- asserts:
- - isKind:
- of: Deployment
- - equal:
- path: metadata.name
- value: RELEASE-NAME-nbi
- - equal:
- path: metadata.namespace
- value: NAMESPACE
- - matchRegex:
- path: metadata.labels.app
- pattern: nbi
- - matchRegex:
- path: spec.template.metadata.labels.app
- pattern: nbi
- - equal:
- path: spec.template.metadata.name
- value: RELEASE-NAME-nbi
- - equal:
- path: spec.replicas
- value: 1
- - isNull:
- path: spec.template.spec.nodeSelector
- - isNull:
- path: spec.template.spec.affinity
-
- - it: "should render with default value (container)"
- asserts:
- - equal:
- path: spec.template.spec.containers[0].name
- value: nbi
- - equal:
- path: spec.template.spec.containers[0].image
- value: nexus3.onap.org:10001/onap/externalapi/nbi:5.0.1
- - equal:
- path: spec.template.spec.containers[0].imagePullPolicy
- value: IfNotPresent
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_URL
- value: jdbc:mariadb://mariadb-galera:3306/nbi
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_USERNAME
- value: rene
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_PASSWORD
- valueFrom:
- secretKeyRef:
- name: RELEASE-NAME-nbi-config
- key: db-user-password
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATA_MONGODB_HOST
- value: nbi-mongohost.NAMESPACE
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATA_MONGODB_PORT
- value: "27017"
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATA_MONGODB_DATABASE
- value: ServiceOrderDB
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: ONAP_LCPCLOUDREGIONID
- value: RegionOne
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: ONAP_TENANTID
- value: 31047205ce114b60833b23e400d6a535
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: ONAP_CLOUDOWNER
- value: CloudOwner
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: NBI_URL
- value: http://nbi.NAMESPACE:8080/nbi/api/v4
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SDC_HOST
- value: http://sdc-be.NAMESPACE:8080
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SDC_HEADER_ECOMPINSTANCEID
- value: OOM
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SDC_HEADER_AUTHORIZATION
- value: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: AAI_HOST
- value: http://aai.NAMESPACE:80
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: AAI_HEADER_AUTHORIZATION
- value: Basic QUFJOkFBSQ==
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SO_HOST
- value: http://so.NAMESPACE:8080
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: DMAAP_HOST
- value: http://message-router.NAMESPACE:3904
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: LOGGING_LEVEL_ORG_ONAP_NBI
- value: INFO
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: MSB_ENABLED
- value: "true"
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: MSB_DISCOVERY_HOST
- value: msb-discovery.NAMESPACE
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: MSB_DISCOVERY_PORT
- value: "10081"
- - equal:
- path: spec.template.spec.containers[0].livenessProbe
- value:
- initialDelaySeconds: 180
- periodSeconds: 30
- tcpSocket:
- port: 8080
- - equal:
- path: spec.template.spec.containers[0].readinessProbe
- value:
- initialDelaySeconds: 185
- periodSeconds: 30
- tcpSocket:
- port: 8080
- - contains:
- path: spec.template.spec.containers[0].ports
- content:
- containerPort: 8080
- - equal:
- path: spec.template.spec.containers[0].resources.limits.cpu
- value: 1
- - equal:
- path: spec.template.spec.containers[0].resources.limits.memory
- value: 2Gi
- - equal:
- path: spec.template.spec.containers[0].resources.requests.cpu
- value: 100m
- - equal:
- path: spec.template.spec.containers[0].resources.requests.memory
- value: 1Gi
- - it: "should render when deciding to use local cluster (container)"
- set:
- global:
- mariadbGalera:
- localCluster: true
- asserts:
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_URL
- value: jdbc:mariadb://nbi-galera:3306/nbi
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_USERNAME
- value: rene
- - contains:
- path: spec.template.spec.containers[0].env
- content:
- name: SPRING_DATASOURCE_PASSWORD
- valueFrom:
- secretKeyRef:
- name: RELEASE-NAME-nbi-nbi-galera
- key: user-password
diff --git a/kubernetes/nbi/values.yaml b/kubernetes/nbi/values.yaml
deleted file mode 100644
index 0d143dc6c6..0000000000
--- a/kubernetes/nbi/values.yaml
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright © 2018 Orange
-# Modifications Copyright © 2018 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
- nodePortPrefix: 302
- mariadbGalera: &mariadbGalera
- # flag to enable the DB creation via mariadb-operator
- useOperator: true
- #This flag allows NBI to instantiate its own mariadb-galera cluster
- #When changing it to "true", also set "globalCluster: false"
- #as the dependency check will not work otherwise (Chart.yaml)
- localCluster: false
- globalCluster: true
- service: mariadb-galera
- internalPort: 3306
- nameOverride: mariadb-galera
- msbEnabled: false
- # Docker Repository used by RepositoryGenerator
- dockerHubRepository: docker.io
- # Additions for MongoDB****************************
- # If dockerHubRepository is changes the following entry needs
- # to be changed as well
- imageRegistry: docker.io
- imagePullSecrets:
- - '{{ include "common.names.namespace" . }}-docker-registry-key'
- # *************************************************
-
-#################################################################
-# Secrets metaconfig
-#################################################################
-secrets:
- - uid: nbi-db-secret
- name: &dbUserSecretName '{{ include "common.release" . }}-nbi-db-secret'
- type: basicAuth
- externalSecret: '{{ tpl (default "" .Values.config.db.userCredentialsExternalSecret) . }}'
- login: '{{ .Values.config.db.userName }}'
- password: '{{ .Values.config.db.userPassword }}'
-
-subChartsOnly:
- enabled: true
-
-# application image
-repository: nexus3.onap.org:10001
-image: onap/externalapi/nbi:10.0.0
-pullPolicy: IfNotPresent
-sdc_authorization: Basic YWFpOktwOGJKNFNYc3pNMFdYbGhhazNlSGxjc2UyZ0F3ODR2YW9HR21KdlV5MlU=
-aai_authorization: Basic QUFJOkFBSQ==
-so_authorization:
-
-# application configuration
-config:
- loglevel: INFO
- logstashServiceName: log-ls
- logstashPort: 5044
- cloudOwner: CloudOwner
- k8sCloudRegionId: k8sregionfour
- k8sCloudOwner: k8scloudowner4
- ecompInstanceId: OOM
- openStackRegion: RegionOne
- openStackVNFTenantId: 31047205ce114b60833b23e400d6a535
- db:
- userName: &dbuser rene
- # userPassword: password
- # userCredentialsExternalSecret: some-secret
-
-mariadb-galera:
- db:
- user: *dbuser
- externalSecret: *dbUserSecretName
- name: &mysqlDbName nbi
- service:
- name: nbi-galera
- portName: nbi-galera
- internalPort: 3306
- nameOverride: &nbi-galera nbi-galera
- replicaCount: 1
- mariadbOperator:
- galera:
- enabled: false
- persistence:
- enabled: true
- mountSubPath: nbi/maria/data
- serviceAccount:
- nameOverride: *nbi-galera
-
-mariadb-init:
- config:
- userCredentialsExternalSecret: *dbUserSecretName
- mysqlDatabase: *mysqlDbName
- nameOverride: nbi-config
- serviceAccount:
- nameOverride: nbi-config
-
-mongodb:
- nameOverride: nbi-mongo
- config:
- dbName: &mongoDBName ServiceOrderDB
- auth:
- enabled: false
- databases:
- - *mongoDBName
- usernames:
- - "nbi"
- service:
- nameOverride: nbi-mongohost
- internalPort: 27017
- resources:
- limits:
- cpu: "1"
- memory: "1Gi"
- requests:
- cpu: "500m"
- memory: "1Gi"
-
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
- path: /nbi/api/v4/status
- initialDelaySeconds: 180
- periodSeconds: 30
- # necessary to disable liveness probe when setting breakpoints
- # in debugger so K8s doesn't restart unresponsive container
- enabled: true
-
-readiness:
- path: /nbi/api/v4/status
- initialDelaySeconds: 185
- periodSeconds: 30
-
-service:
- type: NodePort
- portName: api
- name: nbi
- internalPort: 8080
- ports:
- - name: http
- port: 8080
- nodePort: '74'
-
-ingress:
- enabled: false
- service:
- - baseaddr: "nbi-api"
- name: "nbi"
- port: 8080
- config:
- ssl: "redirect"
-# Resource Limit flavor -By Default using small
-flavor: small
-# Segregation for Different environment (Small and Large)
-resources:
- small:
- limits:
- cpu: "2"
- memory: "1Gi"
- requests:
- cpu: "0.5"
- memory: "1Gi"
- large:
- limits:
- cpu: "4"
- memory: "2Gi"
- requests:
- cpu: "1"
- memory: "2Gi"
- unlimited: {}
-
-#Pods Service Account
-serviceAccount:
- nameOverride: nbi
- roles:
- - read