synchronization
This commit is contained in:
132
gpushare-scheduler-extender/config/gpushare-schd-extender.yaml
Normal file
132
gpushare-scheduler-extender/config/gpushare-schd-extender.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
# rbac.yaml
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: gpushare-schd-extender
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- update
|
||||
- patch
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- bindings
|
||||
- pods/binding
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: gpushare-schd-extender
|
||||
namespace: kube-system
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: gpushare-schd-extender
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: gpushare-schd-extender
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: gpushare-schd-extender
|
||||
namespace: kube-system
|
||||
|
||||
# deployment yaml
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: gpushare-schd-extender
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gpushare
|
||||
component: gpushare-schd-extender
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gpushare
|
||||
component: gpushare-schd-extender
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
spec:
|
||||
hostNetwork: true
|
||||
tolerations:
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
key: node-role.kubernetes.io/master
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
||||
key: node.cloudprovider.kubernetes.io/uninitialized
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
serviceAccount: gpushare-schd-extender
|
||||
containers:
|
||||
- name: gpushare-schd-extender
|
||||
image: registry.cn-hangzhou.aliyuncs.com/offends/rainbond:gpushare-scheduler-extender
|
||||
env:
|
||||
- name: LOG_LEVEL
|
||||
value: debug
|
||||
- name: PORT
|
||||
value: "12345"
|
||||
|
||||
# service.yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gpushare-schd-extender
|
||||
namespace: kube-system
|
||||
labels:
|
||||
app: gpushare
|
||||
component: gpushare-schd-extender
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 12345
|
||||
name: http
|
||||
targetPort: 12345
|
||||
nodePort: 32766
|
||||
selector:
|
||||
# select app=ingress-nginx pods
|
||||
app: gpushare
|
||||
component: gpushare-schd-extender
|
@@ -0,0 +1,67 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
component: kube-scheduler
|
||||
tier: control-plane
|
||||
name: kube-scheduler
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- kube-scheduler
|
||||
- --authentication-kubeconfig=/etc/kubernetes/scheduler.conf
|
||||
- --authorization-kubeconfig=/etc/kubernetes/scheduler.conf
|
||||
- --bind-address=127.0.0.1
|
||||
- --kubeconfig=/etc/kubernetes/scheduler.conf
|
||||
- --leader-elect=true
|
||||
- --config=/etc/kubernetes/scheduler-policy-config.yaml
|
||||
image: k8s.gcr.io/kube-scheduler:v1.23.3
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 8
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 10259
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 15
|
||||
name: kube-scheduler
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
startupProbe:
|
||||
failureThreshold: 24
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 10259
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 15
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/scheduler.conf
|
||||
name: kubeconfig
|
||||
readOnly: true
|
||||
- mountPath: /etc/kubernetes/scheduler-policy-config.yaml
|
||||
name: scheduler-policy-config
|
||||
readOnly: true
|
||||
hostNetwork: true
|
||||
priorityClassName: system-node-critical
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/scheduler.conf
|
||||
type: FileOrCreate
|
||||
name: kubeconfig
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/scheduler-policy-config.yaml
|
||||
type: FileOrCreate
|
||||
name: scheduler-policy-config
|
||||
status: {}
|
59
gpushare-scheduler-extender/config/kube-scheduler.yaml
Normal file
59
gpushare-scheduler-extender/config/kube-scheduler.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ""
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
component: kube-scheduler
|
||||
tier: control-plane
|
||||
name: kube-scheduler
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- kube-scheduler
|
||||
- --address=127.0.0.1
|
||||
- --kubeconfig=/etc/kubernetes/scheduler.conf
|
||||
- --policy-config-file=/etc/kubernetes/scheduler-policy-config.json
|
||||
- --leader-elect=true
|
||||
image: registry.cn-hangzhou.aliyuncs.com/acs/kube-scheduler-amd64:v1.11.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 8
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 10251
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: kube-scheduler
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/scheduler.conf
|
||||
name: kubeconfig
|
||||
readOnly: true
|
||||
- mountPath: /etc/kubernetes/scheduler-policy-config.json
|
||||
name: scheduler-policy-config
|
||||
readOnly: true
|
||||
- mountPath: /etc/localtime
|
||||
name: localtime
|
||||
readOnly: true
|
||||
hostNetwork: true
|
||||
priorityClassName: system-cluster-critical
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/scheduler.conf
|
||||
type: FileOrCreate
|
||||
name: kubeconfig
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/scheduler-policy-config.json
|
||||
type: FileOrCreate
|
||||
name: scheduler-policy-config
|
||||
- hostPath:
|
||||
path: /etc/localtime
|
||||
type: ""
|
||||
name: localtime
|
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"kind": "Policy",
|
||||
"apiVersion": "v1",
|
||||
"extenders": [
|
||||
{
|
||||
"urlPrefix": "http://127.0.0.1:32766/gpushare-scheduler",
|
||||
"filterVerb": "filter",
|
||||
"bindVerb": "bind",
|
||||
"enableHttps": false,
|
||||
"nodeCacheCapable": true,
|
||||
"managedResources": [
|
||||
{
|
||||
"name": "aliyun.com/gpu-mem",
|
||||
"ignoredByScheduler": false
|
||||
}
|
||||
],
|
||||
"ignorable": false
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
---
|
||||
apiVersion: kubescheduler.config.k8s.io/v1beta2
|
||||
kind: KubeSchedulerConfiguration
|
||||
clientConnection:
|
||||
kubeconfig: /etc/kubernetes/scheduler.conf
|
||||
extenders:
|
||||
- urlPrefix: "http://127.0.0.1:32766/gpushare-scheduler"
|
||||
filterVerb: filter
|
||||
bindVerb: bind
|
||||
enableHTTPS: false
|
||||
nodeCacheCapable: true
|
||||
managedResources:
|
||||
- name: aliyun.com/gpu-mem
|
||||
ignoredByScheduler: false
|
||||
ignorable: false
|
Reference in New Issue
Block a user