From f547a05f9e5ee01f3e2dda9980e5071d35ad151c Mon Sep 17 00:00:00 2001 From: FFFFFaraway <425499721@qq.com> Date: Sun, 14 Aug 2022 16:00:17 +0800 Subject: [PATCH] Add deployment yaml for example --- config/{busybox.yaml => pending-example.yaml} | 12 +++++------ config/podgroup-example.yaml | 8 +++++++ config/running-example.yaml | 21 +++++++++++++++++++ 3 files changed, 35 insertions(+), 6 deletions(-) rename config/{busybox.yaml => pending-example.yaml} (58%) create mode 100644 config/podgroup-example.yaml create mode 100644 config/running-example.yaml diff --git a/config/busybox.yaml b/config/pending-example.yaml similarity index 58% rename from config/busybox.yaml rename to config/pending-example.yaml index f464909..bf45705 100644 --- a/config/busybox.yaml +++ b/config/pending-example.yaml @@ -1,9 +1,10 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: busybox + name: pending-example + namespace: sw spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: busybox @@ -11,11 +12,10 @@ spec: metadata: labels: app: busybox + pod-group.scheduling.bdap.com/podgroup-configmap: example-pg spec: schedulerName: scheduler-framework-sample - terminationGracePeriodSeconds: 5 containers: - - image: busybox:latest - imagePullPolicy: IfNotPresent + - image: busybox name: busybox - command: ["sleep", "3600"] + command: ["sleep", "infinity"] diff --git a/config/podgroup-example.yaml b/config/podgroup-example.yaml new file mode 100644 index 0000000..e68daa3 --- /dev/null +++ b/config/podgroup-example.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: example-pg + namespace: sw +data: + minAvailable: "3" + scheduleTimeoutSeconds: "5" diff --git a/config/running-example.yaml b/config/running-example.yaml new file mode 100644 index 0000000..a734493 --- /dev/null +++ b/config/running-example.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: running-example + namespace: sw +spec: + replicas: 3 + selector: + matchLabels: + app: busybox + template: + metadata: + labels: + app: busybox + pod-group.scheduling.bdap.com/podgroup-configmap: example-pg + spec: + schedulerName: scheduler-framework-sample + containers: + - image: busybox + name: busybox + command: ["sleep", "infinity"]