[CPS] Unify way of KafkaTopic creation for CPS application 86/135986/7
authorMichal Jagiello <michal.jagiello@t-mobile.pl>
Wed, 20 Sep 2023 05:21:12 +0000 (07:21 +0200)
committerMicha? Jagie??o <michal.jagiello@t-mobile.pl>
Tue, 26 Sep 2023 07:05:38 +0000 (07:05 +0000)
Do not use static templates but "common.kafkatopic" template

Issue-ID: OOM-3240
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I67b2cfe839022795f8d7f6f42d2d8dc7e71653d6

kubernetes/cps/Chart.yaml
kubernetes/cps/components/cps-core/Chart.yaml
kubernetes/cps/components/cps-core/templates/kafkatopic.yaml [new file with mode: 0644]
kubernetes/cps/components/cps-core/values.yaml
kubernetes/cps/components/cps-temporal/Chart.yaml
kubernetes/cps/components/cps-temporal/values.yaml
kubernetes/cps/components/ncmp-dmi-plugin/Chart.yaml
kubernetes/cps/components/ncmp-dmi-plugin/templates/kafkatopic.yaml [new file with mode: 0644]
kubernetes/cps/templates/cps-kafka-topic.yaml [deleted file]
kubernetes/cps/templates/cps-kafka-user.yaml [deleted file]

index 7b443c9..06fdcf0 100644 (file)
@@ -17,7 +17,7 @@
 apiVersion: v2
 description: ONAP Configuration Persistance Service (CPS)
 name: cps
-version: 13.0.0
+version: 13.0.1
 
 dependencies:
   - name: common
index 14e778d..b1aa104 100644 (file)
@@ -18,7 +18,7 @@
 apiVersion: v2
 description: ONAP Configuration Persistance Service (CPS) - Core
 name: cps-core
-version: 13.0.0
+version: 13.0.1
 
 dependencies:
   - name: common
diff --git a/kubernetes/cps/components/cps-core/templates/kafkatopic.yaml b/kubernetes/cps/components/cps-core/templates/kafkatopic.yaml
new file mode 100644 (file)
index 0000000..7274ee0
--- /dev/null
@@ -0,0 +1,16 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom AG
+#
+# 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.
+*/}}
+{{ include "common.kafkatopic" . }}
\ No newline at end of file
index b44f456..1577514 100644 (file)
@@ -197,12 +197,6 @@ kafkaTopic:
   - name: &dmiCmEventsTopic dmi-cm-events
     retentionMs: 7200000
     segmentBytes: 1073741824
-  - name: &ncmpAsyncM2MTopic ncmp-async-m2m
-    retentionMs: 7200000
-    segmentBytes: 1073741824
-  - name: &cmAvcSubscriptionTopic cm-avc-subscription
-    retentionMs: 7200000
-    segmentBytes: 1073741824
 
 kafkaUser:
   authenticationType: scram-sha-512
@@ -216,10 +210,10 @@ kafkaUser:
     - name: *dmiCmEventsTopic
       type: topic
       operations: [Read]
-    - name: *ncmpAsyncM2MTopic
+    - name: &ncmpAsyncM2MTopic ncmp-async-m2m
       type: topic
       operations: [Read]
-    - name: *cmAvcSubscriptionTopic
+    - name: &cmAvcSubscriptionTopic cm-avc-subscription
       type: topic
       operations: [Read]
 
index 10ae94f..4f3f317 100644 (file)
@@ -21,7 +21,7 @@
 apiVersion: v2
 description: ONAP Configuration Persistance Service (CPS) - Temporal
 name: cps-temporal
-version: 13.0.0
+version: 13.0.1
 
 dependencies:
   - name: common
index afbf851..b6b072c 100644 (file)
@@ -160,12 +160,6 @@ kafkaUser:
       type: topic
       operations: [Read]
 
-kafkaTopic:
-  - name: *dataUpdatedTopic
-    # default values below can be overridden
-    retentionMs: 7200000
-    segmentBytes: 1073741824
-
 logging:
   level: INFO
   path: /tmp
index bef04ad..fb57859 100644 (file)
@@ -21,7 +21,7 @@
 apiVersion: v2
 description: ONAP Configuration Persistance Service (CPS) - NCMP-DMI-Plugin
 name: ncmp-dmi-plugin
-version: 13.0.0
+version: 13.0.1
 
 dependencies:
   - name: common
diff --git a/kubernetes/cps/components/ncmp-dmi-plugin/templates/kafkatopic.yaml b/kubernetes/cps/components/ncmp-dmi-plugin/templates/kafkatopic.yaml
new file mode 100644 (file)
index 0000000..7274ee0
--- /dev/null
@@ -0,0 +1,16 @@
+{{/*
+# Copyright © 2023 Deutsche Telekom AG
+#
+# 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.
+*/}}
+{{ include "common.kafkatopic" . }}
\ No newline at end of file
diff --git a/kubernetes/cps/templates/cps-kafka-topic.yaml b/kubernetes/cps/templates/cps-kafka-topic.yaml
deleted file mode 100644 (file)
index 8807647..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-{{/*
-# Copyright © 2022-2023 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.
-*/}}
-{{- if .Values.config.useStrimziKafka }}
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.ncmpEventsTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.ncmpEventsTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.ncmpAsyncM2MTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.ncmpAsyncM2MTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.dmiCmEventsTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.dmiCmEventsTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.ncmpCmAvcSubscriptionTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.ncmpCmAvcSubscriptionTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.ncmpCmEventsTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.ncmpCmEventsTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.dmiCmAvcSubscriptionTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.dmiCmAvcSubscriptionTopic.retentionMs }}
----
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaTopic
-metadata:
-  name: {{ .Values.config.dmiCmAvcSubscriptionResponseTopic.name }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  config:
-    retention.ms: {{ .Values.config.dmiCmAvcSubscriptionResponseTopic.retentionMs }}
-{{- end }}
\ No newline at end of file
diff --git a/kubernetes/cps/templates/cps-kafka-user.yaml b/kubernetes/cps/templates/cps-kafka-user.yaml
deleted file mode 100644 (file)
index 154c116..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-{{/*
-# Copyright © 2022-2023 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.
-*/}}
-{{- if .Values.config.useStrimziKafka }}
-apiVersion: kafka.strimzi.io/v1beta2
-kind: KafkaUser
-metadata:
-  name: {{ include "common.release" . }}-{{ .Values.global.cpsKafkaUser }}
-  labels:
-    strimzi.io/cluster: {{ include "common.release" . }}-strimzi
-spec:
-  authentication:
-    type: scram-sha-512
-  authorization:
-    type: simple
-    acls:
-    - resource:
-        type: group
-        name: {{ .Values.config.ncmpEventsTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.ncmpEventsTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.ncmpAsyncM2MTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.ncmpAsyncM2MTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.dmiCmEventsTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.dmiCmEventsTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.ncmpCmAvcSubscriptionTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.ncmpCmAvcSubscriptionTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.ncmpCmEventsTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.ncmpCmEventsTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.dmiCmAvcSubscriptionTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.dmiCmAvcSubscriptionTopic.name }}
-      operation: All
-    - resource:
-        type: group
-        name: {{ .Values.config.dmiCmAvcSubscriptionResponseTopic.consumer.groupId }}
-      operation: All
-    - resource:
-        type: topic
-        name: {{ .Values.config.dmiCmAvcSubscriptionResponseTopic.name }}
-      operation: All
-{{- end }}
\ No newline at end of file