aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/components/policy-pap
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-03-11 17:18:11 +0000
committerAndreas Geissler <andreas-geissler@telekom.de>2024-04-08 12:40:16 +0000
commitbc8a6a4ce7eb26b1720cd281486ce6a67ee40ac4 (patch)
tree733baeadb987f1fa25c4588ec734760aeff7bfb8 /kubernetes/policy/components/policy-pap
parent5230ed9ba9769c93487ad66d0d1f68eec5134a90 (diff)
[POLICY] Add kafka support in policy charts
Added kafka support in all policy charts. Dmaap option is removed Issue-ID: POLICY-4941 Change-Id: I015d303c11c04a64d815fe2f054919eca2252250 Signed-off-by: rameshiyer27 <ramesh.murugan.iyer@est.tech>
Diffstat (limited to 'kubernetes/policy/components/policy-pap')
-rw-r--r--kubernetes/policy/components/policy-pap/resources/config/papParameters.yaml44
-rwxr-xr-xkubernetes/policy/components/policy-pap/templates/deployment.yaml5
-rw-r--r--kubernetes/policy/components/policy-pap/templates/kafkauser.yaml2
-rwxr-xr-xkubernetes/policy/components/policy-pap/values.yaml13
4 files changed, 6 insertions, 58 deletions
diff --git a/kubernetes/policy/components/policy-pap/resources/config/papParameters.yaml b/kubernetes/policy/components/policy-pap/resources/config/papParameters.yaml
index 5496d93174..614116ae23 100644
--- a/kubernetes/policy/components/policy-pap/resources/config/papParameters.yaml
+++ b/kubernetes/policy/components/policy-pap/resources/config/papParameters.yaml
@@ -75,15 +75,9 @@ pap:
name: PapGroup
aaf: false
topic:
- {{ if .Values.global.useStrimziKafkaPf }}
pdp-pap.name: {{ .Values.config.kafka.topics.policyPdpPap }}
notification.name: {{ .Values.config.kafka.topics.policyNotification }}
heartbeat.name: {{ .Values.config.kafka.topics.policyHeartbeat }}
- {{ else }}
- pdp-pap.name: {{ .Values.dmaap.topics.policyPdpPap }}
- notification.name: {{ .Values.dmaap.topics.policyNotification }}
- heartbeat.name: {{ .Values.dmaap.topics.policyHeartbeat }}
- {{ end }}
pdpParameters:
heartBeatMs: 120000
updateParameters:
@@ -97,77 +91,49 @@ pap:
topicSources:
- useHttps: false
fetchTimeout: 15000
- {{ if .Values.global.useStrimziKafkaPf }}
topic: {{ .Values.config.kafka.topics.policyPdpPap }}
servers:
- - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
+ - {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
topicCommInfrastructure: kafka
additionalProps:
group.id : {{ .Values.config.kafka.consumer.groupId }}
security.protocol: SASL_PLAINTEXT
sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
sasl.jaas.config: ${JAASLOGIN}
- {{ else }}
- topic: {{ .Values.dmaap.topics.policyPdpPap }}
- servers:
- - ${topicServer:message-router}
- topicCommInfrastructure: dmaap
- {{ end }}
- useHttps: false
fetchTimeout: 15000
- {{ if .Values.global.useStrimziKafkaPf }}
topic: {{ .Values.config.kafka.topics.policyHeartbeat }}
effectiveTopic: {{ .Values.config.kafka.topics.policyPdpPap }}
servers:
- - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
+ - {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
topicCommInfrastructure: kafka
additionalProps:
group.id : {{ .Values.config.kafka.consumer.groupId }}
security.protocol: SASL_PLAINTEXT
sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
sasl.jaas.config: ${JAASLOGIN}
- {{ else }}
- topic: {{ .Values.dmaap.topics.policyHeartbeat }}
- effectiveTopic: {{ .Values.dmaap.topics.policyPdpPap }}
- servers:
- - ${topicServer:message-router}
- topicCommInfrastructure: dmaap
- {{ end }}
topicSinks:
- useHttps: false
- {{ if .Values.global.useStrimziKafkaPf }}
topic: {{ .Values.config.kafka.topics.policyPdpPap }}
servers:
- - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
+ - {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
topicCommInfrastructure: kafka
additionalProps:
group.id : {{ .Values.config.kafka.consumer.groupId }}
security.protocol: SASL_PLAINTEXT
sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
sasl.jaas.config: ${JAASLOGIN}
- {{ else }}
- topic: {{ .Values.dmaap.topics.policyPdpPap }}
- servers:
- - ${topicServer:message-router}
- topicCommInfrastructure: dmaap
- {{ end }}
- useHttps: false
- {{ if .Values.global.useStrimziKafkaPf }}
topic: {{ .Values.config.kafka.topics.policyNotification }}
servers:
- - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
+ - {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
topicCommInfrastructure: kafka
additionalProps:
group.id : {{ .Values.config.kafka.consumer.groupId }}
security.protocol: SASL_PLAINTEXT
sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
sasl.jaas.config: ${JAASLOGIN}
- {{ else }}
- topic: {{ .Values.dmaap.topics.policyNotification }}
- servers:
- - ${topicServer:message-router}
- topicCommInfrastructure: dmaap
- {{ end }}
+
# If Strimzi Kafka to be used for communication, replace following configuration for topicSources and topicSinks
# servers:
# - {{ include "common.release" . }}-{{ .Values.config.kafkaBootstrap }}:9092
diff --git a/kubernetes/policy/components/policy-pap/templates/deployment.yaml b/kubernetes/policy/components/policy-pap/templates/deployment.yaml
index 67a2270fb8..cfcbf6384a 100755
--- a/kubernetes/policy/components/policy-pap/templates/deployment.yaml
+++ b/kubernetes/policy/components/policy-pap/templates/deployment.yaml
@@ -29,9 +29,6 @@ spec:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
initContainers:
-{{- if not .Values.global.useStrimziKafkaPf }}
-{{ include "common.readinessCheck.waitFor" . | nindent 6 }}
-{{- end }}
- command:
- /app/ready.py
args:
@@ -78,13 +75,11 @@ spec:
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "distribution-secret" "key" "login") | indent 10 }}
- name: DISTRIBUTION_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "distribution-secret" "key" "password") | indent 10 }}
-{{- if .Values.global.useStrimziKafkaPf }}
- name: JAASLOGIN
valueFrom:
secretKeyRef:
name: {{ include "common.name" . }}-ku
key: sasl.jaas.config
-{{- end }}
volumeMounts:
- mountPath: /config-input
name: papconfig
diff --git a/kubernetes/policy/components/policy-pap/templates/kafkauser.yaml b/kubernetes/policy/components/policy-pap/templates/kafkauser.yaml
index d2fab9f535..6fc37c3d01 100644
--- a/kubernetes/policy/components/policy-pap/templates/kafkauser.yaml
+++ b/kubernetes/policy/components/policy-pap/templates/kafkauser.yaml
@@ -13,6 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-{{ if .Values.global.useStrimziKafkaPf }}
{{ include "common.kafkauser" . }}
-{{ end }}
diff --git a/kubernetes/policy/components/policy-pap/values.yaml b/kubernetes/policy/components/policy-pap/values.yaml
index 365028c229..484ff64a6c 100755
--- a/kubernetes/policy/components/policy-pap/values.yaml
+++ b/kubernetes/policy/components/policy-pap/values.yaml
@@ -25,7 +25,6 @@
global:
nodePortPrefixExt: 304
persistence: {}
- useStrimziKafkaPf: set-via-parent-chart-global-value
postgres:
localCluster: false
@@ -139,7 +138,7 @@ ingress:
serviceMesh:
authorizationPolicy:
authorizedPrincipals:
- - serviceAccount: message-router-read
+ - serviceAccount: strimzi-kafka-read
- serviceAccount: portal-app-read
flavor: small
@@ -185,8 +184,6 @@ metrics:
# application configuration
config:
# Event consumption (kafka) properties
- useStrimziKafkaPf: true
- kafkaBootstrap: strimzi-kafka-bootstrap
kafka:
topics:
policyHeartbeat: policy-heartbeat
@@ -198,11 +195,6 @@ config:
listener:
policyPdpPapTopic: policy-pdp-pap
-dmaap:
- topics:
- policyHeartbeat: POLICY-HEARTBEAT
- policyNotification: POLICY-NOTIFICATION
- policyPdpPap: 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.
@@ -233,6 +225,3 @@ kafkaUser:
patternType: prefix
operations: [Create, Describe, Read, Write]
-readinessCheck:
- wait_for:
- - message-router