-
Notifications
You must be signed in to change notification settings - Fork 953
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Klaus Ma
committed
Jun 27, 2019
1 parent
ab4e709
commit 73d8f91
Showing
22 changed files
with
1,063 additions
and
0 deletions.
There are no files selected for viewing
101 changes: 101 additions & 0 deletions
101
docs/samples/kubecon-2019-china/deploys/controllers.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: vk-controllers | ||
namespace: volcano | ||
|
||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: vk-controllers | ||
namespace: volcano | ||
rules: | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["create", "get", "list", "watch", "delete"] | ||
- apiGroups: ["batch"] | ||
resources: ["jobs"] | ||
verbs: ["create", "get", "list", "watch", "delete", "update"] | ||
- apiGroups: ["batch.volcano.sh"] | ||
resources: ["jobs"] | ||
verbs: ["get", "list", "watch", "update", "delete"] | ||
- apiGroups: ["batch.volcano.sh"] | ||
resources: ["jobs/status"] | ||
verbs: ["update", "patch"] | ||
- apiGroups: ["bus.volcano.sh"] | ||
resources: ["commands"] | ||
verbs: ["get", "list", "watch", "delete"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create", "list", "watch", "update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["create", "get", "list", "watch", "update", "bind", "delete"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "create"] | ||
- apiGroups: [""] | ||
resources: ["services"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: [""] | ||
resources: ["configmaps"] | ||
verbs: ["get", "list", "watch", "create", "delete", "update"] | ||
- apiGroups: ["scheduling.incubator.k8s.io"] | ||
resources: ["podgroups", "queues", "queues/status"] | ||
verbs: ["get", "list", "watch", "create", "delete", "update"] | ||
- apiGroups: ["scheduling.k8s.io"] | ||
resources: ["priorityclasses"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: vk-controllers-role | ||
namespace: volcano | ||
subjects: | ||
- kind: ServiceAccount | ||
name: vk-controllers | ||
namespace: volcano | ||
roleRef: | ||
kind: ClusterRole | ||
name: vk-controllers | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
--- | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: vk-controllers | ||
namespace: volcano | ||
labels: | ||
app: volcano-controller | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: volcano-controller | ||
template: | ||
metadata: | ||
labels: | ||
app: volcano-controller | ||
spec: | ||
serviceAccount: vk-controllers | ||
imagePullSecrets: | ||
- name: default-secret | ||
containers: | ||
- name: vk-controllers | ||
image: swr.cn-north-1.myhuaweicloud.com/hwstaff_z00383385/vk-controllers:latest | ||
args: | ||
- --alsologtostderr | ||
- -v=3 | ||
- 2>&1 | ||
imagePullPolicy: "IfNotPresent" | ||
resources: | ||
requests: | ||
cpu: "1000m" | ||
memory: "2048Mi" | ||
limits: | ||
cpu: "1000m" | ||
memory: "2048Mi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: scheduling.incubator.k8s.io/v1alpha1 | ||
kind: Queue | ||
metadata: | ||
name: default | ||
spec: | ||
weight: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vk-scheduler-configmap | ||
namespace: volcano | ||
data: | ||
kube-batch.conf: | | ||
actions: "enqueue, allocate, backfill" | ||
tiers: | ||
- plugins: | ||
- name: priority | ||
- name: gang | ||
- name: conformance | ||
- plugins: | ||
- name: drf | ||
- name: predicates | ||
- name: proportion | ||
- name: nodeorder | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: vk-scheduler | ||
namespace: volcano | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: vk-scheduler | ||
namespace: volcano | ||
rules: | ||
- apiGroups: ["apiextensions.k8s.io"] | ||
resources: ["customresourcedefinitions"] | ||
verbs: ["create", "get", "list", "watch", "delete"] | ||
- apiGroups: ["batch.volcano.sh"] | ||
resources: ["jobs"] | ||
verbs: ["get", "list", "watch", "update", "delete"] | ||
- apiGroups: ["batch.volcano.sh"] | ||
resources: ["jobs/status"] | ||
verbs: ["update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create", "list", "watch", "update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["pods", "pods/status"] | ||
verbs: ["create", "get", "list", "watch", "update", "bind", "updateStatus", "delete"] | ||
- apiGroups: [""] | ||
resources: ["pods/binding"] | ||
verbs: ["create"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["scheduling.incubator.k8s.io"] | ||
resources: ["podgroups"] | ||
verbs: ["list", "watch", "update"] | ||
- apiGroups: [""] | ||
resources: ["namespaces"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["policy"] | ||
resources: ["poddisruptionbudgets"] | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["scheduling.incubator.k8s.io"] | ||
resources: ["queues"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: ["scheduling.k8s.io"] | ||
resources: ["priorityclasses"] | ||
verbs: ["get", "list", "watch"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: vk-scheduler-role | ||
namespace: volcano | ||
subjects: | ||
- kind: ServiceAccount | ||
name: vk-scheduler | ||
namespace: volcano | ||
roleRef: | ||
kind: ClusterRole | ||
name: vk-scheduler | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
--- | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: vk-scheduler | ||
namespace: volcano | ||
labels: | ||
app: volcano-scheduler | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: volcano-scheduler | ||
template: | ||
metadata: | ||
labels: | ||
app: volcano-scheduler | ||
spec: | ||
serviceAccount: vk-scheduler | ||
imagePullSecrets: | ||
- name: default-secret | ||
containers: | ||
- name: vk-scheduler | ||
image: swr.cn-north-1.myhuaweicloud.com/hwstaff_z00383385/vk-kube-batch:latest | ||
args: | ||
- --alsologtostderr | ||
- --scheduler-conf=/volcano.scheduler/kube-batch.conf | ||
- --scheduler-name=volcano | ||
- -v=3 | ||
- 2>&1 | ||
imagePullPolicy: "IfNotPresent" | ||
resources: | ||
requests: | ||
cpu: "1000m" | ||
memory: "2048Mi" | ||
limits: | ||
cpu: "1000m" | ||
memory: "2048Mi" | ||
volumeMounts: | ||
- name: scheduler-config | ||
mountPath: /volcano.scheduler | ||
volumes: | ||
- name: scheduler-config | ||
configMap: | ||
name: vk-scheduler-configmap |
41 changes: 41 additions & 0 deletions
41
docs/samples/kubecon-2019-china/deploys/scheduling_v1alpha1_podgroup.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: podgroups.scheduling.incubator.k8s.io | ||
annotations: | ||
"helm.sh/hook": crd-install | ||
spec: | ||
group: scheduling.incubator.k8s.io | ||
names: | ||
kind: PodGroup | ||
plural: podgroups | ||
scope: Namespaced | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
apiVersion: | ||
type: string | ||
kind: | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
properties: | ||
minMember: | ||
format: int32 | ||
type: integer | ||
type: object | ||
status: | ||
properties: | ||
succeeded: | ||
format: int32 | ||
type: integer | ||
failed: | ||
format: int32 | ||
type: integer | ||
running: | ||
format: int32 | ||
type: integer | ||
type: object | ||
type: object | ||
version: v1alpha1 |
30 changes: 30 additions & 0 deletions
30
docs/samples/kubecon-2019-china/deploys/scheduling_v1alpha1_queue.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: queues.scheduling.incubator.k8s.io | ||
annotations: | ||
"helm.sh/hook": crd-install | ||
spec: | ||
group: scheduling.incubator.k8s.io | ||
names: | ||
kind: Queue | ||
plural: queues | ||
scope: Cluster | ||
validation: | ||
openAPIV3Schema: | ||
properties: | ||
apiVersion: | ||
type: string | ||
kind: | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
properties: | ||
weight: | ||
format: int32 | ||
type: integer | ||
type: object | ||
type: object | ||
version: v1alpha1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: nginx-1 | ||
labels: | ||
app: nginx-1 | ||
spec: | ||
# modify replicas according to your case | ||
replicas: 8 | ||
selector: | ||
matchLabels: | ||
app: nginx-1 | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx-1 | ||
spec: | ||
schedulerName: volcano | ||
containers: | ||
- name: nginx-1 | ||
image: nginx | ||
resources: | ||
requests: | ||
cpu: "1000m" | ||
limits: | ||
cpu: "1000m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: nginx-2 | ||
labels: | ||
app: nginx-2 | ||
spec: | ||
# modify replicas according to your case | ||
replicas: 8 | ||
selector: | ||
matchLabels: | ||
app: nginx-2 | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx-2 | ||
spec: | ||
schedulerName: volcano | ||
containers: | ||
- name: nginx-2 | ||
image: nginx | ||
resources: | ||
requests: | ||
cpu: "1000m" | ||
limits: | ||
cpu: "1000m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: apps/v1 | ||
kind: ReplicaSet | ||
metadata: | ||
name: nginx | ||
labels: | ||
app: nginx | ||
spec: | ||
# modify replicas according to your case | ||
replicas: 8 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx | ||
resources: | ||
requests: | ||
cpu: "1000m" | ||
limits: | ||
cpu: "1000m" |
Oops, something went wrong.