Skip to content

Commit

Permalink
feat(apps/prod/kafka): add cluster and topics
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo committed Aug 6, 2024
1 parent 4935a88 commit eeee81d
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 0 deletions.
70 changes: 70 additions & 0 deletions apps/prod/kafka/clusters/cd/cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaNodePool
metadata:
name: controller-cd
labels:
strimzi.io/cluster: cluster-cd
spec:
replicas: 3
roles:
- controller
storage:
type: jbod
volumes:
- id: 0
type: persistent-claim
class: ceph-block
size: 100Gi
kraftMetadata: shared
deleteClaim: true
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaNodePool
metadata:
name: broker-cd
labels:
strimzi.io/cluster: cluster-cd
spec:
replicas: 3
roles:
- broker
storage:
type: jbod
volumes:
- id: 0
type: persistent-claim
class: ceph-block
size: 100Gi
kraftMetadata: shared
deleteClaim: true
---
apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: cluster-cd
annotations:
strimzi.io/node-pools: enabled
strimzi.io/kraft: enabled
spec:
kafka:
version: 3.7.1
metadataVersion: 3.7-IV4
listeners:
- name: plain
port: 9092
type: internal
tls: false
- name: tls
port: 9093
type: internal
tls: true
config:
offsets.topic.replication.factor: 3
transaction.state.log.replication.factor: 3
transaction.state.log.min.isr: 2
default.replication.factor: 3
min.insync.replicas: 2
auto.create.topics.enable: false
entityOperator:
topicOperator: {}
userOperator: {}
27 changes: 27 additions & 0 deletions apps/prod/kafka/clusters/cd/topics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: cd-building-requests-darwin-amd64
labels:
strimzi.io/cluster: cluster-cd
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: cd-building-requests-darwin-arm64
labels:
strimzi.io/cluster: cluster-cd
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: cd-building-requests-linux-amd64
labels:
strimzi.io/cluster: cluster-cd
---
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: cd-building-requests-linux-arm64
labels:
strimzi.io/cluster: cluster-cd
6 changes: 6 additions & 0 deletions apps/prod/kafka/clusters/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kafka-operator
resources:
- cd/cluster.yaml
- cd/topics.yaml
1 change: 1 addition & 0 deletions apps/prod/kafka/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ kind: Kustomization
resources:
- namespace.yaml
- operator-release.yaml
- clusters

0 comments on commit eeee81d

Please sign in to comment.