Skip to content
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

fix(backendconnection): add annotation to prevent ArgoCD pruning #157

Merged

Conversation

basti1302
Copy link
Member

@basti1302 basti1302 commented Sep 26, 2024

For clusters managed by ArgoCD, we need to prevent ArgoCD to prune
Kubernetes resources necessary for the OTel collector managed by the
operator. If pruning is enabled in ArgoCD, it will automatically delete
resources which have no owner reference. This applies to all
cluster-scoped resources which the operator creates (since
cluster-scoped resource cannot be owned by namespace-scoped resources).

In particular, this affects the cluster role & cluster role binding.

References:

For clusters managed by ArgoCD, we need to prevent ArgoCD to prune
Kubernetes resources necessary for the OTel collector managed by the
operator. If pruning is enabled in ArgoCD, it will automatically delete
resources which have no owner reference. This applies to all
cluster-scoped resources which the operator creates (since
cluster-scoped resource cannot be owned by namespace-scoped resources).

In particular, this affects the cluster role & cluster role binding.

References:
* argoproj/argo-cd#4764 (comment)
  this indicates that only top level resources are pruned (which is
  basically the same as resources without an owner reference).
* The docs for preventing this on a resource level are here:
  https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#no-prune-resources
@basti1302 basti1302 force-pushed the prevent-argo-cd-from-pruning-cluster-scope-resources branch from 4321826 to 9eda835 Compare September 26, 2024 11:30
Copy link

sonarcloud bot commented Sep 26, 2024

@basti1302 basti1302 enabled auto-merge (rebase) September 26, 2024 11:31
@basti1302 basti1302 merged commit 9b3360f into main Sep 26, 2024
7 checks passed
@basti1302 basti1302 deleted the prevent-argo-cd-from-pruning-cluster-scope-resources branch September 26, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant