From 0d4fb81d9d9ffd30ace6f3d1f0d328ebe6d6d113 Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Fri, 11 Feb 2022 11:07:49 +0800 Subject: [PATCH] Add workload sample files in custom resource interpreter example Signed-off-by: Xinzhao Xu --- .../workload-propagationpolicy.yaml | 27 +++++++++++++++++++ .../customresourceinterpreter/workload.yaml | 16 +++++++++++ 2 files changed, 43 insertions(+) create mode 100644 examples/customresourceinterpreter/workload-propagationpolicy.yaml create mode 100644 examples/customresourceinterpreter/workload.yaml diff --git a/examples/customresourceinterpreter/workload-propagationpolicy.yaml b/examples/customresourceinterpreter/workload-propagationpolicy.yaml new file mode 100644 index 000000000000..56baa6b8f6e6 --- /dev/null +++ b/examples/customresourceinterpreter/workload-propagationpolicy.yaml @@ -0,0 +1,27 @@ +apiVersion: policy.karmada.io/v1alpha1 +kind: PropagationPolicy +metadata: + name: nginx-workload-propagation +spec: + resourceSelectors: + - apiVersion: workload.example.io/v1alpha1 + kind: Workload + name: nginx + placement: + clusterAffinity: + clusterNames: + - member1 + - member2 + replicaScheduling: + replicaDivisionPreference: Weighted + replicaSchedulingType: Divided + weightPreference: + staticWeightList: + - targetCluster: + clusterNames: + - member1 + weight: 2 + - targetCluster: + clusterNames: + - member2 + weight: 1 diff --git a/examples/customresourceinterpreter/workload.yaml b/examples/customresourceinterpreter/workload.yaml new file mode 100644 index 000000000000..b86d37707887 --- /dev/null +++ b/examples/customresourceinterpreter/workload.yaml @@ -0,0 +1,16 @@ +apiVersion: workload.example.io/v1alpha1 +kind: Workload +metadata: + name: nginx + labels: + app: nginx +spec: + replicas: 3 + template: + metadata: + labels: + app: nginx + spec: + containers: + - image: nginx + name: nginx