Add kafka schema registry and modify config for kafka-core

This commit is contained in:
Benedith Mulongo 2024-12-06 11:18:49 +01:00
parent 3604b5b925
commit 3a2a1355fb
Signed by: benedith
GPG key ID: 62D68B584B4B3EB3
21 changed files with 117 additions and 11 deletions

View file

@ -11,4 +11,5 @@ spec:
replicas: 1
config:
# http://kafka.apache.org/documentation/#topicconfigs
# max.message.bytes: x
cleanup.policy: compact

View file

@ -33,6 +33,8 @@ spec:
- broker: 0
nodePort: 32700
config:
# max.request.size: x
# message.max.bytes: ?
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
transaction.state.log.min.isr: 1

View file

@ -0,0 +1,13 @@
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: test-topic-key
namespace: kafka
labels:
strimzi.io/cluster: kafka-cluster
app.kubernetes.io/part-of: kafka
spec:
partitions: 1
replicas: 1
config:
cleanup.policy: compact

View file

@ -2,6 +2,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: test-topic
namespace: kafka
labels:
strimzi.io/cluster: kafka-cluster
app.kubernetes.io/part-of: kafka

View file

@ -0,0 +1,33 @@
apiVersion: kafka.strimzi.io/v1beta1
kind: KafkaUser
metadata:
namespace: kafka
name: kafka-user
labels:
strimzi.io/cluster: kafka-cluster
spec:
authentication:
type: tls
authorization:
type: simple
acls:
- resource:
type: topic
name: "*"
patternType: literal
operation: All
- resource:
type: group
name: "*"
patternType: literal
operation: All
- resource:
type: cluster
name: "*"
patternType: literal
operation: All
- resource:
type: transactionalId
name: "*"
patternType: literal
operation: All

View file

@ -8,3 +8,4 @@ resources:
- kafka-persistent-cluster.yaml
- kafka-das-topic.yaml
- kafka-test-topic.yaml
- kafka-test-topic-key.yaml

View file

@ -2,6 +2,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: registry-schemas
namespace: kafka
labels:
strimzi.io/cluster: kafka-cluster
spec:

View file

@ -1,7 +1,8 @@
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaUser
metadata:
name: confluent-schema-registry
name: schema-registry-user
namespace: kafka
labels:
strimzi.io/cluster: kafka-cluster
spec:

View file

@ -2,8 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kafka
commonLabels:
app.kubernetes.io/name: schema-topic-registry
resources:
- schema-registry-deployment.yaml
- schema-registry-service.yaml
- kafka-registry-topic.yaml
# - kafka-user-registry.yaml
- kafka-user-registry.yaml

View file

@ -5,7 +5,7 @@ metadata:
namespace: kafka
spec:
kafka:
replicas: 2
replicas: 1
config:
offsets.topic.replication.factor: 1
transaction.state.log.replication.factor: 1
@ -28,4 +28,3 @@ spec:
size: 10Gi
deleteClaim: false
class: csi-sc-cinderplugin

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kafka
resources:
- ../../../base/kafka-schema-registry/
patchesStrategicMerge:
- schema-registry-deployment.yaml

View file

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: schema-registry
name: schema-registry
namespace: kafka
spec:
replicas: 1

View file

@ -5,4 +5,5 @@ namespace: kafka
commonLabels:
env: dev
resources:
- kafka-core/
- kafka-core/
- kafka-schema-registry/

View file

@ -22,10 +22,9 @@ spec:
deleteClaim: false
class: csi-sc-cinderplugin
zookeeper:
replicas: 3
replicas: 5
storage:
type: persistent-claim
size: 112Gi
deleteClaim: false
class: csi-sc-cinderplugin

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kafka
resources:
- ../../../base/kafka-schema-registry/
patchesStrategicMerge:
- schema-registry-deployment.yaml

View file

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: schema-registry
name: schema-registry
namespace: kafka
spec:
replicas: 5

View file

@ -5,4 +5,5 @@ namespace: kafka
commonLabels:
env: prod
resources:
- kafka-core/
- kafka-core/
- kafka-schema-registry/

View file

@ -22,10 +22,9 @@ spec:
deleteClaim: false
class: csi-sc-cinderplugin
zookeeper:
replicas: 2
replicas: 3
storage:
type: persistent-claim
size: 20Gi
deleteClaim: false
class: csi-sc-cinderplugin

View file

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kafka
resources:
- ../../../base/kafka-schema-registry/
patchesStrategicMerge:
- schema-registry-deployment.yaml

View file

@ -0,0 +1,9 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: schema-registry
name: schema-registry
namespace: kafka
spec:
replicas: 3

View file

@ -5,4 +5,5 @@ namespace: kafka
commonLabels:
env: test
resources:
- kafka-core/
- kafka-core/
- kafka-schema-registry/