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 1905778: Fix inconsistent ingress operator status after upgrade #526
Conversation
@rfredette: This pull request references Bugzilla bug 1905778, which is invalid:
Comment 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. |
func PruneConditions(conditions []operatorv1.OperatorCondition) []operatorv1.OperatorCondition { | ||
for i, condition := range conditions { | ||
switch condition.Type { | ||
case "DeploymentDegraded": |
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.
We stopped using DeploymentDegraded
in 4.6, right? Might be worth dropping a comment above indicating that this condition exists for clusters < 4.6, to avoid any confusion.
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.
That's a good idea. I'll include a comment about it to clarify
DeploymentDegraded is no longer published as a status. If the cluster was upgraded past the last version where DeploymentDegraded was published, the existing status will continue to be listed. This commit removes the status if it is found.
If the endpoint publishing strategy is type LoadBalancer but no LoadBalancer type is specified, update endpointPublishingStrategy.LoadBalancer to external
@rfredette: This pull request references Bugzilla bug 1905778, which is invalid:
Comment 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. |
/bugzilla refresh |
@rfredette: This pull request references Bugzilla bug 1905778, 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
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.
Please add to-do comments to remove this fix-up logic in 4.8. Once the operator has done the fix-ups, it shouldn't be necessary to perform the same fix-ups again, so we only need the fix-ups in one release (4.7) and don't need them in subsequent releases (4.8 and later).
log.Info("EndpointPublishingStrategy missing LoadBalancer") | ||
// set loadbalancer to external |
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.
The log message could be a little more explicit, and the comment is superfluous.
log.Info("EndpointPublishingStrategy missing LoadBalancer") | |
// set loadbalancer to external | |
log.Info("Setting default value for empty status.endpointPublishingStrategy.loadBalancer field", "ingresscontroller", ingress) |
Thanks! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah, rfredette 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 |
@rfredette: All pull requests linked via external trackers have merged: Bugzilla bug 1905778 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. |
/cherry-pick release-4.6 |
@rfredette: #526 failed to apply on top of branch "release-4.6":
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. |
status.DeploymentDegraded
was removed in favor of several more specific status fields in 4.6, but if the cluster was upgraded from 4.5 or earlier, the existingDeploymentDegraded
status will continue to be reportedIf the cluster was upgraded from 4.1 or earlier,
status.EndpointPublishingStrategy.LoadBalancer
(introduced in 4.2?) may not be present whenstatus.EndpointPublishingStrategy.Type
is set toLoadBalancerService
. Internally, the assumption is made that this is equivalent tostatus.EndpointPublishingStrategy.LoadBalancer
being set to.LoadBalancer.scope: External
, but this PR makes that implicit assumption explicit.