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
Bug 2051457: CCM PodDisruptionBudgets #174
Conversation
@lobziik: This pull request references Bugzilla bug 2051457, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cc @JoelSpeed |
@lobziik: This pull request references Bugzilla bug 2051457, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/hold
We cannot update the label selectors on any deployment for a platform that is already GA'd, eg, AzureStackHub, IBM cloud. We need to make this change in a non-breaking way, or teach our apply logic to be able to detect the label selector config and delete and recreate the deployment
spec: | ||
selector: | ||
matchLabels: | ||
app: azure-cloud-controller-manager | ||
k8s-app: azure-cloud-controller-manager |
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 change will break cluster upgrades, labels on deploymenys are immutable once created. Is there a way we can test this, will we need to delete and recreate to achieve this?
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.
0e963af - recreate logic with envtest based tests, ptal
} | ||
|
||
func getPDB(config config.OperatorConfig) (*policyv1.PodDisruptionBudget, error) { | ||
minAvailable := intstr.FromInt(1) |
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.
Change this to maxUnavailable
maybe? Then it would work even with a single replica?
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.
If we will strictly constraint number of ccm replicas to two, yes it might work with single replica.
However, i don't like this way, feel that it's harder to understand and troubleshoot then.
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.
maxUnavailable
tends to be more widely recommended as it is more flexible to changes than minAvailable
and is in general safer.
In my experience, minAvailable
is more likely to cause an issue than maxUnavailable
. IMO this should be maxUnavailable
, even if we have 3 replicas, yes, it slows down rollouts, but that's not necessarily a bad thing for such an important component
/test unit |
@lobziik: This pull request references Bugzilla bug 2051457, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
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.
Please review my nits within the apply section and apply the nits to the rest of the code there as well please
err = client.Delete(ctx, existing) | ||
if err != nil && !apierrors.IsNotFound(err) { |
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.
inline this please
err = client.Delete(ctx, existing) | ||
if err != nil && !apierrors.IsNotFound(err) { | ||
recorder.Event(existing, corev1.EventTypeWarning, "Deletion failed", err.Error()) | ||
return false, err |
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.
Please wrap this error to provide additional context
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.
Please fix this comment
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexander-demichev The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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 generally looks good to me, +1
i will leave the lgtm label for @JoelSpeed to make sure all this concerns are addressed
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.
Have you tested the latest iteration of tis PR to verify that it still works as expected on upgrade, eg on Azure
/test e2e-azure-upgrade |
Didn't test it manually. There is a whole bunch of envtest based test: https://github.com/openshift/cluster-cloud-controller-manager-operator/pull/174/files#diff-a9b533cdc5d42f96ee87c67af940c0e07dbffc2744eaec276d67b103c851960bR286 IMHO that should be sufficient. |
I'd prefer to see some logs from an actual cluster with some manual testing before we merge this, would be good to create a cluster and then upgrade to this PR. I think cluster bot can do this for you, but it would be good to check the logs and see that the CCMs are up throughout |
/retest |
tested on azure manually, steps:
Found issue:
|
For convinient obtain platfrom name as a string across operator
infrastructure.openshift.io/cloud-controller-manager label contains platform name, intended to be used as selector for podDisruptionBudgets. For consistency reasons infrastructure.openshift.io/cloud-node-manager label was introduced for daemonsets
Expected to fail, respective resourceapply changes for handling Deployment coming next commit
…ed selectors Selectors are immutable for Deployments and DaemonSets, in case if it was changed, delete old and create new one with prior serverside validation
DRY principle does not work well in this world, sorry
/lgtm |
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.
there are several usages of fmt.Errorf
using the %v
format for errors, i think we should convert these to %w
, but i don't think it's a blocker here.
/lgtm
/hold cancel |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@lobziik: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@lobziik: All pull requests linked via external trackers have merged: Bugzilla bug 2051457 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR introduces PodDisruptionBudgets for cloud-controller-manager pods, it includes