Skip to content

integrations/operator: add ignore and keep flags for CRs#37182

Merged
hugoShaka merged 2 commits intomasterfrom
hugo/operator-add-ignore
Jan 24, 2024
Merged

integrations/operator: add ignore and keep flags for CRs#37182
hugoShaka merged 2 commits intomasterfrom
hugo/operator-add-ignore

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka commented Jan 24, 2024

Adds a couple of annotations to the operator:

  • teleport.dev/ignore to block the operator from reconciling a resource entirely.
  • teleport.dev/keep to keep the Teleport resource after the CR gets deleted. This is here to make resource version upgrades easier.

Part of #20261

changelog: add teleport.dev/ignore and teleport.dev/keep annotations to the Kubernetes operator

}

if checkAnnotationFlag(obj, AnnotationFlagIgnore, false /* defaults to false */) {
log.Info(fmt.Sprintf("Resource is flagged with annotation %q, it will not be reconciled.", AnnotationFlagIgnore))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an log.Infof?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly not :/

Comment thread integrations/operator/controllers/resources/base_reconciler.go Outdated
@hugoShaka hugoShaka enabled auto-merge January 24, 2024 22:27
@hugoShaka hugoShaka added this pull request to the merge queue Jan 24, 2024
Merged via the queue into master with commit fb97a39 Jan 24, 2024
@hugoShaka hugoShaka deleted the hugo/operator-add-ignore branch January 24, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants