This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
Cluster generator cannot select local cluster #116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR switches the behaviour of the cluster generator, such that it will now target both local AND non-local clusters (eg those with secrets defined).
If you wish to use the existing behaviour -- that is, targeting non-local clusters only with your Application -- then use a cluster selector with labels, for example:
This selector will not match local clusters, since the local cluster does not have a secret (and thus does not have labels on that secret). Any cluster selector that specifies on a label will automatically exclude local clusters.
If you wish to target both local and non-local cluster, using labels, you can create a secret for the local cluster as per the parent issue.
I'm using the existing Argo CD
util/db
package logic (pulled in directly from that package) to identify local/non-local clusters.Additional tweaks
Clean up cluster unit tests
Clean up cluster E2E tests:
Fixes #35