-
-
Notifications
You must be signed in to change notification settings - Fork 9
Allow changing configuration options #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
becd50a
WIP
lfrancke d18d6be
Fix compilation
lfrancke 312a713
WIP (this might not compile, just to show what I'm working on)
lfrancke 6e3afee
WIP (doesn't compile)
lfrancke ab3881c
fixed compile errors, removed clippy warnings
maltesander 211e171
WIP
lfrancke beb968e
Merge branch 'main' into upgrades
lfrancke 30a4803
Fix build and one message
lfrancke f830bc9
Merge branch 'main' into upgrades
lfrancke 0ad5fd2
Fix test & clippy
lfrancke caf0cbd
Add some docs for upgrade errors
lfrancke 6cc8b1f
WIP
lfrancke a713e5e
WIP
lfrancke db6b60d
Merge branch 'main' into config
lfrancke cd14201
Merge branch 'upgrades' into config
lfrancke a3b088f
WIP
lfrancke b736490
WIP
lfrancke 9c3bf3c
Merge branch 'main' into config
lfrancke d2f9bb5
product_config changes
lfrancke 1ced532
WIP
lfrancke a30513f
Merge branch 'main' into config
lfrancke ab68291
Merge main
lfrancke ddfda15
Fix build
lfrancke 94b5739
WIP
lfrancke 45a715a
WIP
lfrancke 8eb123a
Merge branch 'main' into config
lfrancke 82dd110
Fix some (not all) compilation errors
lfrancke 4ebfd47
WIP
lfrancke 787148a
Merge branch 'main' into config
lfrancke 8d56780
WIP
lfrancke 3c28f56
Use proper product_config branch
lfrancke 41d6fda
Use proper product_config branch
lfrancke 8890b97
Fix config json
lfrancke 8330334
Fix config json
lfrancke 5f018f6
Fix config parsing
lfrancke b89a89d
Implement config stuff from operator-rs & product-config
lfrancke bbcfc4e
Merge branch 'main' into config
lfrancke 2dff420
Fix build
lfrancke 7ff73e5
WIP
lfrancke 0241d09
Merge remote-tracking branch 'origin/main' into config
maltesander 6136ecd
Merged main.
maltesander 9aae8a7
Merge remote-tracking branch 'origin/config' into config
maltesander de479ef
Merged main.
maltesander e129b16
First working version of product config integration.
maltesander 88d2aac
WIP
maltesander 532793c
WIP
maltesander 04c381d
WIP
maltesander 4e2fda7
First "working" version with product config and operator-rs changes.
maltesander 5916ae9
WIP
maltesander c60ed3e
Merge remote-tracking branch 'origin/main' into config
maltesander 942325d
Adapted to changes in operator-rs (https://github.com/stackabletech/o…
maltesander 5456654
Adapted to operator-rs Configuration trait changes.
maltesander d7af60a
Removed foo / fake product config test.
maltesander 23ce30b
Adapted to operator-rs changes.
maltesander 9b0e181
Working with adapted product-config and operator-rs.
maltesander 5e60563
Using validate_role_and_group_config from operator-rs framework.
maltesander e9e5601
Adapted to latest product-config and operator-rs
maltesander 89725a0
Adapted to operator-rs into_dyn changes.
maltesander a68d499
Adapted to operator-rs changes.
maltesander c54cc6a
Adapted to operator-rs changes (list_owned).
maltesander f499f05
Added create config maps and adapted managed_by label.
maltesander a570d9f
Adapted to operator-rs changes.
maltesander 4a9b354
Merge remote-tracking branch 'origin/main' into config
maltesander 0829b4a
Merged Main
maltesander b38dcd5
Adapted to PR review.
maltesander 12be307
Merge remote-tracking branch 'origin/main' into config
maltesander 90c6ea7
Adapted to PR review.
maltesander acf7eb1
Adapted to operator-rs get_pod_name.
maltesander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
version: 0.1.0 | ||
spec: | ||
units: | ||
- unit: &unitDirectory | ||
name: "directory" | ||
regex: "^/|(/[\\w-]+)+$" | ||
examples: | ||
- "/tmp/xyz" | ||
- unit: &unitPort | ||
name: "port" | ||
regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" | ||
properties: | ||
- property: &tickTime | ||
propertyNames: | ||
- name: "tickTime" | ||
kind: | ||
type: "file" | ||
file: "zoo.cfg" | ||
datatype: | ||
type: "integer" | ||
min: "1" | ||
recommendedValues: | ||
- fromVersion: "0.0.0" | ||
value: "3000" | ||
roles: | ||
- name: "server" | ||
required: true | ||
asOfVersion: "0.0.0" | ||
comment: "ZK only checks whether the value is 0, all other values (including negative ones) are considered valid, we disallow negative values here, see QuorumPeerConfig.java" | ||
description: "The basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime." | ||
|
||
- property: &clientPort | ||
propertyNames: | ||
- name: "clientPort" | ||
kind: | ||
type: "file" | ||
file: "zoo.cfg" | ||
datatype: | ||
type: "string" | ||
unit: *unitPort | ||
defaultValues: | ||
- value: "2181" | ||
recommendedValues: | ||
- value: "2181" | ||
roles: | ||
- name: "server" | ||
required: true | ||
asOfVersion: "0.0.0" | ||
comment: "See QuorumPeerConfig.java, I'm unsure what happens when this is set to 0, it might work, it might not" | ||
description: "The port to listen for client connections; that is, the port that clients attempt to connect to." | ||
|
||
- property: &dataDir | ||
propertyNames: | ||
- name: "dataDir" | ||
kind: | ||
type: "file" | ||
file: "zoo.cfg" | ||
datatype: | ||
type: "string" | ||
unit: *unitDirectory | ||
recommendedValues: | ||
- value: "/tmp/zookeeper" | ||
roles: | ||
- name: "server" | ||
required: true | ||
asOfVersion: "0.0.0" | ||
comment: "See QuorumPeerConfig.java" | ||
description: "The location where ZooKeeper will store the in-memory database snapshots and, unless specified otherwise, the transaction log of updates to the database. Note: Be careful where you put the transaction log. A dedicated transaction log device is key to consistent good performance. Putting the log on a busy device will adversely affect performance." | ||
|
||
# Role required "true" is only correct if more than one zookeeper instances is used. | ||
- property: &initLimit | ||
propertyNames: | ||
- name: "initLimit" | ||
kind: | ||
type: "file" | ||
file: "zoo.cfg" | ||
datatype: | ||
type: "integer" | ||
min: "1" | ||
recommendedValues: | ||
- value: "5" | ||
roles: | ||
- name: "server" | ||
required: true | ||
maltesander marked this conversation as resolved.
Show resolved
Hide resolved
|
||
asOfVersion: "0.0.0" | ||
comment: "ZK only checks whether the value is 0, all other values (including negative ones) are considered valid, we disallow negative values here, see QuorumPeerConfig.java" | ||
description: "Amount of time, in ticks (see `tickTime`), to allow followers to connect and sync to a leader. Increased this value as needed, if the amount of data managed by ZooKeeper is large." | ||
|
||
# Role required "true" is only correct if more than one zookeeper instances is used. | ||
- property: &syncLimit | ||
propertyNames: | ||
- name: "syncLimit" | ||
kind: | ||
type: "file" | ||
file: "zoo.cfg" | ||
datatype: | ||
type: "integer" | ||
min: "1" | ||
recommendedValues: | ||
- value: "2" | ||
roles: | ||
- name: "server" | ||
required: true | ||
asOfVersion: "0.0.0" | ||
comment: "ZK only checks whether the value is 0, all other values (including negative ones) are considered valid, we disallow negative values here, see QuorumPeerConfig.java" | ||
description: "Amount of time, in ticks (see `tickTime`), to allow followers to sync with ZooKeeper. If followers fall too far behind a leader, they will be dropped. In other words: The number of ticks that can pass between sending a request and getting an acknowledgment before a follower is dropped." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
use stackable_operator::crd::CustomResourceExt; | ||
use stackable_zookeeper_crd::ZookeeperCluster; | ||
use std::fs; | ||
|
||
fn main() { | ||
let target_file = "./crd/zookeepercluster.crd.yaml"; | ||
let schema = ZookeeperCluster::crd(); | ||
let string_schema = match serde_yaml::to_string(&schema) { | ||
Ok(schema) => schema, | ||
Err(err) => panic!("Failed to retrieve CRD: [{}]", err), | ||
}; | ||
match fs::write(target_file, string_schema) { | ||
Ok(()) => println!("Successfully wrote CRD to file."), | ||
Err(err) => println!("Failed to write file: [{}]", err), | ||
let target_file = "deploy/crd/zookeepercluster.crd.yaml"; | ||
match ZookeeperCluster::write_yaml_schema(target_file) { | ||
Ok(_) => println!("Wrote CRD to [{}]", target_file), | ||
Err(err) => println!("Could not write CRD to [{}]: {:?}", target_file, err), | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.