-
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
issue-464:Added support for JvmOption customization #462
Conversation
Signed-off-by: prabhaker24 <[email protected]>
Signed-off-by: prabhaker24 <[email protected]>
Signed-off-by: prabhaker24 <[email protected]>
Signed-off-by: prabhaker24 <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #462 +/- ##
==========================================
- Coverage 75.29% 72.60% -2.70%
==========================================
Files 15 15
Lines 3068 3285 +217
==========================================
+ Hits 2310 2385 +75
- Misses 669 803 +134
- Partials 89 97 +8
Continue to review full report at Codecov.
|
err = r.client.Create(context.TODO(), configMap) | ||
if err != nil && !errors.IsAlreadyExists(err) { | ||
return err | ||
err = r.client.Get(context.TODO(), types.NamespacedName{Name: configMap.Name, Namespace: p.Namespace}, currentConfigMap) |
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.
This does not seem like a good place and a good way to check for updates to config map.
Please follow the logic used in zookeeper -operator:
https://github.com/pravega/zookeeper-operator/blob/master/pkg/controller/zookeepercluster/zookeepercluster_controller.go#L150
In p-operator we're checking very specific things in the reconcile loop, instead of checking for updates to each component and that is complicating the flow of code way too much...
Lets refactor and change it to the way it is done in ZK operator...
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.
Done.
@@ -329,6 +351,29 @@ func (r *ReconcilePravegaCluster) deployController(p *pravegav1beta1.PravegaClus | |||
if err != nil && !errors.IsAlreadyExists(err) { | |||
return err | |||
} | |||
if !eq { |
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.
Same comment adding too many ifs... complicates the flow of code.. I think its time to refactor the reconcile loop...
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.
Done.
Signed-off-by: prabhaker24 <[email protected]>
Signed-off-by: prabhaker24 <[email protected]>
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.
LGTM. Just make sure we add enough tests to cover this.
Signed-off-by: prabhaker24 <[email protected]>
Signed-off-by: prabhaker24 <[email protected]>
test/e2e/cmchanges_test.go
Outdated
err = pravega_e2eutil.UpdatePravegaCluster(t, f, ctx, pravega) | ||
g.Expect(err).NotTo(HaveOccurred()) | ||
|
||
//checking if the upgrade of options was successfull |
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.
Fix the typo successful
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.
Done.
Signed-off-by: prabhaker24 <[email protected]>
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.
LGTM
Signed-off-by: prabhaker24 [email protected]
Change log description
This pr will enable the user to modify both controller and sgmentstore JVMOptions as well as options during runtime
Purpose of the change
Fixes #464
What the code does
The code looks for any change in the jvm option or option in either of controller or segmentstore and if there is a change i.e user has changed any of the jvmOptions or options or has added a new value, in that case, we update the configmap and restart each pod one by one.
I am doing validation as well and is done by the method validateConfigMap() which ensures user doesn't change any of the following values:-
How to verify it