From 9d26b3308fb6cf4e6ad7cf64f463bfba38c772c7 Mon Sep 17 00:00:00 2001 From: demskeq8 Date: Thu, 14 Jan 2021 16:45:28 +0100 Subject: [SDNC] Provide proxy settings for sdnr mountpointRegistrar proxyUser, ProxyPassowrd and proxyUrl for jersey.config.client.proxy settings Issue-ID: OOM-2662 Signed-off-by: demskeq8 Change-Id: I9136e71153ccce88b8bc8a6501ebdea2eb3a93cb --- .../config/conf/mountpoint-registrar.properties | 14 ++++++++++++++ kubernetes/sdnc/templates/statefulset.yaml | 7 +++++++ kubernetes/sdnc/values.yaml | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) (limited to 'kubernetes/sdnc') diff --git a/kubernetes/sdnc/resources/config/conf/mountpoint-registrar.properties b/kubernetes/sdnc/resources/config/conf/mountpoint-registrar.properties index a21ac0441c..57a16bd488 100644 --- a/kubernetes/sdnc/resources/config/conf/mountpoint-registrar.properties +++ b/kubernetes/sdnc/resources/config/conf/mountpoint-registrar.properties @@ -12,6 +12,13 @@ sdnrPasswd=${ODL_ADMIN_PASSWORD} faultConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPFaultVESMsgConsumer TransportType=HTTPNOAUTH host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort | default "3904"}} +{{- if .Values.config.sdnr.dmaapProxy.enabled }} +{{- if .Values.config.sdnr.dmaapProxy.usepwd }} +jersey.config.client.proxy.username=${DMAAP_HTTP_PROXY_USERNAME} +jersey.config.client.proxy.password=${DMAAP_HTTP_PROXY_PASSWORD} +{{- end }} +jersey.config.client.proxy.uri={{ .Values.config.sdnr.dmaapProxy.url }} +{{- end }} topic=unauthenticated.SEC_FAULT_OUTPUT contenttype=application/json group=myG @@ -23,6 +30,13 @@ limit=10000 pnfRegConsumerClass=org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.DMaaPPNFRegVESMsgConsumer TransportType=HTTPNOAUTH host=message-router.{{.Release.Namespace}}:{{.Values.config.dmaapPort | default "3904"}} +{{- if .Values.config.sdnr.dmaapProxy.enabled }} +{{- if .Values.config.sdnr.dmaapProxy.usepwd }} +jersey.config.client.proxy.username=${DMAAP_HTTP_PROXY_USERNAME} +jersey.config.client.proxy.password=${DMAAP_HTTP_PROXY_PASSWORD} +{{- end }} +jersey.config.client.proxy.uri={{ .Values.config.sdnr.dmaapProxy.url }} +{{- end }} topic=unauthenticated.VES_PNFREG_OUTPUT contenttype=application/json group=myG diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index 4fa6b70d70..91ad64cc77 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -66,6 +66,13 @@ spec: {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }} - name: ODL_ADMIN_PASSWORD {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }} + {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }} + - name: DMAAP_HTTP_PROXY_USERNAME + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }} + - name: DMAAP_HTTP_PROXY_PASSWORD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }} + {{- end }} + volumeMounts: - mountPath: /config-input diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 1d2fa266ea..dac0be2a07 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -97,6 +97,14 @@ secrets: password: '{{ .Values.config.odlPassword }}' # For now this is left hardcoded but should be revisited in a future passwordPolicy: required + - uid: dmaap-proxy-creds + name: &dmaapProxyCredsSecretName '{{ include "common.release" . }}-sdnc-dmaap-proxy-creds' + type: basicAuth + externalSecret: '{{ .Values.config.dmaapProxyCredsExternalSecret }}' + login: '{{ .Values.config.sdnr.dmaapProxy.user }}' + password: '{{ .Values.config.sdnr.dmaapProxy.password }}' + # For now this is left hardcoded but should be revisited in a future + passwordPolicy: required - uid: netbox-apikey type: password externalSecret: '{{ .Values.config.netboxApikeyExternalSecret }}' @@ -252,6 +260,15 @@ config: sdnrdbTrustAllCerts: true mountpointRegistrarEnabled: false mountpointStateProviderEnabled: false + # enable and set dmaap-proxy for mountpointRegistrar + dmaapProxy: + enabled: false + usepwd: true + user: addUserHere + password: addPasswordHere + url: addProxyUrlHere + + -- cgit 1.2.3-korg