Declare the classic-models topics and a credentials store
Topics are declared rather than auto-created: the application account has no Create ACL, so a producer would have been denied, and an auto-created topic takes broker defaults nobody chose. The credentials store lets an application namespace read its own KafkaUser password and the cluster CA from the kafka namespace, so the password stays generated and rotatable by Strimzi instead of being copied by hand. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
---
|
||||
# Topics are declared, never auto-created.
|
||||
#
|
||||
# Two reasons. An application account has no Create ACL — a producer that can
|
||||
# invent topics can also invent a typo and publish into it for weeks with nobody
|
||||
# noticing. And auto-created topics take the broker defaults, which is how a
|
||||
# topic that should be compacted and retained for a year ends up deleted after
|
||||
# seven days.
|
||||
#
|
||||
# One topic per aggregate. Partition count is the ceiling on consumer
|
||||
# parallelism and cannot be lowered later, so it is set for the traffic
|
||||
# expected, not for the traffic today.
|
||||
apiVersion: kafka.strimzi.io/v1
|
||||
kind: KafkaTopic
|
||||
metadata:
|
||||
name: classic-models.catalog
|
||||
namespace: kafka
|
||||
labels:
|
||||
strimzi.io/cluster: kafka
|
||||
spec:
|
||||
partitions: 3
|
||||
replicas: 1
|
||||
config:
|
||||
retention.ms: "604800000" # 7 days
|
||||
cleanup.policy: delete
|
||||
min.insync.replicas: "1"
|
||||
---
|
||||
apiVersion: kafka.strimzi.io/v1
|
||||
kind: KafkaTopic
|
||||
metadata:
|
||||
name: classic-models.sales
|
||||
namespace: kafka
|
||||
labels:
|
||||
strimzi.io/cluster: kafka
|
||||
spec:
|
||||
partitions: 3
|
||||
replicas: 1
|
||||
config:
|
||||
retention.ms: "604800000"
|
||||
cleanup.policy: delete
|
||||
min.insync.replicas: "1"
|
||||
---
|
||||
apiVersion: kafka.strimzi.io/v1
|
||||
kind: KafkaTopic
|
||||
metadata:
|
||||
name: classic-models.payments
|
||||
namespace: kafka
|
||||
labels:
|
||||
strimzi.io/cluster: kafka
|
||||
spec:
|
||||
partitions: 3
|
||||
replicas: 1
|
||||
config:
|
||||
retention.ms: "604800000"
|
||||
cleanup.policy: delete
|
||||
min.insync.replicas: "1"
|
||||
Reference in New Issue
Block a user