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

I have deployed multiple PropagationPolicies and now I want to create pods, how do I specify which PropagationPolicy to use in yaml #6001

Open
Schwarao opened this issue Dec 31, 2024 · 1 comment
Labels
kind/question Indicates an issue that is a support question.

Comments

@Schwarao
Copy link

Please provide an in-depth description of the question you have:

What do you think about this question?:

Environment:

  • Karmada version:
  • Kubernetes version:
  • Others:
@Schwarao Schwarao added the kind/question Indicates an issue that is a support question. label Dec 31, 2024
@zhzhuang-zju
Copy link
Contributor

@Schwarao

type PropagationSpec struct {
// ResourceSelectors used to select resources.
// Nil or empty selector is not allowed and doesn't mean match all kinds
// of resources for security concerns that sensitive resources(like Secret)
// might be accidentally propagated.
// +required
// +kubebuilder:validation:MinItems=1
ResourceSelectors []ResourceSelector `json:"resourceSelectors"`

The ResourceSelectors in PropagationPolicy are used to filter resources, for example,

# PropagationPolicy
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  name: pod-propagation
spec:
  resourceSelectors:
    - apiVersion: v1
      kind: Pod
      name: foo

#pod
apiVersion: v1
kind: Pod
metadata:
  name: foo

You can also share the YAML of your Pod, and then we can take a look at how to properly configure the ResourceSelectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

2 participants