kubernetes-sigs / cluster-api-operator

Home for Cluster API Operator, a subproject of sig-cluster-lifecycle
https://cluster-api-operator.sigs.k8s.io
Apache License 2.0
146 stars 60 forks source link

Better error message: "more than one config maps were found" (please add version info) #529

Open guettli opened 1 month ago

guettli commented 1 month ago

User Story

We use the cluster-api-operator and we see that message in a condition during an upgrade:

"more than one config maps were found for given selector: &LabelSelector{MatchLabels:map[string]string{provider-components: foo,},MatchExpressions:[]LabelSelectorRequirement{},}"

Details of the condition we see:

crd: coreproviders
name: cluster-api
ProviderUpgraded=False
ComponentsUpgradeError

As a [developer/user/operator] I would like to know during an upgrade if this relates to an old version or a new version.

Detailed Description

I had a short look at the code, but could not find a straight forward way to add the version info into the message of the condition.

/kind feature

k8s-ci-robot commented 1 month ago

This issue is currently awaiting triage.

If CAPI Operator contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.