-
Notifications
You must be signed in to change notification settings - Fork 38
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
[KO-293] - Adding support for dynamic config change. #262
Conversation
test/cluster_test.go
Outdated
namespaceConfig["replication-factor"] = 3 | ||
aeroCluster.Spec.AerospikeConfig.Value["namespaces"].([]interface{})[len(nsList)-1] = namespaceConfig | ||
|
||
err = k8sClient.Update( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use update with wait. The current call will only check for validation and not actual dynamic setting of rf
api/v1/utils.go
Outdated
@@ -63,7 +63,7 @@ const ( | |||
AerospikeInitContainerRegistryEnvVar = "AEROSPIKE_KUBERNETES_INIT_REGISTRY" | |||
AerospikeInitContainerDefaultRegistry = "docker.io" | |||
AerospikeInitContainerDefaultRegistryNamespace = "tanmayj10" | |||
AerospikeInitContainerDefaultRepoAndTag = "aerospike-kubernetes-init:2.1.0-dev1" | |||
AerospikeInitContainerDefaultRepoAndTag = "aerospike-kubernetes-init:2.1.0-dev3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a new init tag and use that. Init changes are merged.
This PR is to handle aerospike config fields which can be changed dynamically without any rolling restart.
whenever user will change any config in CR, operator will do certain operations:
Compare the spec and status config from CR and fetch different config in a specific format.
Check whether that field is static or dynamic.
If dynamic, construct the set-config command based on the context and sub-context.
Execute the command in all the hosts via asinfo.
If command fails for any reason, fall back to rolling restart.