[CPS] Add topics and parameters

Add few topic for cps-and-ncmp and ncmp-dmi-plugin.
Followed the approach to globally provide the topics and user access
ALL for all the topics at the moment.

Issue-ID: CPS-1534
Change-Id: Ic184df5ab74d269fe9aeeadac3d89da16a3f84f1
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
diff --git a/kubernetes/cps/components/ncmp-dmi-plugin/resources/config/application-helm.yml b/kubernetes/cps/components/ncmp-dmi-plugin/resources/config/application-helm.yml
index 2a31c73..1c15a2d 100644
--- a/kubernetes/cps/components/ncmp-dmi-plugin/resources/config/application-helm.yml
+++ b/kubernetes/cps/components/ncmp-dmi-plugin/resources/config/application-helm.yml
@@ -54,7 +54,6 @@
 spring.kafka.properties.sasl.mechanism: SCRAM-SHA-512
 spring.kafka.properties.sasl.jaas.config: ${SASL_JAAS_CONFIG}
 
-
 {{- if .Values.config.additional }}
 {{ toYaml .Values.config.additional | nindent 2 }}
 {{- end }}
diff --git a/kubernetes/cps/templates/cps-kafka-topic.yaml b/kubernetes/cps/templates/cps-kafka-topic.yaml
index c3592bc..8807647 100644
--- a/kubernetes/cps/templates/cps-kafka-topic.yaml
+++ b/kubernetes/cps/templates/cps-kafka-topic.yaml
@@ -43,4 +43,44 @@
 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
index 469ddda..154c116 100644
--- a/kubernetes/cps/templates/cps-kafka-user.yaml
+++ b/kubernetes/cps/templates/cps-kafka-user.yaml
@@ -50,4 +50,36 @@
         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
diff --git a/kubernetes/cps/values.yaml b/kubernetes/cps/values.yaml
index dccc4d0..a08690e 100755
--- a/kubernetes/cps/values.yaml
+++ b/kubernetes/cps/values.yaml
@@ -63,6 +63,26 @@
     retentionMs: 7200000
     consumer:
       groupId: ncmp-group
+  ncmpCmAvcSubscriptionTopic:
+    name: cm-avc-subscription
+    retentionMs: 7200000
+    consumer:
+      groupId: ncmp-group
+  ncmpCmEventsTopic:
+    name: cm-events
+    retentionMs: 7200000
+    consumer:
+      groupId: ncmp-group
+  dmiCmAvcSubscriptionTopic:
+    name: ncmp-dmi-cm-avc-subscription-ncmp-dmi-plugin
+    retentionMs: 7200000
+    consumer:
+      groupId: ncmp-group
+  dmiCmAvcSubscriptionResponseTopic:
+    name: dmi-ncmp-cm-avc-subscription
+    retentionMs: 7200000
+    consumer:
+      groupId: ncmp-group
 
 # Enable all CPS components by default
 cps-core: