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

[FEATURE] Check status of remote istios before pruning stale revisions #457

Open
1 task done
nrfox opened this issue Oct 30, 2024 · 1 comment
Open
1 task done
Labels
enhancement New feature or request

Comments

@nrfox
Copy link
Contributor

nrfox commented Oct 30, 2024

Is this the right place to submit this?

  • This is not a question about how to use the sail-operator

Feature Description

If a control plane manages an external cluster but it isn't in use on the control plane cluster, the Sail Operator will consider the control plane revision stale and remove it. This is a problem if there are workloads on the remote cluster still connected to the control plane.

The Sail Operator should not automatically prune revisions that manage external clusters.

Additional Information

No response

@nrfox nrfox added the enhancement New feature or request label Oct 30, 2024
@nrfox nrfox changed the title [FEATURE] Disable pruning of stale revisions for istios that manage external clusters [FEATURE] Check status of remote istios before pruning stale revisions Jan 3, 2025
@nrfox
Copy link
Contributor Author

nrfox commented Jan 3, 2025

@luksa we previously spoke offline about the operator checking the status of the remote revision before pruning and doing this by using the remote secret that istiod itself uses. An additional idea I had on that same concept is: rather than having the operator in the primary cluster manually reconcile all the resources in the remote cluster to determine if its in use, what if the operator in the remote cluster writes the Istio status somewhere the primary operator can read and the primary operator reads that to determine the status of the remote istio.

e.g.

Remote operator --> reconciles status and writes status to a sail.operator.io annotation on the mutating webhook.
Primary operator --> detects remote secret --> uses remote secret to read the status of remote istiorevision from the mutating webhook. If there's a remote revision that is in use then the primary revision counts as in use as well.

If there's a remote secret but there's no webhook (where the remote status gets written to) then the primary operator can assume there's no remote revisions.

Trying to avoid having a single operator need to reconcile/watch all workload resources in remote clusters. I don't think that will scale very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant