-
Notifications
You must be signed in to change notification settings - Fork 884
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
add wildcard support to ResourceSelectors
#3823
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Signed-off-by: Lilith McMullen <lilith.mcmullen@zendesk.com>
f6b0521
to
2b2426c
Compare
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #3823 +/- ##
=======================================
Coverage 55.64% 55.64%
=======================================
Files 226 226
Lines 21378 21378
=======================================
Hits 11896 11896
Misses 8848 8848
Partials 634 634
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hi @Laevos, thanks for your feedback. If we use karmada/pkg/apis/policy/v1alpha1/propagation_types.go Lines 44 to 50 in 48e9a5b
How do you think? |
Currently, ResourceSelectors supports selecting one instance or all instances of one kind. That seems good enough |
There is a similar request that is for |
I'd like to hear your use case in more detail. We need to figure out the security risk before moving forward. |
Sure thing @RainbowMango: Our use case is that we are a platform team who provides managed Kubernetes clusters to our internal customers. However, one business requirement we have is that we cannot request our end uses to change the way they're currently writing manifests in any significant way. Namely, we can't ask that teams add PropagationPolicies to their clusters, as those should be managed by us. At the same time, we would like to avoid having to manage every individual With our current architecture, we have only one member cluster, to which we want to propagate all manifests deployed against the Karmada cluster. The thought here was that by having a wildcard An alternative solution is to create a |
Is it possible to consider using multiple PropagationPolicies, each selecting a specific namespace of a certain Kind? This way, compared to using a single ClusterPropagationPolicy, the control would be more precise. Additionally, the number of PropagationPolicies that administrators need to create is fixed and at a constant level. |
@XiShanYongYe-Chang This is looking more like what we'll have to do, or possibly implement a controller in the future; the idea was to try and scope to as few PPs/CPPs as possible to avoid toilsome work of manually updating when a new Kind/CRD is introduced, but I appreciate the direction; it looks like this can be closed if the consensus is that this would be an anti-feature. Thanks for your time! |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently a
ClusterPropagationPolicy
is able to propagate both namespaced and cluster-wide resources to member clusters. However, there is not currently a way to say "I would like for all resources, both namespaced and cluster-wide, to be propagated according to thisClusterPropagationPolicy
, regardless of theirAPIVersion
orKind
, and in allNamespaces
(except for the system-reserved namespaces)."With this change, a wildcard feature is added to allow a
ClusterPropagationPolicy
to do just that. By Providing a "*" for any combination of theAPIVersion
,Kind
andNamespace
, aClusterPropagationPolicy
can be made to match on a wider array ofWhich issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: