Skip to content

Commit ecce270

Browse files
maltesanderrazvan
andauthored
Support KRaft for consensus building (#889)
* extract common properties to role config * rename KafkaConfig to BrokerConfig * rename Container to BrokerContainer * make zookeeper config map ref optional * remove zookeeper.connect and timeout from product config * add controller role and move configs in own module * fix tests * regenerated charts * use broker.properties and controller.properties * replace missing server.properties * remove unused errors * add controller to product confif machinery * remove cp * add controller to security.properties * add controller to security properties * wip - add AnyConfig to access different role configs * remove errors from product logging * finished controller prep work * remove clones * remove obsolete methods * cleanup * use role methods * remove obsolete errors * remove unwrap * wip - kafka controller cleanup, move resources to own module * wip - controller working * wip - combine broker & controller * fix todos * zookeeper working again * fix todos * kraftify smoke test * kraftify tests definition * revert test changes * wip - controller tls * fix 3.7.x commands * hash node.id offset from rolegroup * started kerberos tests * adapt logging tests * error out on node id hash collision * fix cluster operation tests * fix configuration tests * fix upgrade tests * start fix remove rolegroup tests * started kraft docs * fix unit tests * fix docs * run pre commit * fix yaml lint * clarify docs, clean up * linter * improve jaas config * add comments, remove todo * remove redundant memory increase * implement node.id hashing check for all roles * fix linter * prepare log4j2 config * consolidate cluster operation tests * consolidate delete rolegroup * adjust kerberos tests * fix logging tests * fix smoke test * fix tls tests * fix upgrade tests * Apply suggestions from code review Co-authored-by: Razvan-Daniel Mihai <[email protected]> * do not apply znodes in kraftmode * use cluster name instead of uid for kafka cluster-id * replace uid with name for cluster-id * add pre-stop sleep hook to controller kafka container * add "kraft" test suite * add experimental warning to kraft docs * add kafka 4.0.0 and log4j2 * Apply suggestions from code review Co-authored-by: Razvan-Daniel Mihai <[email protected]> * remove explicit filenames from doc paragraph * add quotes to clarify code docs * add "smoke-kraft" test * add "operations-kraft" test * update operations test * tests: remove zookeeper=false tests * tests: remove zookeeper-latest: false * add 4.1.0 * added known issues section * tests: missed one * improve known issues * remove log4j vs log4j2 java arg todo * fix / improve todos * fix copy paste * tests: fix tls tests * tests: disable scaling for kraft 3.7 * remove obsolete zk/kraft checks * add gracefulShutdownTimeout to stabilize kerberos test --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
1 parent 5080695 commit ecce270

File tree

105 files changed

+5446
-1705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+5446
-1705
lines changed

.vscode/launch.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
"request": "launch",
77
"name": "Debug operator binary",
88
"cargo": {
9-
"args": ["build"],
9+
"args": [
10+
"build"
11+
],
1012
"filter": {
1113
"name": "stackable-{[ operator.name }]",
1214
"kind": "bin"
1315
}
1416
},
15-
"args": ["run"],
17+
"args": [
18+
"run"
19+
],
1620
"cwd": "${workspaceFolder}"
1721
}
1822
]

deploy/config-spec/properties.yaml

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 0.1.0
23
spec:
34
units:
@@ -35,6 +36,8 @@ properties:
3536
roles:
3637
- name: "broker"
3738
required: true
39+
- name: "controller"
40+
required: true
3841
asOfVersion: "0.0.0"
3942
comment: "TTL for successfully resolved domain names."
4043
description: "TTL for successfully resolved domain names."
@@ -54,52 +57,18 @@ properties:
5457
roles:
5558
- name: "broker"
5659
required: true
60+
- name: "controller"
61+
required: true
5762
asOfVersion: "0.0.0"
5863
comment: "TTL for domain names that cannot be resolved."
5964
description: "TTL for domain names that cannot be resolved."
6065

61-
- property: &zookeeperConnect
62-
propertyNames:
63-
- name: "zookeeper.connect"
64-
kind:
65-
type: "file"
66-
file: "server.properties"
67-
datatype:
68-
type: "string"
69-
unit: *unitUrl
70-
defaultValues:
71-
- fromVersion: "0.0.0"
72-
value: "localhost:2181"
73-
roles:
74-
- name: "broker"
75-
required: true
76-
asOfVersion: "0.0.0"
77-
description: "The zookeeper connection string"
78-
79-
- property: &zookeeperTimeout
80-
propertyNames:
81-
- name: "zookeeper.connection.timeout.ms"
82-
kind:
83-
type: "file"
84-
file: "server.properties"
85-
datatype:
86-
type: "integer"
87-
unit: *unitMilliseconds
88-
defaultValues:
89-
- fromVersion: "0.0.0"
90-
value: "18000"
91-
roles:
92-
- name: "broker"
93-
required: true
94-
asOfVersion: "0.0.0"
95-
description: "Zookeeper connection timeout in milliseconds."
96-
9766
- property: &opaAuthorizerClassName
9867
propertyNames:
9968
- name: "authorizer.class.name"
10069
kind:
10170
type: "file"
102-
file: "server.properties"
71+
file: "broker.properties"
10372
datatype:
10473
type: "string"
10574
defaultValues:
@@ -118,7 +87,7 @@ properties:
11887
- name: "opa.authorizer.url"
11988
kind:
12089
type: "file"
121-
file: "server.properties"
90+
file: "broker.properties"
12291
datatype:
12392
type: "string"
12493
unit: *unitUrl
@@ -133,7 +102,7 @@ properties:
133102
- name: "opa.authorizer.cache.initial.capacity"
134103
kind:
135104
type: "file"
136-
file: "server.properties"
105+
file: "broker.properties"
137106
datatype:
138107
type: "integer"
139108
unit: *unitCapacity
@@ -151,7 +120,7 @@ properties:
151120
- name: "opa.authorizer.cache.maximum.size"
152121
kind:
153122
type: "file"
154-
file: "server.properties"
123+
file: "broker.properties"
155124
datatype:
156125
type: "integer"
157126
unit: *unitCapacity
@@ -169,7 +138,7 @@ properties:
169138
- name: "opa.authorizer.cache.expire.after.seconds"
170139
kind:
171140
type: "file"
172-
file: "server.properties"
141+
file: "broker.properties"
173142
datatype:
174143
type: "integer"
175144
unit: *unitCapacity
@@ -181,19 +150,3 @@ properties:
181150
required: false
182151
asOfVersion: "0.0.0"
183152
description: "The number of seconds after which the OPA authorizer cache expires"
184-
185-
- property: &logDirs
186-
propertyNames:
187-
- name: "log.dirs"
188-
kind:
189-
type: "file"
190-
file: "server.properties"
191-
datatype:
192-
type: "string"
193-
recommendedValues:
194-
- value: "/stackable/data/topicdata"
195-
roles:
196-
- name: "broker"
197-
required: true
198-
asOfVersion: "0.0.0"
199-
description: "A comma separated list of directories under which to store log files"

deploy/helm/kafka-operator/configs/properties.yaml

Lines changed: 10 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 0.1.0
23
spec:
34
units:
@@ -35,6 +36,8 @@ properties:
3536
roles:
3637
- name: "broker"
3738
required: true
39+
- name: "controller"
40+
required: true
3841
asOfVersion: "0.0.0"
3942
comment: "TTL for successfully resolved domain names."
4043
description: "TTL for successfully resolved domain names."
@@ -54,52 +57,18 @@ properties:
5457
roles:
5558
- name: "broker"
5659
required: true
60+
- name: "controller"
61+
required: true
5762
asOfVersion: "0.0.0"
5863
comment: "TTL for domain names that cannot be resolved."
5964
description: "TTL for domain names that cannot be resolved."
6065

61-
- property: &zookeeperConnect
62-
propertyNames:
63-
- name: "zookeeper.connect"
64-
kind:
65-
type: "file"
66-
file: "server.properties"
67-
datatype:
68-
type: "string"
69-
unit: *unitUrl
70-
defaultValues:
71-
- fromVersion: "0.0.0"
72-
value: "localhost:2181"
73-
roles:
74-
- name: "broker"
75-
required: true
76-
asOfVersion: "0.0.0"
77-
description: "The zookeeper connection string"
78-
79-
- property: &zookeeperTimeout
80-
propertyNames:
81-
- name: "zookeeper.connection.timeout.ms"
82-
kind:
83-
type: "file"
84-
file: "server.properties"
85-
datatype:
86-
type: "integer"
87-
unit: *unitMilliseconds
88-
defaultValues:
89-
- fromVersion: "0.0.0"
90-
value: "18000"
91-
roles:
92-
- name: "broker"
93-
required: true
94-
asOfVersion: "0.0.0"
95-
description: "Zookeeper connection timeout in milliseconds."
96-
9766
- property: &opaAuthorizerClassName
9867
propertyNames:
9968
- name: "authorizer.class.name"
10069
kind:
10170
type: "file"
102-
file: "server.properties"
71+
file: "broker.properties"
10372
datatype:
10473
type: "string"
10574
defaultValues:
@@ -118,7 +87,7 @@ properties:
11887
- name: "opa.authorizer.url"
11988
kind:
12089
type: "file"
121-
file: "server.properties"
90+
file: "broker.properties"
12291
datatype:
12392
type: "string"
12493
unit: *unitUrl
@@ -133,7 +102,7 @@ properties:
133102
- name: "opa.authorizer.cache.initial.capacity"
134103
kind:
135104
type: "file"
136-
file: "server.properties"
105+
file: "broker.properties"
137106
datatype:
138107
type: "integer"
139108
unit: *unitCapacity
@@ -151,7 +120,7 @@ properties:
151120
- name: "opa.authorizer.cache.maximum.size"
152121
kind:
153122
type: "file"
154-
file: "server.properties"
123+
file: "broker.properties"
155124
datatype:
156125
type: "integer"
157126
unit: *unitCapacity
@@ -169,7 +138,7 @@ properties:
169138
- name: "opa.authorizer.cache.expire.after.seconds"
170139
kind:
171140
type: "file"
172-
file: "server.properties"
141+
file: "broker.properties"
173142
datatype:
174143
type: "integer"
175144
unit: *unitCapacity
@@ -181,19 +150,3 @@ properties:
181150
required: false
182151
asOfVersion: "0.0.0"
183152
description: "The number of seconds after which the OPA authorizer cache expires"
184-
185-
- property: &logDirs
186-
propertyNames:
187-
- name: "log.dirs"
188-
kind:
189-
type: "file"
190-
file: "server.properties"
191-
datatype:
192-
type: "string"
193-
recommendedValues:
194-
- value: "/stackable/data/topicdata"
195-
roles:
196-
- name: "broker"
197-
required: true
198-
asOfVersion: "0.0.0"
199-
description: "A comma separated list of directories under which to store log files"

0 commit comments

Comments
 (0)