diff options
Diffstat (limited to 'kubernetes/policy/charts')
18 files changed, 181 insertions, 32 deletions
diff --git a/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw-tweaks.sh b/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw-tweaks.sh index 5c3a2a1fe3..d7b27a071c 100644 --- a/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw-tweaks.sh +++ b/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw-tweaks.sh @@ -39,14 +39,3 @@ for CONFIG in ${PROPS_RUNTIME} ${PROPS_INSTALL}; do sed -i -e "s/brms.dependency.version=.*/brms.dependency.version=${version}/g" "${CONFIG}" fi done - -DEPS_JSON_RUNTIME="${POLICY_HOME}/servers/brmsgw/dependency.json" -DEPS_JSON_INSTALL="${POLICY_HOME}/install/servers/brmsgw/dependency.json" - -for DEP in ${DEPS_JSON_RUNTIME} ${DEPS_JSON_INSTALL}; do - if [ ! -f "${DEP}" ]; then - echo "warning: configuration does not exist: ${DEP}" - else - sed -i -e "s/\"version\":.*-SNAPSHOT\"/\"version\": \"${version}\"/g" "${DEP}" - fi -done diff --git a/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf b/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf index b074d48501..3952a4cb8d 100644 --- a/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf +++ b/kubernetes/policy/charts/brmsgw/resources/config/pe/brmsgw.conf @@ -26,7 +26,7 @@ PDP_HTTP_PASSWORD=alpha123 PDP_PAP_PDP_HTTP_USER_ID=testpap PDP_PAP_PDP_HTTP_PASSWORD=alpha123 -M2_HOME=/usr/share/maven +M2_HOME=/usr/share/java/maven-3 snapshotRepositoryID=policy-nexus-snapshots snapshotRepositoryName=Snapshots snapshotRepositoryURL=http://{{ .Values.global.nexus.nameOverride }}:{{.Values.config.nexusPort}}/nexus/content/repositories/snapshots @@ -64,4 +64,4 @@ BRMS_UEB_API_SECRET= #Dependency.json file version BRMS_DEPENDENCY_VERSION=1.3.1 - +BRMS_MODELS_DEPENDENCY_VERSION=2.0.0-SNAPSHOT diff --git a/kubernetes/policy/charts/mariadb/resources/config/db.sh b/kubernetes/policy/charts/mariadb/resources/config/db.sh index 3f94223d33..a5eb7f55c2 100644 --- a/kubernetes/policy/charts/mariadb/resources/config/db.sh +++ b/kubernetes/policy/charts/mariadb/resources/config/db.sh @@ -15,7 +15,7 @@ #!/bin/bash -xv -for db in support onap_sdk log migration operationshistory10 pooling +for db in support onap_sdk log migration operationshistory10 pooling policyadmin operationshistory do mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "CREATE DATABASE IF NOT EXISTS ${db};" mysql -uroot -p"${MYSQL_ROOT_PASSWORD}" --execute "GRANT ALL PRIVILEGES ON \`${db}\`.* TO '${MYSQL_USER}'@'%' ;" diff --git a/kubernetes/policy/charts/policy-apex-pdp/resources/config/OnapPfConfig.json b/kubernetes/policy/charts/policy-apex-pdp/resources/config/OnapPfConfig.json new file mode 100644 index 0000000000..8edca606e4 --- /dev/null +++ b/kubernetes/policy/charts/policy-apex-pdp/resources/config/OnapPfConfig.json @@ -0,0 +1,16 @@ +{ + "name":"OnapPfParameterGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true + }, + "pdpStatusParameters":{ + "timeIntervalMs": 120000, + "pdpType":"apex", + "description":"Pdp Heartbeat", + "supportedPolicyTypes":[{"name":"onap.policies.controlloop.Operational","version":"1.0.0"}] + } +} diff --git a/kubernetes/policy/charts/policy-apex-pdp/resources/config/topic.properties b/kubernetes/policy/charts/policy-apex-pdp/resources/config/topic.properties new file mode 100644 index 0000000000..b61626b2da --- /dev/null +++ b/kubernetes/policy/charts/policy-apex-pdp/resources/config/topic.properties @@ -0,0 +1,23 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 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. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +dmaap.source.topics=POLICY-PDP-PAP +dmaap.sink.topics=POLICY-PDP-PAP + +dmaap.source.topics.POLICY-PDP-PAP.servers= message-router +dmaap.sink.topics.POLICY-PDP-PAP.servers= message-router
\ No newline at end of file diff --git a/kubernetes/policy/charts/policy-apex-pdp/templates/configmap.yaml b/kubernetes/policy/charts/policy-apex-pdp/templates/configmap.yaml index 318ad34491..937a5b4afd 100644 --- a/kubernetes/policy/charts/policy-apex-pdp/templates/configmap.yaml +++ b/kubernetes/policy/charts/policy-apex-pdp/templates/configmap.yaml @@ -22,5 +22,4 @@ metadata: name: {{ include "common.fullname" . }}-configmap namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }} - +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/policy/charts/policy-apex-pdp/templates/statefulset.yaml b/kubernetes/policy/charts/policy-apex-pdp/templates/statefulset.yaml index 29a24e66bf..f1c024bc4e 100644 --- a/kubernetes/policy/charts/policy-apex-pdp/templates/statefulset.yaml +++ b/kubernetes/policy/charts/policy-apex-pdp/templates/statefulset.yaml @@ -42,9 +42,11 @@ spec: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" command: - - /opt/app/policy/apex-pdp/bin/apexEngine.sh + - /opt/app/policy/apex-pdp/bin/apexOnapPf.sh - -c - - /home/apexuser/config/config.json + - /home/apexuser/config/OnapPfConfig.json + - -p + - /home/apexuser/config/topic.properties imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.externalPort }} diff --git a/kubernetes/policy/charts/policy-apex-pdp/values.yaml b/kubernetes/policy/charts/policy-apex-pdp/values.yaml index 95b2d2c28d..70994300db 100644 --- a/kubernetes/policy/charts/policy-apex-pdp/values.yaml +++ b/kubernetes/policy/charts/policy-apex-pdp/values.yaml @@ -59,7 +59,7 @@ service: type: NodePort name: policy-apex-pdp portName: policy-apex-pdp - externalPort: 12345 + externalPort: 6969 nodePort: 37 ingress: diff --git a/kubernetes/policy/charts/policy-api/resources/config/config.json b/kubernetes/policy/charts/policy-api/resources/config/config.json index 9fef1998d1..16e0a51682 100644 --- a/kubernetes/policy/charts/policy-api/resources/config/config.json +++ b/kubernetes/policy/charts/policy-api/resources/config/config.json @@ -22,5 +22,14 @@ "port":6969, "userName":"healthcheck", "password":"zb!XztG34" + }, + "databaseProviderParameters": { + "name": "PolicyProviderParameterGroup", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.mariadb.jdbc.Driver", + "databaseUrl": "jdbc:mariadb://{{.Values.global.mariadb.nameOverride}}:3306/policyadmin", + "databaseUser": "policy_user", + "databasePassword": "cG9saWN5X3VzZXI=", + "persistenceUnit": "PolicyMariaDb" } -} +}
\ No newline at end of file diff --git a/kubernetes/policy/charts/policy-api/templates/deployment.yaml b/kubernetes/policy/charts/policy-api/templates/deployment.yaml index 2d16b5e857..b79c6bf9c7 100644 --- a/kubernetes/policy/charts/policy-api/templates/deployment.yaml +++ b/kubernetes/policy/charts/policy-api/templates/deployment.yaml @@ -16,6 +16,21 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.global.mariadb.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" diff --git a/kubernetes/policy/charts/policy-pap/resources/config/config.json b/kubernetes/policy/charts/policy-pap/resources/config/config.json index 81451037de..995c951b81 100644 --- a/kubernetes/policy/charts/policy-pap/resources/config/config.json +++ b/kubernetes/policy/charts/policy-pap/resources/config/config.json @@ -22,5 +22,24 @@ "port":6969, "userName":"healthcheck", "password":"zb!XztG34" + }, + "pdpParameters": { + "updateParameters": { + "maxRetryCount": 1, + "maxWaitMs": 30000 + }, + "stateChangeParameters": { + "maxRetryCount": 1, + "maxWaitMs": 30000 + } + }, + "databaseProviderParameters": { + "name": "PolicyProviderParameterGroup", + "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl", + "databaseDriver": "org.mariadb.jdbc.Driver", + "databaseUrl": "jdbc:mariadb://{{.Values.global.mariadb.nameOverride}}:3306/policyadmin", + "databaseUser": "policy_user", + "databasePassword": "cG9saWN5X3VzZXI=", + "persistenceUnit": "PolicyMariaDb" } } diff --git a/kubernetes/policy/charts/policy-pap/resources/config/topic.properties b/kubernetes/policy/charts/policy-pap/resources/config/topic.properties new file mode 100644 index 0000000000..c1124a1172 --- /dev/null +++ b/kubernetes/policy/charts/policy-pap/resources/config/topic.properties @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# ONAP PAP +# ================================================================================ +# Copyright (C) 2019 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. +# ============LICENSE_END========================================================= + +dmaap.sink.topics=POLICY-PDP-PAP +dmaap.sink.topics.POLICY-PDP-PAP.servers=message-router +dmaap.source.topics=POLICY-PDP-PAP +dmaap.source.topics.POLICY-PDP-PAP.servers=message-router diff --git a/kubernetes/policy/charts/policy-pap/templates/configmap.yaml b/kubernetes/policy/charts/policy-pap/templates/configmap.yaml index 56180768a1..19ce6a8f20 100644 --- a/kubernetes/policy/charts/policy-pap/templates/configmap.yaml +++ b/kubernetes/policy/charts/policy-pap/templates/configmap.yaml @@ -22,5 +22,5 @@ metadata: name: {{ include "common.fullname" . }}-configmap namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/policy/charts/policy-pap/templates/deployment.yaml b/kubernetes/policy/charts/policy-pap/templates/deployment.yaml index 5bec94b102..4945f766d8 100644 --- a/kubernetes/policy/charts/policy-pap/templates/deployment.yaml +++ b/kubernetes/policy/charts/policy-pap/templates/deployment.yaml @@ -16,12 +16,27 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.global.mariadb.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/opt/app/policy/pap/bin/policy-pap.sh"] - args: ["/opt/app/policy/pap/etc/mounted/config.json"] + args: ["/opt/app/policy/pap/etc/mounted/config.json", "/opt/app/policy/pap/etc/mounted/topic.properties"] ports: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger diff --git a/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json index 7fb864bb31..789dde4491 100644 --- a/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json +++ b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/config.json @@ -16,11 +16,14 @@ # SPDX-License-Identifier: Apache-2.0 # ============LICENSE_END========================================================= { - "name":"XacmlPdpGroup", - "restServerParameters":{ - "host":"0.0.0.0", - "port":6969, - "userName":"healthcheck", - "password":"zb!XztG34" - } -} + "name": "XacmlPdpGroup", + "restServerParameters": { + "host": "0.0.0.0", + "port": 6969, + "userName": "healthcheck", + "password": "zb!XztG34", + "https": true, + "aaf": false + }, + "applicationPath": "/opt/app/policy/pdpx/apps" +}
\ No newline at end of file diff --git a/kubernetes/policy/charts/policy-xacml-pdp/resources/config/topic.properties b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/topic.properties new file mode 100644 index 0000000000..a56de8bc5e --- /dev/null +++ b/kubernetes/policy/charts/policy-xacml-pdp/resources/config/topic.properties @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# ONAP PAP +# ================================================================================ +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +dmaap.sink.topics=POLICY-PDP-PAP +dmaap.sink.topics.POLICY-PDP-PAP.servers=message-router +dmaap.source.topics=POLICY-PDP-PAP +dmaap.source.topics.POLICY-PDP-PAP.servers=message-router
\ No newline at end of file diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml index d90b0c93dc..f689f4d6e8 100644 --- a/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml +++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/configmap.yaml @@ -22,4 +22,4 @@ metadata: name: {{ include "common.fullname" . }}-configmap namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml index 20b2afbf50..e5e94ccc95 100644 --- a/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml +++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml @@ -16,12 +16,27 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - {{ .Values.global.mariadb.nameOverride }} + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ include "common.repository" . }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/opt/app/policy/pdpx/bin/policy-pdpx.sh"] - args: ["/opt/app/policy/pdpx/etc/mounted/config.json"] + args: ["/opt/app/policy/pdpx/etc/mounted/config.json","/opt/app/policy/pdpx/etc/mounted/topic.properties"] ports: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger |