From: Fiachra Corcoran Date: Wed, 7 Dec 2022 15:47:55 +0000 (+0000) Subject: Merge "[DCAEGEN2] Ves-open-api Add mech to load config at deploy time" X-Git-Tag: 12.0.0~149 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=5baf1c91590378270d9b01c5406e89f1f80dcfd3;hp=-c;p=oom.git Merge "[DCAEGEN2] Ves-open-api Add mech to load config at deploy time" --- 5baf1c91590378270d9b01c5406e89f1f80dcfd3 diff --combined kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml index a2c15450bf,daf8c76205..25658390b2 --- a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml +++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/templates/deployment.yaml @@@ -45,19 -45,15 +45,21 @@@ spec periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end }} env: - - name: ASDC_ADDRESS - value: {{ .Values.externalServices.sdc_be_https }} - - name: SCHEMA_MAP_PATH - value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }} + - name: SDC_ADDRESS + value: {{ .Values.externalServices.sdc_be_https }} + - name: SCHEMA_MAP_PATH + value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }} + - name: SECURITY_PROTOCOL + value: {{ .Values.config.kafka.securityProtocol }} + - name: SASL_MECHANISM + value: {{ .Values.config.kafka.saslMechanism }} + - name: SASL_JAAS_CONFIG + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-openapi-kafka-secret" "key" "sasl.jaas.config") | indent 12 }} 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 @@@ -67,5 -63,10 +69,10 @@@ 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" + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --combined kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml index a9763c9483,0b83ce2410..4f1f18444c --- a/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml +++ b/kubernetes/dcaegen2-services/components/dcae-ves-openapi-manager/values.yaml @@@ -18,33 -18,9 +18,33 @@@ # Global values global: pullPolicy: Always -image: onap/org.onap.dcaegen2.platform.ves-openapi-manager:1.2.0 +image: onap/org.onap.dcaegen2.platform.ves-openapi-manager:1.3.0 containerPort: &svc_port 8080 +secrets: + - uid: ves-openapi-kafka-secret + externalSecret: '{{ tpl (default "" .Values.config.jaasConfExternalSecret) . }}' + type: genericKV + envs: + - name: sasl.jaas.config + value: '{{ .Values.config.someConfig }}' + policy: generate + +# application configuration +config: + someConfig: blah + kafka: + bootstrapServer: strimzi-kafka-bootstrap:9092 + securityProtocol: SASL_PLAINTEXT + saslMechanism: SCRAM-SHA-512 + authType: simple + sdcTopic: + pattern: SDC-DIST + consumerGroup: dcaegen2 + clientId: ves-openapi-manager + +vesOpenApiKafkaUser: ves-open-api-kafka-user + service: ports: - name: &port http @@@ -69,6 -45,7 +69,6 @@@ liveness readinessCheck: wait_for: - - message-router - sdc-be flavor: small @@@ -94,3 -71,22 +94,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