Add kafka schema registry and modify config for kafka-core
This commit is contained in:
parent
3604b5b925
commit
3a2a1355fb
21 changed files with 117 additions and 11 deletions
|
@ -11,4 +11,5 @@ spec:
|
|||
replicas: 1
|
||||
config:
|
||||
# http://kafka.apache.org/documentation/#topicconfigs
|
||||
# max.message.bytes: x
|
||||
cleanup.policy: compact
|
||||
|
|
|
@ -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
|
||||
|
|
13
kafka-resources/base/kafka-core/kafka-test-topic-key.yaml
Normal file
13
kafka-resources/base/kafka-core/kafka-test-topic-key.yaml
Normal 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
|
|
@ -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
|
||||
|
|
33
kafka-resources/base/kafka-core/kafka-user.yaml
Normal file
33
kafka-resources/base/kafka-core/kafka-user.yaml
Normal 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
|
|
@ -8,3 +8,4 @@ resources:
|
|||
- kafka-persistent-cluster.yaml
|
||||
- kafka-das-topic.yaml
|
||||
- kafka-test-topic.yaml
|
||||
- kafka-test-topic-key.yaml
|
||||
|
|
|
@ -2,6 +2,7 @@ apiVersion: kafka.strimzi.io/v1beta2
|
|||
kind: KafkaTopic
|
||||
metadata:
|
||||
name: registry-schemas
|
||||
namespace: kafka
|
||||
labels:
|
||||
strimzi.io/cluster: kafka-cluster
|
||||
spec:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: kafka
|
||||
resources:
|
||||
- ../../../base/kafka-schema-registry/
|
||||
patchesStrategicMerge:
|
||||
- schema-registry-deployment.yaml
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: schema-registry
|
||||
name: schema-registry
|
||||
namespace: kafka
|
||||
spec:
|
||||
replicas: 1
|
|
@ -5,4 +5,5 @@ namespace: kafka
|
|||
commonLabels:
|
||||
env: dev
|
||||
resources:
|
||||
- kafka-core/
|
||||
- kafka-core/
|
||||
- kafka-schema-registry/
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: kafka
|
||||
resources:
|
||||
- ../../../base/kafka-schema-registry/
|
||||
patchesStrategicMerge:
|
||||
- schema-registry-deployment.yaml
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: schema-registry
|
||||
name: schema-registry
|
||||
namespace: kafka
|
||||
spec:
|
||||
replicas: 5
|
|
@ -5,4 +5,5 @@ namespace: kafka
|
|||
commonLabels:
|
||||
env: prod
|
||||
resources:
|
||||
- kafka-core/
|
||||
- kafka-core/
|
||||
- kafka-schema-registry/
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: kafka
|
||||
resources:
|
||||
- ../../../base/kafka-schema-registry/
|
||||
patchesStrategicMerge:
|
||||
- schema-registry-deployment.yaml
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: schema-registry
|
||||
name: schema-registry
|
||||
namespace: kafka
|
||||
spec:
|
||||
replicas: 3
|
|
@ -5,4 +5,5 @@ namespace: kafka
|
|||
commonLabels:
|
||||
env: test
|
||||
resources:
|
||||
- kafka-core/
|
||||
- kafka-core/
|
||||
- kafka-schema-registry/
|
||||
|
|
Loading…
Add table
Reference in a new issue