[DMAAP-STRIMZI] Move strimzi kafka bridge
Move kafka bridge to strimzi chart.
Update the onap overrides.
Clean up some config in strimzi kafka.
Add override options to kafka chart.
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: Iaaac143f22cae1dbfa50e89b1838a00e37eebdaf
Issue-ID: DMAAP-1834
diff --git a/kubernetes/strimzi/templates/pv-kafka.yaml b/kubernetes/strimzi/templates/pv-kafka.yaml
index 616f03e..efd4902 100644
--- a/kubernetes/strimzi/templates/pv-kafka.yaml
+++ b/kubernetes/strimzi/templates/pv-kafka.yaml
@@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-{{ include "common.replicaPV" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistenceKafka) }}
+{{ include "common.replicaPV" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistence.kafka) }}
diff --git a/kubernetes/strimzi/templates/pv-zk.yaml b/kubernetes/strimzi/templates/pv-zk.yaml
index 60f4ca6..2c5a8e3 100644
--- a/kubernetes/strimzi/templates/pv-zk.yaml
+++ b/kubernetes/strimzi/templates/pv-zk.yaml
@@ -13,5 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*/}}
-
-{{ include "common.replicaPV" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistenceZk) }}
+{{ include "common.replicaPV" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistence.zookeeper) }}
diff --git a/kubernetes/strimzi/templates/strimzi-kafka-admin-user.yaml b/kubernetes/strimzi/templates/strimzi-kafka-admin-user.yaml
index 2653c67..c1bf4b8 100644
--- a/kubernetes/strimzi/templates/strimzi-kafka-admin-user.yaml
+++ b/kubernetes/strimzi/templates/strimzi-kafka-admin-user.yaml
@@ -16,14 +16,14 @@
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaUser
metadata:
- name: {{ .Values.kafkaStrimziAdminUser }}
+ name: {{ .Values.config.strimziKafkaAdminUser }}
labels:
strimzi.io/cluster: {{ include "common.release" . }}-strimzi
spec:
authentication:
- type: {{ .Values.saslMechanism }}
+ type: {{ .Values.config.saslMechanism }}
authorization:
- type: simple
+ type: {{ .Values.config.authType }}
acls:
- resource:
type: group
diff --git a/kubernetes/strimzi/templates/strimzi-kafka.yaml b/kubernetes/strimzi/templates/strimzi-kafka.yaml
index 03ee56a..b35485f 100644
--- a/kubernetes/strimzi/templates/strimzi-kafka.yaml
+++ b/kubernetes/strimzi/templates/strimzi-kafka.yaml
@@ -15,25 +15,18 @@
*/}}
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
kafka:
- version: {{ .Values.version }}
+ version: {{ .Values.config.kafkaVersion }}
replicas: {{ .Values.replicaCount }}
listeners:
- name: plain
- port: {{ .Values.kafkaInternalPort }}
+ port: {{ .Values.config.kafkaInternalPort }}
type: internal
tls: false
authentication:
- type: {{ .Values.saslMechanism }}
+ type: {{ .Values.config.saslMechanism }}
- name: tls
port: 9093
type: internal
@@ -57,9 +50,9 @@
- broker: 2
nodePort: {{ .Values.global.nodePortPrefixExt }}92
authorization:
- type: simple
+ type: {{ .Values.config.authType }}
superUsers:
- - {{ .Values.kafkaStrimziAdminUser }}
+ - {{ .Values.config.strimziKafkaAdminUser }}
template:
pod:
securityContext:
@@ -67,21 +60,21 @@
fsGroup: 0
config:
default.replication.factor: {{ .Values.replicaCount }}
- min.insync.replicas: {{ .Values.replicaCount }}
+ min.insync.replicas: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
offsets.topic.replication.factor: {{ .Values.replicaCount }}
+ num.partitions: {{ mul .Values.replicaCount 2 }}
transaction.state.log.replication.factor: {{ .Values.replicaCount }}
- num.partitions: {{ .Values.numPartitions }}
- transaction.state.log.min.isr: {{ .Values.replicaCount }}
- log.message.format.version: {{ .Values.version }}
- inter.broker.protocol.version: {{ .Values.version }}
+ transaction.state.log.min.isr: {{ (eq 1.0 (.Values.replicaCount)) | ternary 1 (sub .Values.replicaCount 1) }}
+ log.message.format.version: {{ .Values.config.kafkaVersion }}
+ inter.broker.protocol.version: {{ .Values.config.kafkaVersion }}
storage:
type: jbod
volumes:
- id: 0
type: persistent-claim
- size: {{ .Values.persistenceKafka.size }}
+ size: {{ .Values.persistence.kafka.size }}
deleteClaim: true
- class: {{ include "common.storageClass" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistenceKafka) }}
+ class: {{ include "common.storageClass" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistence.kafka) }}
zookeeper:
template:
pod:
@@ -97,9 +90,9 @@
{{- end }}
storage:
type: persistent-claim
- size: {{ .Values.persistenceZk.size }}
+ size: {{ .Values.persistence.zookeeper.size }}
deleteClaim: true
- class: {{ include "common.storageClass" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistenceZk) }}
+ class: {{ include "common.storageClass" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistence.zookeeper) }}
entityOperator:
topicOperator: {}
userOperator: {}