update policy examples (#48)

Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
Kevin Wang 2020-12-02 10:18:31 +08:00 committed by GitHub
parent ba172b4bcd
commit ed19391619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 31 deletions

View File

@ -1,31 +1,32 @@
apiVersion: propagationstrategy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: example-policy
namespace: default
spec:
resourceSelector:
- apiVersion: apps/v1
kind: Deployment
names:
- nginx
namespaces:
- default
- exclude
excludeNamespaces:
- exclude
labelSelector:
matchLabels:
a: b
association: false
placement:
clusterAffinity:
clusterNames:
- cluster1
- cluster3
exclude:
- cluster1
spreadConstraints:
- maximumClusters: 3
minimumClusters: 3
apiVersion: propagationstrategy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
name: example-policy
namespace: default
spec:
resourceSelector:
- apiVersion: apps/v1
kind: Deployment
names:
- nginx
namespaces:
- default
- exclude
excludeNamespaces:
- exclude
labelSelector:
matchLabels:
a: b
association: false
placement:
clusterAffinity:
clusterNames:
- cluster1
- cluster3
exclude:
- cluster1
spreadConstraints:
- spreadByLabel: failuredomain.kubernetes.io/zone
maximum: 3
minimum: 3
schedulerName: default

View File

@ -22,6 +22,7 @@ spec:
exclude:
- cluster2
spreadConstraints:
- maximum: 3
- spreadByLabel: failuredomain.kubernetes.io/zone
maximum: 3
minimum: 3
schedulerName: default