summaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/sdnc')
-rw-r--r--kubernetes/sdnc/requirements.yaml4
-rw-r--r--kubernetes/sdnc/resources/config/conf/mountpoint-registrar.properties14
-rw-r--r--kubernetes/sdnc/templates/statefulset.yaml70
-rw-r--r--kubernetes/sdnc/values.yaml48
4 files changed, 52 insertions, 84 deletions
diff --git a/kubernetes/sdnc/requirements.yaml b/kubernetes/sdnc/requirements.yaml
index 57c165c4c0..f58ecb16be 100644
--- a/kubernetes/sdnc/requirements.yaml
+++ b/kubernetes/sdnc/requirements.yaml
@@ -1,5 +1,6 @@
# Copyright © 2017 Amdocs, Bell Canada,
# Copyright © 2020 highstreet technologies GmbH
+# Copyright © 2021 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,6 +21,9 @@ dependencies:
- name: certInitializer
version: ~7.x-0
repository: '@local'
+ - name: cmpv2Certificate
+ version: ~7.x-0
+ repository: '@local'
- name: logConfiguration
version: ~7.x-0
repository: '@local'
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 63b56f87a9..2158fefe19 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -1,6 +1,7 @@
{{/*
# Copyright © 2020 Samsung Electronics
# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2021 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -66,6 +67,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
@@ -98,50 +106,8 @@ spec:
name: {{ include "common.name" . }}-readiness
{{ end -}}
{{ include "common.certInitializer.initContainer" . | indent 6 }}
-
- {{ if .Values.global.cmpv2Enabled }}
- - name: certs-init
- image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.platform.certServiceClient.image }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- env:
- - name: REQUEST_URL
- value: {{ .Values.global.platform.certServiceClient.envVariables.requestURL }}
- - name: REQUEST_TIMEOUT
- value: "30000"
- - name: OUTPUT_PATH
- value: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
- - name: CA_NAME
- value: {{ .Values.global.platform.certServiceClient.envVariables.caName }}
- - name: COMMON_NAME
- value: {{ .Values.global.platform.certServiceClient.envVariables.common_name }}
- - name: ORGANIZATION
- value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Organization }}
- - name: ORGANIZATION_UNIT
- value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}
- - name: LOCATION
- value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Location }}
- - name: STATE
- value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2State }}
- - name: COUNTRY
- value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Country }}
- - name: KEYSTORE_PATH
- value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePath }}
- - name: KEYSTORE_PASSWORD
- value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePassword }}
- - name: TRUSTSTORE_PATH
- value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePath }}
- - name: TRUSTSTORE_PASSWORD
- value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePassword }}
- terminationMessagePath: /dev/termination-log
- terminationMessagePolicy: File
- volumeMounts:
- - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
- name: certs
- - mountPath: {{ .Values.global.platform.certServiceClient.secret.mountPath }}
- name: certservice-tls-volume
- {{ end }}
-
- - name: {{ include "common.name" . }}-init-files
+{{ include "common.certServiceClient.initContainer" . | indent 6 }}
+ - name: {{ include "common.name" . }}-chown
image: {{ include "repositoryGenerator.image.busybox" . }}
command:
- sh
@@ -150,7 +116,7 @@ spec:
- |
mkdir {{ .Values.persistence.mdsalPath }}/daexim
mkdir {{ .Values.persistence.mdsalPath }}/journal
- mkdir {{ .Values.persistence.mdsalPath }}/snapshots
+ mkdir {{ .Values.persistence.mdsalPath }}/snapshots
chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
{{- if .Values.global.aafEnabled }}
chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
@@ -236,6 +202,7 @@ spec:
volumeMounts:
{{ include "common.certInitializer.volumeMount" . | indent 10 }}
+{{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
- mountPath: /etc/localtime
name: localtime
readOnly: true
@@ -294,10 +261,6 @@ spec:
- mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
name: properties
subPath: mountpoint-state-provider.properties
- {{ if .Values.global.cmpv2Enabled }}
- - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
- name: certs
- {{- end }}
resources:
{{ include "common.resources" . | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -348,19 +311,12 @@ spec:
- name: properties
emptyDir:
medium: Memory
- {{ if .Values.global.cmpv2Enabled }}
- - name: certs
- emptyDir:
- medium: Memory
- - name: certservice-tls-volume
- secret:
- secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
- {{- end }}
{{ if not .Values.persistence.enabled }}
- name: {{ include "common.fullname" . }}-data
emptyDir: {}
{{ else }}
{{ include "common.certInitializer.volumes" . | nindent 8 }}
+{{ include "common.certServiceClient.volumes" . | nindent 8 }}
volumeClaimTemplates:
- metadata:
name: {{ include "common.fullname" . }}-data
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index faf6594e2a..c02d5592e6 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -1,5 +1,6 @@
# Copyright © 2020 Samsung Electronics, highstreet technologies GmbH
# Copyright © 2017 Amdocs, Bell Canada
+# Copyright © 2021 Nokia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,33 +30,8 @@ global:
service: mariadb-galera
internalPort: 3306
nameOverride: mariadb-galera
- service: mariadb-galera
- # Enabling CMPv2
- cmpv2Enabled: true
+ # Enabling CMPv2 with CertManager
CMPv2CertManagerIntegration: false
- platform:
- certServiceClient:
- image: onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.3.2
- secret:
- name: oom-cert-service-client-tls-secret
- mountPath: /etc/onap/oom/certservice/certs/
- envVariables:
- # Certificate related
- cert_path: /var/custom-certs
- cmpv2Organization: "Linux-Foundation"
- cmpv2OrganizationalUnit: "ONAP"
- cmpv2Location: "San-Francisco"
- cmpv2Country: "US"
- # Client configuration related
- caName: "RA"
- common_name: "sdnc.simpledemo.onap.org"
- requestURL: "https://oom-cert-service:8443/v1/certificate/"
- requestTimeout: "30000"
- keystorePath: "/etc/onap/oom/certservice/certs/certServiceClient-keystore.jks"
- outputType: "P12"
- keystorePassword: "secret"
- truststorePath: "/etc/onap/oom/certservice/certs/truststore.jks"
- truststorePassword: "secret"
#################################################################
# Secrets metaconfig
@@ -97,6 +73,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 }}'
@@ -141,7 +125,8 @@ secrets:
# Certificates
#################################################################
certificates:
- - commonName: sdnc.simpledemo.onap.org
+ - mountPath: /var/custom-certs
+ commonName: sdnc.simpledemo.onap.org
dnsNames:
- sdnc.simpledemo.onap.org
p12Keystore:
@@ -250,6 +235,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
+
+