-
Notifications
You must be signed in to change notification settings - Fork 85
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
Checks for ignore reconciliation annotations #105
Checks for ignore reconciliation annotations #105
Conversation
Hi @somtochiama. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: SomtochiAma 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 |
@@ -103,6 +103,14 @@ func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err | |||
} | |||
} | |||
|
|||
annotations := instance.GetAnnotations() | |||
if ignoreAnnotation, ok := annotations["addons.operators.ignore"]; ok { |
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 can figure out a name for this in pairing :-)
@@ -103,6 +103,14 @@ func (r *Reconciler) Reconcile(request reconcile.Request) (reconcile.Result, err | |||
} | |||
} | |||
|
|||
annotations := instance.GetAnnotations() | |||
if ignoreAnnotation, ok := annotations["addons.operators.ignore"]; ok { | |||
if ignoreAnnotation == "true" { |
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.
I'd just allow any value (or even no value), so if ok
. (We might also want to rename ok
to found
)
@@ -339,6 +339,14 @@ func ParseObjects(ctx context.Context, manifest string) (*Objects, error) { | |||
// We don't reuse the manifest because it's probably yaml, and we want to use json | |||
// json = yaml | |||
o, err := NewObject(out) | |||
annotations := o.object.GetAnnotations() |
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.
I don't think we need to support this on the manifest ... but if you can think of a reason we should allow it, that's fine.
We discussed in pairing; we agreed we should look for the annotation on the objects in the cluster, by reading them before applying. (And that same logic is useful in the health check, I believe) |
This PR relates to #111 ? |
This PR could still be important. It checks for the ignore annotation on the Custom resource |
@justinsb should I close this? |
@somtochiama
Yes, I think so too, current code of PR is LGTM. /lgtm |
@somtochiama and I discussed this; this might be useful in future so we don't just want to close it, but we instead implemented first an annotation on the manifest itself. /ok-to-test /hold |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closed this PR. 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. |
No description provided.