Skip to content
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 630: Updating controller pdb policy #631

Merged
merged 2 commits into from
May 27, 2022
Merged

Conversation

anishakj
Copy link
Contributor

Signed-off-by: anishakj [email protected]

Change log description

Updating the controller PDB policy

Purpose of the change

Fixes #630

What the code does

Currently in controller PDB, the maxunavailableReplicas set in values file is used for minAvailable . Corrected the policy. Also if the replica count is 1 setting maxunavailable replicas to 0 as in segment store

How to verify it

Verified that able to configure PDB with these settings

@anishakj anishakj requested review from jkhalack, nishant-yt and twincitiesguy and removed request for twincitiesguy May 26, 2022 05:53
@codecov-commenter
Copy link

Codecov Report

Merging #631 (57f08b1) into master (4092987) will decrease coverage by 0.03%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #631      +/-   ##
==========================================
- Coverage   82.82%   82.78%   -0.04%     
==========================================
  Files          17       17              
  Lines        4069     4073       +4     
==========================================
+ Hits         3370     3372       +2     
- Misses        565      566       +1     
- Partials      134      135       +1     
Impacted Files Coverage Δ
controllers/pravega_controller.go 99.35% <66.66%> (-0.65%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4092987...57f08b1. Read the comment docs.

minAvailable := intstr.FromInt(int(p.Spec.Pravega.MaxUnavailableControllerReplicas))
var maxUnavailable intstr.IntOrString

if p.Spec.Pravega.MaxUnavailableControllerReplicas == int32(1) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to use another parameter here?
The description says the decision is to be based on replica count:

Also if the replica count is 1 setting maxunavailable replicas to 0 as in segment store

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jkhalack . I have corrected it.

Copy link
Collaborator

@nishant-yt nishant-yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anishakj anishakj merged commit 323a35a into master May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

controller maxUnavailableReplicas is setting minAvailable value in the PDB policy
4 participants