-
Notifications
You must be signed in to change notification settings - Fork 909
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
Comments
karmada/pkg/apis/policy/v1alpha1/propagation_types.go Lines 62 to 69 in cac020e
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 |
@zhzhuang-zju |
If you want to use propagationpolicy apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: test-propagation
namespace: default
spec:
resourceSelectors:
- apiVersion: v1
kind: Pod
name: test1 By distinguishing between the |
Can I do this by being given a different namespace? |
you mean the namespace of PropagationPolicy? |
Yes, different namespaces have different PropagationPolicy |
Sure. For example: # pod1
apiVersion: v1
kind: Pod
metadata:
name: pod1
namespace: foo1
# pod2
apiVersion: v1
kind: Pod
metadata:
name: pod2
namespace: foo1
# pod3
apiVersion: v1
kind: Pod
metadata:
name: pod3
namespace: foo2
# pod4
apiVersion: v1
kind: Pod
metadata:
name: pod4
namespace: foo2 and two PropagationPolicies # foo1-pp
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: foo1-pp
namespace: foo1
spec:
resourceSelectors:
- apiVersion: v1
kind: Pod
# foo2-pp
apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: foo2-pp
namespace: foo2
spec:
resourceSelectors:
- apiVersion: v1
kind: Pod Then, |
ok,thanks @zhzhuang-zju |
Please provide an in-depth description of the question you have:
What do you think about this question?:
Environment:
The text was updated successfully, but these errors were encountered: