aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/components/policy-apex-pdp
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-apex-pdp
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-apex-pdp')
-rwxr-xr-xkubernetes/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json11
-rwxr-xr-xkubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml18
-rw-r--r--kubernetes/policy/components/policy-apex-pdp/templates/kafkauser.yaml3
-rwxr-xr-xkubernetes/policy/components/policy-apex-pdp/values.yaml21
4 files changed, 5 insertions, 48 deletions
diff --git a/kubernetes/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json b/kubernetes/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json
index 3a38b88d56..441955f1ed 100755
--- a/kubernetes/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json
+++ b/kubernetes/policy/components/policy-apex-pdp/resources/config/OnapPfConfig.json
@@ -30,23 +30,17 @@
"useHttps": false,
"fetchTimeout": 15000,
"servers": [ "${KAFKA_URL}" ],
-{{ if .Values.global.useStrimziKafkaPf }}
"topicCommInfrastructure": "kafka",
"additionalProps": {
"group.id" : "${GROUP_ID}",
"security.protocol": "SASL_PLAINTEXT",
"sasl.mechanism": "${SASL}",
"sasl.jaas.config": "${JAASLOGIN}"
- }
-{{ else }}
- "topicCommInfrastructure": "dmaap"
-{{ end }}
- }],
+ }}],
"topicSinks" : [{
"topic": "${PAP_TOPIC}",
"useHttps": false,
"servers": [ "${KAFKA_URL}" ],
-{{ if .Values.global.useStrimziKafkaPf }}
"topicCommInfrastructure": "kafka",
"additionalProps": {
"group.id" : "${GROUP_ID}",
@@ -54,9 +48,6 @@
"sasl.mechanism": "${SASL}",
"sasl.jaas.config": "${JAASLOGIN}"
}
-{{ else }}
- "topicCommInfrastructure": "dmaap"
-{{ end }}
}]
}
}
diff --git a/kubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml b/kubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml
index daed724cbd..5ba0d823f4 100755
--- a/kubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml
+++ b/kubernetes/policy/components/policy-apex-pdp/templates/deployment.yaml
@@ -31,45 +31,29 @@ spec:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
initContainers:
-{{- if not .Values.global.useStrimziKafkaPf }}
-{{ include "common.readinessCheck.waitFor" . | nindent 6 }}
-{{- end }}
- command: ["/bin/sh", "-cx"]
-{{- if .Values.global.useStrimziKafkaPf }}
args:
- JAASLOGIN=`echo $JAASLOGIN | tr -d '"'`;
cd /config-input && for PFILE in `ls -1`;
do envsubst <${PFILE} >/config/${PFILE}; done
-{{ else }}
- args:
- - cd /config-input && for PFILE in `ls -1`;
- do envsubst <${PFILE} >/config/${PFILE}; done
-{{ end }}
env:
- name: RESTSERVER_USER
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "login") | indent 10 }}
- name: RESTSERVER_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-creds" "key" "password") | indent 10 }}
-{{- if .Values.global.useStrimziKafkaPf }}
- name: JAASLOGIN
valueFrom:
secretKeyRef:
name: {{ include "common.name" . }}-ku
key: sasl.jaas.config
- name: KAFKA_URL
- value: {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
+ value: {{ include "common.release" . }}-{{ .Values.global.kafkaBootstrap }}
- name: SASL
value: {{ .Values.kafkaUser.authenticationType | upper }}
- name: GROUP_ID
value: {{ .Values.config.kafka.consumer.groupId }}
- name: PAP_TOPIC
value: {{ .Values.config.app.listener.policyPdpPapTopic }}
-{{ else }}
- - name: KAFKA_URL
- value: message-router
- - name: PAP_TOPIC
- value: {{ .Values.config.app.listener.policyPdpPapTopic | upper }}
-{{- end }}
volumeMounts:
- mountPath: /config-input
name: apexconfig-input
diff --git a/kubernetes/policy/components/policy-apex-pdp/templates/kafkauser.yaml b/kubernetes/policy/components/policy-apex-pdp/templates/kafkauser.yaml
index d2fab9f535..4259381afe 100644
--- a/kubernetes/policy/components/policy-apex-pdp/templates/kafkauser.yaml
+++ b/kubernetes/policy/components/policy-apex-pdp/templates/kafkauser.yaml
@@ -13,6 +13,5 @@
# 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-apex-pdp/values.yaml b/kubernetes/policy/components/policy-apex-pdp/values.yaml
index e01cb61176..3cea773d0f 100755
--- a/kubernetes/policy/components/policy-apex-pdp/values.yaml
+++ b/kubernetes/policy/components/policy-apex-pdp/values.yaml
@@ -25,7 +25,6 @@
global:
nodePortPrefix: 302
persistence: {}
- useStrimziKafkaPf: set-via-parent-chart-global-value
#################################################################
# Secrets metaconfig
@@ -93,7 +92,7 @@ ingress:
serviceMesh:
authorizationPolicy:
authorizedPrincipals:
- - serviceAccount: message-router-read
+ - serviceAccount: strimzi-kafka-read
# Resource Limit flavor -By Default using small
# Segregation for Different environment (Small and Large)
@@ -145,25 +144,13 @@ metrics:
# application configuration
config:
# Event consumption (kafka) properties
- useStrimziKafkaPf: true
- kafkaBootstrap: strimzi-kafka-bootstrap
kafka:
consumer:
groupId: policy-apex
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.
+
kafkaUser:
authenticationType: scram-sha-512
acls:
@@ -178,7 +165,3 @@ kafkaUser:
type: topic
patternType: prefix
operations: [Create, Describe, Read, Write]
-
-readinessCheck:
- wait_for:
- - message-router