diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-21 14:24:03 +0000 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-01-22 14:55:45 +0000 |
commit | 31c61d495474985b8cc3460464f888651d0919ed (patch) | |
tree | 72ac562f9bd64196fda57edd8ca6a62f8877b046 /helm | |
parent | caa7adc30ed054d2a5cfea4a1b9a265d5cfb6785 (diff) |
Add kafka support in K8s CSIT
Issue-ID: POLICY-4402
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I29ef966ed5eb70997574269ff6180f68d754383b
Diffstat (limited to 'helm')
45 files changed, 224 insertions, 749 deletions
diff --git a/helm/cp-kafka/kafka.yaml b/helm/cp-kafka/kafka.yaml new file mode 100644 index 00000000..cc4677d8 --- /dev/null +++ b/helm/cp-kafka/kafka.yaml @@ -0,0 +1,64 @@ +# Copyright © 2024 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. + +kind: Deployment +apiVersion: apps/v1 +metadata: + name: kafka-deployment + labels: + app: kafka +spec: + replicas: 1 + selector: + matchLabels: + app: kafka + template: + metadata: + labels: + app: kafka + spec: + containers: + - name: broker + image: confluentinc/cp-kafka:latest + ports: + - containerPort: 9092 + command: ["bash", "-c", "unset KAFKA_PORT; /etc/confluent/docker/run"] + env: + - name: KAFKA_BROKER_ID + value: "1" + - name: KAFKA_ZOOKEEPER_CONNECT + value: 'zookeeper-service:2181' + - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP + value: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT + - name: KAFKA_ADVERTISED_LISTENERS + value: PLAINTEXT://:29092,PLAINTEXT_INTERNAL://kafka:9092 + - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR + value: "1" + - name: KAFKA_TRANSACTION_STATE_LOG_MIN_ISR + value: "1" + - name: KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR + value: "1" +--- +apiVersion: v1 +kind: Service +metadata: + name: kafka +spec: + selector: + app: kafka + ports: + - protocol: TCP + port: 9092 + targetPort: 9092 + diff --git a/helm/cp-kafka/zookeeper.yaml b/helm/cp-kafka/zookeeper.yaml new file mode 100644 index 00000000..707e5070 --- /dev/null +++ b/helm/cp-kafka/zookeeper.yaml @@ -0,0 +1,54 @@ +# Copyright © 2024 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. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: zookeeper-deployment + labels: + app: zookeeper +spec: + replicas: 1 + selector: + matchLabels: + app: zookeeper + template: + metadata: + labels: + app: zookeeper + spec: + containers: + - name: zookeeper + image: confluentinc/cp-zookeeper:latest + ports: + - containerPort: 2181 + env: + - name: ZOOKEEPER_CLIENT_PORT + value: "2181" + - name: ZOOKEEPER_TICK_TIME + value: "2000" + + +--- +apiVersion: v1 +kind: Service +metadata: + name: zookeeper-service +spec: + selector: + app: zookeeper + ports: + - protocol: TCP + port: 2181 + targetPort: 2181 diff --git a/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json b/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json index e70cb3f5..53655845 100755 --- a/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json +++ b/helm/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json @@ -10,7 +10,7 @@ }, "pdpStatusParameters": { "pdpGroup": "defaultGroup", - "timeIntervalMs": 120000, + "timeIntervalMs": 20000, "pdpType": "apex", "description": "Pdp Heartbeat", "supportedPolicyTypes": [ @@ -27,22 +27,23 @@ "topicParameterGroup": { "topicSources": [ { - "topic": "POLICY-PDP-PAP", + "topic": "policy-pdp-pap", "servers": [ - "message-router" + "{{ .Values.global.kafkaServer }}:9092" ], "useHttps": false, - "topicCommInfrastructure": "dmaap" + "topicCommInfrastructure": "kafka", + "fetchTimeout": 15000 } ], "topicSinks": [ { - "topic": "POLICY-PDP-PAP", + "topic": "policy-pdp-pap", "servers": [ - "message-router" + "{{ .Values.global.kafkaServer }}:9092" ], "useHttps": false, - "topicCommInfrastructure": "dmaap" + "topicCommInfrastructure": "kafka" } ] } diff --git a/helm/policy/components/policy-apex-pdp/templates/secrets.yaml b/helm/policy/components/policy-apex-pdp/templates/secrets.yaml index 60443044..4e4fffae 100755 --- a/helm/policy/components/policy-apex-pdp/templates/secrets.yaml +++ b/helm/policy/components/policy-apex-pdp/templates/secrets.yaml @@ -14,21 +14,6 @@ # limitations under the License. */}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: RELEASE - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: "MobnDove6!Qibh" - ---- apiVersion: v1 kind: Secret diff --git a/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml b/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml index 1d939c5f..305d1c8e 100755 --- a/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml +++ b/helm/policy/components/policy-apex-pdp/templates/statefulset.yaml @@ -57,13 +57,7 @@ spec: secretKeyRef: name: {{ .Chart.Name }}-restserver-creds key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config -{{- end }} + volumeMounts: - mountPath: /config-input name: apexconfig-input diff --git a/helm/policy/components/policy-apex-pdp/values.yaml b/helm/policy/components/policy-apex-pdp/values.yaml index ae6ae1d5..add48dc8 100755 --- a/helm/policy/components/policy-apex-pdp/values.yaml +++ b/helm/policy/components/policy-apex-pdp/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -96,26 +96,3 @@ serviceAccount: nameOverride: policy-apex-pdp roles: - read - -# application configuration -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - policyPdpPapTopic: policy-pdp-pap -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. diff --git a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml index 8d98d867..17a8118b 100755 --- a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/resources/config/A1pmsParticipantParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. 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. @@ -45,16 +45,16 @@ participant: participantId: 101c62b3-8918-41b9-a747-d21eb79c6c00 clampAutomationCompositionTopics: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka fetchTimeout: 15000 topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka participantSupportedElementTypes: - typeName: org.onap.policy.clamp.acm.A1PMSAutomationCompositionElement diff --git a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml index 61b32118..e68d6550 100755 --- a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/deployment.yaml @@ -63,14 +63,6 @@ spec: name: {{ .Chart.Name }}-restserver-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config - -{{- end }} volumeMounts: - mountPath: /config-input name: ac-a1pms-ppnt-config diff --git a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/secret.yaml b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/secret.yaml index d9ab84c1..013c47b8 100755 --- a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/secret.yaml +++ b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/templates/secret.yaml @@ -31,18 +31,3 @@ type: Opaque stringData: login: {{ .Values.restServer.user }} password: {{ .Values.restServer.password }} - ---- - -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: {{ .Values.config.jaas }} diff --git a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/values.yaml index 21f41349..b700dd0a 100755 --- a/helm/policy/components/policy-clamp-ac-a1pms-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-a1pms-ppnt/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,29 +78,3 @@ serviceAccount: nameOverride: policy-clamp-ac-a1pms-ppnt roles: - create - -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy-acruntime-participant - jaas: KuldHochQipa7, -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 diff --git a/helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml index a228e97a..a0cf2831 100644 --- a/helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-http-ppnt/resources/config/HttpParticipantParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,18 +26,6 @@ spring: user: name: ${RESTSERVER_USER} password: ${RESTSERVER_PASSWORD} -{{- if .Values.config.useStrimziKafka }} - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} - bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} security: enable-csrf: false @@ -49,45 +37,22 @@ participant: participantId: 101c62b3-8918-41b9-a747-d21eb79c6c01 clampAutomationCompositionTopics: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka fetchTimeout: 15000 useHttps: false topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false participantSupportedElementTypes: - typeName: org.onap.policy.clamp.acm.HttpAutomationCompositionElement typeVersion: 1.0.0 -# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below -# clampAutomationCompositionTopics: -# topicSources: -# - topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# fetchTimeout: 15000 -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} -# topicSinks: -# - topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} management: endpoints: diff --git a/helm/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml index c8aadc8b..ecdaa030 100644 --- a/helm/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-http-ppnt/templates/deployment.yaml @@ -60,13 +60,7 @@ spec: secretKeyRef: name: {{ .Chart.Name }}-restserver-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config -{{- end }} + volumeMounts: - mountPath: /config-input name: ac-http-ppnt-config diff --git a/helm/policy/components/policy-clamp-ac-http-ppnt/templates/secrets.yaml b/helm/policy/components/policy-clamp-ac-http-ppnt/templates/secrets.yaml index 620849c6..53d27e7a 100644 --- a/helm/policy/components/policy-clamp-ac-http-ppnt/templates/secrets.yaml +++ b/helm/policy/components/policy-clamp-ac-http-ppnt/templates/secrets.yaml @@ -17,21 +17,6 @@ apiVersion: v1 kind: Secret metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: release - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: "Tokm6*DaheWaro" - ---- -apiVersion: v1 -kind: Secret -metadata: name: {{ .Chart.Name }}-restserver-secret namespace: default labels: diff --git a/helm/policy/components/policy-clamp-ac-http-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-http-ppnt/values.yaml index 87ca885d..a4f05ea7 100644 --- a/helm/policy/components/policy-clamp-ac-http-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-http-ppnt/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -88,28 +88,3 @@ serviceAccount: roles: - read -config: - # Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy-acruntime-participant -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 - diff --git a/helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml index 5b059987..b8e210a1 100644 --- a/helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-k8s-ppnt/resources/config/KubernetesParticipantParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. +# Copyright (C) 2022,2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,18 +26,6 @@ spring: user: name: ${RESTSERVER_USER} password: ${RESTSERVER_PASSWORD} - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} -{{- if .Values.config.useStrimziKafka }} - bootstrap-servers: release-{{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} security: enable-csrf: false @@ -52,50 +40,24 @@ participant: clampAutomationCompositionTopics: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka fetchTimeout: 15000 useHttps: false topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false participantSupportedElementTypes: - typeName: org.onap.policy.clamp.acm.K8SMicroserviceAutomationCompositionElement typeVersion: 1.0.0 -# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below -# clampAutomationCompositionTopics: -# topicSources: -# - -# topic: policy-acruntime-participant -# servers: -# - release-{{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# fetchTimeout: 15000 -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} -# topicSinks: -# - -# topic: policy-acruntime-participant -# servers: -# - release-{{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} - management: endpoints: web: diff --git a/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml index c934722a..fa90535f 100644 --- a/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/deployment.yaml @@ -63,14 +63,7 @@ spec: name: {{ .Chart.Name }}-restserver-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config -{{- end }} volumeMounts: - mountPath: /config-input name: ac-k8s-ppnt-config diff --git a/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/secret.yaml b/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/secret.yaml index a25390f2..65e0171d 100644 --- a/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/secret.yaml +++ b/helm/policy/components/policy-clamp-ac-k8s-ppnt/templates/secret.yaml @@ -32,17 +32,4 @@ stringData: login: {{ .Values.restServer.user }} password: {{ .Values.restServer.password }} ---- -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: {{ .Values.config.jaas }} diff --git a/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml index d6d4a034..934b1bb5 100644 --- a/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-k8s-ppnt/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. +# Copyright (C) 2022,2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -98,29 +98,3 @@ repoList: protocols: - http - https - -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy-acruntime-participant - jaas: KuldHochQipa7, -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 diff --git a/helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml index 25852680..51eab747 100755 --- a/helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-kserve-ppnt/resources/config/KserveParticipantParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. 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. @@ -33,18 +33,6 @@ spring: - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration - io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration - io.kubernetes.client.spring.extended.network.config.KubernetesLoadBalancerAutoConfiguration - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} -{{- if .Values.config.useStrimziKafka }} - bootstrap-servers: release-{{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} security: enable-csrf: false @@ -56,47 +44,21 @@ participant: participantId: 101c62b3-8918-41b9-a747-d21eb79c6c04 clampAutomationCompositionTopics: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka fetchTimeout: 15000 topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + - topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka participantSupportedElementTypes: - typeName: org.onap.policy.clamp.acm.KserveAutomationCompositionElement typeVersion: 1.0.1 -# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below -# clampAutomationCompositionTopics: -# topicSources: -# - -# topic: policy-acruntime-participant -# servers: -# - release-{{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# fetchTimeout: 15000 -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} -# topicSinks: -# - -# topic: policy-acruntime-participant -# servers: -# - release-{{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} - customresourcedefinition: group: serving.kserve.io version: v1beta1 diff --git a/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml index 969ac923..60d50322 100755 --- a/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/deployment.yaml @@ -63,14 +63,6 @@ spec: name: {{ .Chart.Name }}-restserver-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config - -{{- end }} volumeMounts: - mountPath: /config-input name: ac-kserve-ppnt-config diff --git a/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/secret.yaml b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/secret.yaml index d9ab84c1..e410e1cd 100755 --- a/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/secret.yaml +++ b/helm/policy/components/policy-clamp-ac-kserve-ppnt/templates/secret.yaml @@ -32,17 +32,3 @@ stringData: login: {{ .Values.restServer.user }} password: {{ .Values.restServer.password }} ---- - -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: {{ .Values.config.jaas }} diff --git a/helm/policy/components/policy-clamp-ac-kserve-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-kserve-ppnt/values.yaml index eb4dfcf9..444c5bf2 100755 --- a/helm/policy/components/policy-clamp-ac-kserve-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-kserve-ppnt/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -78,29 +78,3 @@ serviceAccount: nameOverride: policy-clamp-ac-kserve-ppnt roles: - create - -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy-acruntime-participant - jaas: KuldHochQipa7, -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml index 713105bc..7d5b50d7 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/resources/config/PolicyParticipantParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,18 +26,6 @@ spring: user: name: ${RESTSERVER_USER} password: ${RESTSERVER_PASSWORD} - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} -{{- if .Values.config.useStrimziKafka }} - bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} security: enable-csrf: false @@ -68,50 +56,24 @@ participant: clampAutomationCompositionTopics: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka fetchTimeout: 15000 useHttps: false topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false participantSupportedElementTypes: - typeName: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement typeVersion: 1.0.0 -# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below -# clampAutomationCompositionTopics: -# topicSources: -# - -# topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# fetchTimeout: 15000 -# useHttps: false -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} -# topicSinks: -# - -# topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: false -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} - management: endpoints: web: diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml index 0924d445..bcb3dae5 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/deployment.yaml @@ -80,13 +80,7 @@ spec: secretKeyRef: name: {{ .Chart.Name }}-restserver-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config -{{- end }} + volumeMounts: - mountPath: /config-input name: ac-pf-ppnt-config diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/secrets.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/secrets.yaml index 36cd762b..76d25a77 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/secrets.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/templates/secrets.yaml @@ -51,22 +51,6 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: RELEASE - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: "HuveRotkMosl5!" - ---- - -apiVersion: v1 -kind: Secret -metadata: name: {{ .Chart.Name }}-restserver-secret namespace: default labels: diff --git a/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml b/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml index bb7be33c..af38e9c4 100644 --- a/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml +++ b/helm/policy/components/policy-clamp-ac-pf-ppnt/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. +# Copyright (C) 2023-2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -94,27 +94,3 @@ serviceAccount: roles: - read -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy-acruntime-participant -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 diff --git a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml index dd21c643..0858af3c 100755 --- a/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. +# Copyright (C) 2022,2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,18 +44,6 @@ spring: hibernate: dialect: org.hibernate.dialect.MariaDB103Dialect format_sql: true - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} -{{- if .Values.config.useStrimziKafka }} - bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} security: enable-csrf: false @@ -80,48 +68,24 @@ runtime: topicParameterGroup: topicSources: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false fetchTimeout: 15000 topicSinks: - - topic: POLICY-ACRUNTIME-PARTICIPANT + topic: policy-acruntime-participant servers: - - ${topicServer:message-router} - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false acmParameters: toscaElementName: {{ .Values.customNaming.toscaElementName }} toscaCompositionName: {{ .Values.customNaming.toscaCompositionName }} -# If Strimzi Kafka to be used for communication, replace clampAutomationCompositionTopics configuration with below -# topicParameterGroup: -# topicSources: -# - -# topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: true -# fetchTimeout: 15000 -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} -# topicSinks: -# - -# topic: policy-acruntime-participant -# servers: -# - {{ .Values.config.kafkaBootstrap }}:9092 -# topicCommInfrastructure: kafka -# useHttps: true -# additionalProps: -# security.protocol: SASL_PLAINTEXT -# sasl.mechanism: SCRAM-SHA-512 -# sasl.jaas.config: ${JAASLOGIN} + management: endpoints: diff --git a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml index bafe0196..b1253a42 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml @@ -82,14 +82,6 @@ spec: name: {{ .Chart.Name }}-runtime-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config - -{{- end }} volumeMounts: - mountPath: /config-input name: ac-runtime-config diff --git a/helm/policy/components/policy-clamp-runtime-acm/templates/secret.yaml b/helm/policy/components/policy-clamp-runtime-acm/templates/secret.yaml index f761acd0..494189c3 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/templates/secret.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/templates/secret.yaml @@ -48,17 +48,3 @@ stringData: login: {{ .Values.db.user }} password: {{ .Values.db.password }} ---- - -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: {{ .Values.config.jaas }} diff --git a/helm/policy/components/policy-clamp-runtime-acm/values.yaml b/helm/policy/components/policy-clamp-runtime-acm/values.yaml index 4966a9b6..c4473822 100644 --- a/helm/policy/components/policy-clamp-runtime-acm/values.yaml +++ b/helm/policy/components/policy-clamp-runtime-acm/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. +# Copyright (C) 2022,2024 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,31 +30,6 @@ debugEnabled: false config: policyAppUserName: runtimeUser policyAppUserPassword: zb!XztG34 - jaas: JuzgCumoDahj9* - -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - acRuntimeTopic: policy.policy-acruntime-participant -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. -# additional: -# spring.config.max-size: 200 -# spring.config.min-size: 10 db: user: policy-user diff --git a/helm/policy/components/policy-drools-pdp/resources/configmaps/base.conf b/helm/policy/components/policy-drools-pdp/resources/configmaps/base.conf index 93ae32a4..c004c6fa 100755 --- a/helm/policy/components/policy-drools-pdp/resources/configmaps/base.conf +++ b/helm/policy/components/policy-drools-pdp/resources/configmaps/base.conf @@ -1,5 +1,5 @@ {{/* -# Copyright © 2023 Nordix Foundation. +# Copyright © 2023-2024 Nordix Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,15 +60,15 @@ PROMETHEUS=true # PDP-D DMaaP configuration channel -PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION -PDPD_CONFIGURATION_SERVERS=message-router +PDPD_CONFIGURATION_TOPIC=pdpd-configuration +PDPD_CONFIGURATION_SERVERS={{ .Values.global.kafkaServer }}:9092 PDPD_CONFIGURATION_CONSUMER_GROUP= PDPD_CONFIGURATION_CONSUMER_INSTANCE= PDPD_CONFIGURATION_PARTITION_KEY= # PAP-PDP configuration channel -POLICY_PDP_PAP_TOPIC=POLICY-PDP-PAP +POLICY_PDP_PAP_TOPIC=policy-pdp-pap POLICY_PDP_PAP_GROUP=defaultGroup POLICY_PDP_PAP_POLICYTYPES=onap.policies.controlloop.operational.common.Drools @@ -89,15 +89,10 @@ GUARD_DISABLED=false # DCAE DMaaP -DCAE_TOPIC=unauthenticated.DCAE_CL_OUTPUT -DCAE_SERVERS=message-router +DCAE_TOPIC=unauthenticated.dcae_cl_output +DCAE_SERVERS={{ .Values.global.kafkaServer }}:9092 DCAE_CONSUMER_GROUP=dcae.policy.shared -# Open DMaaP - -DMAAP_SERVERS=message-router -DMAAP_HTTPS="false" - # AAI AAI_HOST=aai.{{.Release.Namespace}} diff --git a/helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-dmaap.conf b/helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-kafka.conf index 09a9c7b4..977f289c 100755 --- a/helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-dmaap.conf +++ b/helm/policy/components/policy-drools-pdp/resources/configmaps/feature-pooling-kafka.conf @@ -1,5 +1,5 @@ {{/* -# Copyright 2023 Nordix Foundation. All rights reserved. +# Copyright 2023-2024 Nordix Foundation. 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. @@ -14,4 +14,4 @@ # limitations under the License. */}} -POOLING_TOPIC=POOLING +POOLING_TOPIC=pooling diff --git a/helm/policy/components/policy-drools-pdp/resources/configmaps/noop.pre.sh b/helm/policy/components/policy-drools-pdp/resources/configmaps/noop.pre.sh index acccc8af..0a74f6fa 100755 --- a/helm/policy/components/policy-drools-pdp/resources/configmaps/noop.pre.sh +++ b/helm/policy/components/policy-drools-pdp/resources/configmaps/noop.pre.sh @@ -1,6 +1,6 @@ #!/bin/bash -x # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. 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. @@ -15,8 +15,5 @@ # limitations under the License. # ============LICENSE_END========================================================= -sed -i "s/^dmaap/noop/g" \ - ${POLICY_HOME}/config/engine.properties \ - ${POLICY_HOME}/config/feature-lifecycle.properties chmod 644 ${POLICY_HOME}/config/engine.properties ${POLICY_HOME}/config/feature-lifecycle.properties diff --git a/helm/policy/components/policy-drools-pdp/resources/secrets/credentials.conf b/helm/policy/components/policy-drools-pdp/resources/secrets/credentials.conf index 0aeaa8b2..721540dc 100755 --- a/helm/policy/components/policy-drools-pdp/resources/secrets/credentials.conf +++ b/helm/policy/components/policy-drools-pdp/resources/secrets/credentials.conf @@ -24,11 +24,11 @@ TELEMETRY_PASSWORD={{.Values.telemetry.password}} REPOSITORY_USERNAME={{.Values.nexus.user}} REPOSITORY_PASSWORD={{.Values.nexus.password}} -PDPD_CONFIGURATION_API_KEY={{.Values.dmaap.brmsgw.key}} -PDPD_CONFIGURATION_API_SECRET={{.Values.dmaap.brmsgw.secret}} +PDPD_CONFIGURATION_API_KEY= +PDPD_CONFIGURATION_API_SECRET= -POLICY_PDP_PAP_API_KEY={{.Values.dmaap.pap.key}} -POLICY_PDP_PAP_API_SECRET={{.Values.dmaap.pap.secret}} +POLICY_PDP_PAP_API_KEY= +POLICY_PDP_PAP_API_SECRET= PAP_USERNAME={{.Values.pap.user}} PAP_PASSWORD={{.Values.pap.password}} diff --git a/helm/policy/components/policy-drools-pdp/templates/statefulset.yaml b/helm/policy/components/policy-drools-pdp/templates/statefulset.yaml index 2774c67f..de14c4b3 100644 --- a/helm/policy/components/policy-drools-pdp/templates/statefulset.yaml +++ b/helm/policy/components/policy-drools-pdp/templates/statefulset.yaml @@ -104,9 +104,9 @@ spec: - mountPath: /tmp/policy-install/config/engine-system.properties name: drools-config subPath: engine-system.properties - - mountPath: /tmp/policy-install/config/feature-pooling-dmaap.conf + - mountPath: /tmp/policy-install/config/feature-pooling-kafka.conf name: drools-config - subPath: feature-pooling-dmaap.conf + subPath: feature-pooling-kafka.conf - mountPath: /tmp/policy-install/config/logback.xml name: drools-config subPath: logback.xml @@ -133,8 +133,8 @@ spec: - key: engine-system.properties path: engine-system.properties mode: 0755 - - key: feature-pooling-dmaap.conf - path: feature-pooling-dmaap.conf + - key: feature-pooling-kafka.conf + path: feature-pooling-kafka.conf mode: 0755 - key: logback.xml path: logback.xml diff --git a/helm/policy/components/policy-drools-pdp/values.yaml b/helm/policy/components/policy-drools-pdp/values.yaml index dd2ce0c8..ca49da5e 100644 --- a/helm/policy/components/policy-drools-pdp/values.yaml +++ b/helm/policy/components/policy-drools-pdp/values.yaml @@ -138,14 +138,6 @@ sdnc: user: admin password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -dmaap: - brmsgw: - key: - password: - pap: - key: - password: - cds: grpc: user: ccsdkapps diff --git a/helm/policy/components/policy-models-simulator/resources/config/simParameters.json b/helm/policy/components/policy-models-simulator/resources/config/simParameters.json index 41fc9057..1f4b274f 100644 --- a/helm/policy/components/policy-models-simulator/resources/config/simParameters.json +++ b/helm/policy/components/policy-models-simulator/resources/config/simParameters.json @@ -1,16 +1,6 @@ { - "dmaapProvider": { - "name": "DMaaP simulator", - "topicSweepSec": 300 - }, "restServers": [ - { - "name": "DMaaP simulator", - "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", - "host": "0.0.0.0", - "port": 3904, - "https": false - }, + { "name": "A&AI simulator", "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", @@ -45,56 +35,7 @@ "https": false } ], - "topicSinks": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-WRITE", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicSources": [ - { - "topic": "APPC-CL", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - }, - { - "topic": "APPC-LCM-READ", - "servers": ["${HOST_NAME}"], - "topicCommInfrastructure": "DMAAP", - "useHttps": false, - "apiKey": "some-key", - "apiSecret": "some-secret" - } - ], - "topicServers": [ - { - "name": "APPC Legacy simulator", - "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer", - "sink": "APPC-CL", - "source": "APPC-CL" - }, - { - "name": "APPC-LCM simulator", - "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer", - "sink": "APPC-LCM-WRITE", - "source": "APPC-LCM-READ" - } - ], + "grpcServer": { "name": "CDS simulator", "providerClass": "org.onap.policy.simulators.CdsSimulator", diff --git a/helm/policy/components/policy-models-simulator/values.yaml b/helm/policy/components/policy-models-simulator/values.yaml index 367a7d8c..e35fe579 100644 --- a/helm/policy/components/policy-models-simulator/values.yaml +++ b/helm/policy/components/policy-models-simulator/values.yaml @@ -45,9 +45,9 @@ readiness: service: type: ClusterIP name: message-router - portName: message-router - externalPort: 3904 - internalPort: 3904 + portName: simulator + externalPort: 6666 + internalPort: 6666 simulators: aai: name: aai-sim diff --git a/helm/policy/components/policy-pap/resources/config/papParameters.yaml b/helm/policy/components/policy-pap/resources/config/papParameters.yaml index 411061bf..83743e68 100644 --- a/helm/policy/components/policy-pap/resources/config/papParameters.yaml +++ b/helm/policy/components/policy-pap/resources/config/papParameters.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. 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. @@ -40,18 +40,6 @@ spring: naming: physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy - kafka: - consumer: - group-id: {{ .Values.config.kafka.consumer.groupId }} -{{- if .Values.config.useStrimziKafka }} - bootstrap-servers: {{ .Values.config.kafkaBootstrap }}:9092 - security.protocol: SASL_PLAINTEXT - properties.sasl: - mechanism: SCRAM-SHA-512 - jaas.config: ${JAASLOGIN} -{{ else }} -{{ toYaml .Values.config.eventConsumption | nindent 2 }} -{{- end }} server: port: 6969 @@ -64,9 +52,9 @@ pap: name: PapGroup aaf: false topic: - pdp-pap.name: POLICY-PDP-PAP - notification.name: POLICY-NOTIFICATION - heartbeat.name: POLICY-HEARTBEAT + pdp-pap.name: policy-pdp-pap + notification.name: policy-notification + heartbeat.name: policy-heartbeat pdpParameters: heartBeatMs: 120000 updateParameters: @@ -80,28 +68,28 @@ pap: topicSources: - topic: ${pap.topic.pdp-pap.name} servers: - - message-router - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false fetchTimeout: 15000 - topic: ${pap.topic.heartbeat.name} effectiveTopic: ${pap.topic.pdp-pap.name} consumerGroup: policy-pap servers: - - message-router - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false fetchTimeout: 15000 topicSinks: - topic: ${pap.topic.pdp-pap.name} servers: - - message-router - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false - topic: ${pap.topic.notification.name} servers: - - message-router - topicCommInfrastructure: dmaap + - {{ .Values.global.kafkaServer }}:9092 + topicCommInfrastructure: kafka useHttps: false healthCheckRestClientParameters: - clientName: api diff --git a/helm/policy/components/policy-pap/templates/deployment.yaml b/helm/policy/components/policy-pap/templates/deployment.yaml index 91158a52..ad7c632b 100755 --- a/helm/policy/components/policy-pap/templates/deployment.yaml +++ b/helm/policy/components/policy-pap/templates/deployment.yaml @@ -104,13 +104,7 @@ spec: secretKeyRef: name: {{ .Chart.Name }}-distribution-secret key: password -{{- if .Values.config.useStrimziKafka }} - - name: JAASLOGIN - valueFrom: - secretKeyRef: - name: {{ .Chart.Name }}-policy-kafka-user - key: sasl.jaas.config -{{- end }} + volumeMounts: - mountPath: /config-input name: papconfig diff --git a/helm/policy/components/policy-pap/templates/secrets.yaml b/helm/policy/components/policy-pap/templates/secrets.yaml index 7958a112..ff96d99a 100755 --- a/helm/policy/components/policy-pap/templates/secrets.yaml +++ b/helm/policy/components/policy-pap/templates/secrets.yaml @@ -68,22 +68,6 @@ stringData: apiVersion: v1 kind: Secret metadata: - name: {{ .Chart.Name }}-policy-kafka-user - namespace: default - labels: - app: {{ .Chart.Name }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: RELEASE - heritage: Helm -type: Opaque -stringData: - sasl.jaas.config: "Zule4]TateGila" - ---- - -apiVersion: v1 -kind: Secret -metadata: name: {{ .Chart.Name }}-restserver-secret namespace: default labels: diff --git a/helm/policy/components/policy-pap/values.yaml b/helm/policy/components/policy-pap/values.yaml index df8f1088..5efc0b02 100755 --- a/helm/policy/components/policy-pap/values.yaml +++ b/helm/policy/components/policy-pap/values.yaml @@ -108,25 +108,3 @@ serviceAccount: roles: - read -# application configuration -config: -# Event consumption (kafka) properties - useStrimziKafka: true - kafkaBootstrap: strimzi-kafka-bootstrap - kafka: - consumer: - groupId: policy-group - app: - listener: - policyPdpPapTopic: policy-pdp-pap -# If targeting a custom kafka cluster, ie useStrimziKakfa: false -# uncomment below config and target your kafka bootstrap servers, -# along with any other security config. -# -# eventConsumption: -# spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092 -# spring.kafka.security.protocol: PLAINTEXT -# spring.kafka.consumer.group-id: policy-group -# -# Any new property can be added in the env by setting in overrides in the format mentioned below -# All the added properties must be in "key: value" format instead of yaml. diff --git a/helm/policy/components/policy-xacml-pdp/resources/config/config.json b/helm/policy/components/policy-xacml-pdp/resources/config/config.json index af0970c2..a5da8904 100755 --- a/helm/policy/components/policy-xacml-pdp/resources/config/config.json +++ b/helm/policy/components/policy-xacml-pdp/resources/config/config.json @@ -44,17 +44,17 @@ }, "topicParameterGroup": { "topicSources" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], + "topic" : "policy-pdp-pap", + "servers" : [ "{{ .Values.global.kafkaServer }}:9092" ], "useHttps" : false, "fetchTimeout" : 15000, - "topicCommInfrastructure" : "dmaap" + "topicCommInfrastructure" : "kafka" }], "topicSinks" : [{ - "topic" : "POLICY-PDP-PAP", - "servers" : [ "message-router" ], + "topic" : "policy-pdp-pap", + "servers" : [ "{{ .Values.global.kafkaServer }}:9092" ], "useHttps" : false, - "topicCommInfrastructure" : "dmaap" + "topicCommInfrastructure" : "kafka" }] } } diff --git a/helm/policy/components/policy-xacml-pdp/values.yaml b/helm/policy/components/policy-xacml-pdp/values.yaml index 5bf9d09f..4766256c 100644 --- a/helm/policy/components/policy-xacml-pdp/values.yaml +++ b/helm/policy/components/policy-xacml-pdp/values.yaml @@ -1,5 +1,5 @@ # ============LICENSE_START======================================================= -# Copyright (C) 2023 Nordix Foundation. All rights reserved. +# Copyright (C) 2023-2024 Nordix Foundation. 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. diff --git a/helm/policy/values.yaml b/helm/policy/values.yaml index f4d72125..c48e71b2 100755 --- a/helm/policy/values.yaml +++ b/helm/policy/values.yaml @@ -1,4 +1,4 @@ -# Copyright © 2022-2023 Nordix Foundation +# Copyright © 2022-2024 Nordix Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,9 +27,7 @@ global: name: &mariadb-galera mariadb-galera internalPort: 3306 prometheusEnabled: false - kafkaBootstrap: strimzi-kafka-bootstrap - policyKafkaUser: policy-kafka-user - + kafkaServer: kafka repository: nexus3.onap.org:10001 pullPolicy: IfNotPresent dockerRepository: docker.io @@ -89,7 +87,7 @@ mariadb: image: mariadb:10.5.8 dbmigrator: - image: onap/policy-db-migrator:3.0.1-SNAPSHOT + image: onap/policy-db-migrator:3.1.1-SNAPSHOT schema: policyadmin policy_home: "/opt/app/policy" |