-
Notifications
You must be signed in to change notification settings - Fork 66
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 1948012: Report the operator status as always upgradeable in serviceCA/cluster #154
Conversation
@mtrmac: This pull request references Bugzilla bug 1948012, 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. |
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mtrmac The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
This trivial implementation is similar to several other operators, and consistent with actual operator behavior (which never stops trying to update the operands). It might make sense to use library-go/pkg/operator/unsupportedconfigoverridescontroller to block upgrades on unsupported overrides; let me know if I should add that. |
Note: openshift/origin#26030 should be partially dropped after this merges. |
/bugzilla refresh |
@wking: This pull request references Bugzilla bug 1948012, which is valid. The bug has been moved to the POST state. 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. |
func setUpgradeableTrue(operatorConfig *operatorv1.ServiceCA) { | ||
v1helpers.SetOperatorCondition(&operatorConfig.Status.Conditions, operatorv1.OperatorCondition{ | ||
Type: operatorv1.OperatorStatusTypeUpgradeable, | ||
Status: operatorv1.ConditionTrue, |
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.
Can we set Reason: "AsExpected"
or some such, because it makes it easier to distinguish between "we're happy" and "oops, we forgot to explain why we were sad" in Telemetry like count by (name,reason) (cluster_operator_conditions)
?
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.
Thanks, updated. I couldn’t find a Go constant for "AsExpected"
, using a string like library-go and others.
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.
hmm, you pass reason
into setUpgradeableTrue
now (good), but I don't see you actually passing it through to SetOperatorCondition
?
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.
Oops, stupid of me. Thanks, hopefully fixed, and I’ll actually test this in practice to confirm this time.
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.
managementState: Managed
:
$ oc get serviceca/cluster -o yaml
…
status:
conditions:
- lastTransitionTime: "2021-04-14T11:36:15Z"
reason: OperatorSyncLoopComplete
status: "False"
type: Degraded
- lastTransitionTime: "2021-04-14T11:44:51Z"
message: All service-ca-operator deployments updated
reason: ManagedDeploymentsCompleteAndUpdated
status: "False"
type: Progressing
- lastTransitionTime: "2021-04-14T11:44:43Z"
reason: ManagedDeploymentsCompleteAndUpdated
status: "True"
type: Available
- lastTransitionTime: "2021-04-14T11:36:15Z"
reason: AsExpected
status: "True"
type: Upgradeable
- lastTransitionTime: "2021-04-14T11:36:17Z"
status: "False"
type: ResourceSyncControllerDegraded
…
$ oc get clusteroperators/service-ca -o yaml
…
status:
conditions:
- lastTransitionTime: "2021-04-14T11:36:10Z"
message: All is well
reason: AsExpected
status: "False"
type: Degraded
- lastTransitionTime: "2021-04-14T11:44:51Z"
message: 'Progressing: All service-ca-operator deployments updated'
reason: AsExpected
status: "False"
type: Progressing
- lastTransitionTime: "2021-04-14T11:36:15Z"
message: All is well
reason: AsExpected
status: "True"
type: Available
- lastTransitionTime: "2021-04-14T11:36:15Z"
message: All is well
reason: AsExpected
status: "True"
type: Upgradeable
…
and managementState: Unmanaged
:
$ oc get serviceca/cluster -o yaml
…
status:
conditions:
- lastTransitionTime: "2021-04-14T11:36:15Z"
reason: OperatorSyncLoopComplete
status: "False"
type: Degraded
- lastTransitionTime: "2021-04-14T11:44:51Z"
message: All service-ca-operator deployments updated
reason: ManagedDeploymentsCompleteAndUpdated
status: "False"
type: Progressing
- lastTransitionTime: "2021-04-14T11:44:43Z"
reason: ManagedDeploymentsCompleteAndUpdated
status: "True"
type: Available
- lastTransitionTime: "2021-04-14T11:36:15Z"
reason: AsExpected
status: "True"
type: Upgradeable
- lastTransitionTime: "2021-04-14T11:36:17Z"
status: "False"
type: ResourceSyncControllerDegraded
…
$ oc get clusteroperators/service-ca -o yaml
…
status:
conditions:
- lastTransitionTime: "2021-04-14T12:03:47Z"
reason: Unmanaged
status: Unknown
type: Available
- lastTransitionTime: "2021-04-14T12:03:47Z"
reason: Unmanaged
status: Unknown
type: Progressing
- lastTransitionTime: "2021-04-14T12:03:47Z"
reason: Unmanaged
status: Unknown
type: Degraded
- lastTransitionTime: "2021-04-14T12:03:47Z"
reason: Unmanaged
status: Unknown
type: Upgradeable
…
/retest |
2 similar comments
/retest |
/retest |
... and this will also, via library-go/pkg/operator/status, show up in ClusterOperators/service-ca , which was previously reporting the default upgradeable Statu: Unknown, Reason: NoData. https://bugzilla.redhat.com/show_bug.cgi?id=1948012 Signed-off-by: Miloslav Trmač <mitr@redhat.com>
/retest |
1 similar comment
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mtrmac, stlaz 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@mtrmac: All pull requests linked via external trackers have merged: Bugzilla bug 1948012 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. |
Because [1] has landed and [2] is ON_QA. Also for openshift-controller-manager, [3] has landed and [4] is VERIFIED. [1]: openshift/service-ca-operator#154 [2]: https://bugzilla.redhat.com/show_bug.cgi?id=1948012 [3]: openshift/cluster-openshift-controller-manager-operator#210 [4]: https://bugzilla.redhat.com/show_bug.cgi?id=1948011
Happened in openshift/origin#26183 . |
/cherrypick release-4.7 |
@mtrmac: new pull request created: #160 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. |
... and this will also, via library-go/pkg/operator/status, show up in ClusterOperators/service-ca , which was previously reporting the default upgradeable Statu: Unknown, Reason: NoData.
https://bugzilla.redhat.com/show_bug.cgi?id=1948012