summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Wrobel <tomasz.wrobel@nokia.com>2022-12-07 12:37:02 +0100
committerTomasz Wrobel <tomasz.wrobel@nokia.com>2022-12-07 14:50:44 +0100
commit9df9ba2e065a88c82932a00075a00a141c174b70 (patch)
treea5e90f6091195020fabb77f66dcf97bb0dfb3b6a
parente0259590627cd9e7925b6912ac2203091dbb54bf (diff)
[DCAEGEN2] Ves-open-api Add mech to load config at deploy time
Enable configuration ves-open-api by Helm values Issue-ID: DCAEGEN2-3316 Signed-off-by: Tomasz Wrobel <tomasz.wrobel@nokia.com> Change-Id: If6e70d63f961aaa7d26e1680f7bb917cf4de3546
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/Chart.yaml3
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/configmap.yaml20
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml9
-rw-r--r--kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml19
4 files changed, 50 insertions, 1 deletions
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/Chart.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/Chart.yaml
index 33b129555f..6c8550c727 100644
--- a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/Chart.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/Chart.yaml
@@ -35,3 +35,6 @@ dependencies:
- name: serviceAccount
version: ~12.x-0
repository: '@local'
+ - name: dcaegen2-services-common
+ version: ~12.x-0
+ repository: '@local'
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/configmap.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/configmap.yaml
new file mode 100644
index 0000000000..7253125d50
--- /dev/null
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/configmap.yaml
@@ -0,0 +1,20 @@
+{{/*
+#============LICENSE_START========================================================
+# ================================================================================
+# Copyright (c) 2022 Nokia. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+*/}}
+
+{{ include "dcaegen2-services-common.configMap" . }}
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml
index 1c6e3593ac..daf8c76205 100644
--- a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml
@@ -52,6 +52,8 @@ spec:
volumeMounts:
- name: schema-map
mountPath: {{ .Values.schemaMap.directory }}
+ - name: app-config
+ mountPath: /app/config/
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: schema-map
@@ -61,5 +63,10 @@ spec:
items:
- key: {{ .Values.schemaMap.filename }}
path: {{ .Values.schemaMap.filename }}
+ - name: app-config
+ configMap:
+ name: {{ include "common.fullname" . }}-application-config-configmap
+ defaultMode: 420
+ optional: true
imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key" \ No newline at end of file
+ - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml
index c07bd529cc..0b83ce2410 100644
--- a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml
+++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml
@@ -71,3 +71,22 @@ serviceAccount:
nameOverride: dcae-ves-openapi-manager
roles:
- read
+
+# initial application configuration
+applicationConfig:
+ vesopenapimanager:
+ validation:
+ schemaMapPath: ${SCHEMA_MAP_PATH:./src/main/resources/schema-map.json}
+ eventDomainPath: /event/structure/commonEventHeader/structure/domain/value
+ eventSchemaReferencePath: /event/structure/stndDefinedFields/structure/schemaReference/value
+ distribution:
+ sdcAddress: ${SDC_ADDRESS:sdc-be.onap:30204}
+ user: dcae
+ password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ pollingInterval: 20
+ pollingTimeout: 20
+ consumerGroup: dcaegen2
+ environmentName: AUTO
+ consumerID: ves-openapi-manager
+ activateServerTLSAuth: false
+ isFilterInEmptyResources: false