62 Star 127 Fork 121

Ascend/mind-cluster
Paused

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
ascendplugin-910.yaml 4.48 KB
Copy Edit Raw Blame History
apiVersion: v1
kind: ServiceAccount
metadata:
name: ascend-device-plugin-sa-910
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pods-node-ascend-device-plugin-role-910
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "update", "watch", "patch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "patch"]
- apiGroups: [ "" ]
resources: [ "nodes/proxy" ]
verbs: [ "get" ]
- apiGroups: [""]
resources: ["nodes/status"]
verbs: ["get", "patch", "update"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "create", "update", "list", "watch"]
- apiGroups: [ "" ]
resources: [ "events" ]
verbs: [ "create" ]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: pods-node-ascend-device-plugin-rolebinding-910
subjects:
- kind: ServiceAccount
name: ascend-device-plugin-sa-910
namespace: kube-system
roleRef:
kind: ClusterRole
name: pods-node-ascend-device-plugin-role-910
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: ascend-device-plugin-daemonset
namespace: kube-system
spec:
selector:
matchLabels:
name: ascend-device-plugin-ds
updateStrategy:
type: RollingUpdate
template:
metadata:
##### For Kubernetes versions lower than 1.19, seccomp is used with annotations.
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
seccomp.security.alpha.kubernetes.io/pod: runtime/default
labels:
name: ascend-device-plugin-ds
spec:
##### For Kubernetes version 1.19 and above, seccomp is used with securityContext:seccompProfile
# securityContext:
# seccompProfile:
# type: RuntimeDefault
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- key: huawei.com/Ascend910
operator: Exists
effect: NoSchedule
- key: "device-plugin"
operator: "Equal"
value: "v2"
effect: NoSchedule
priorityClassName: "system-node-critical"
nodeSelector:
accelerator: huawei-Ascend910
serviceAccountName: ascend-device-plugin-sa-910
containers:
- image: ascend-k8sdeviceplugin:v3.0.0
name: device-plugin-01
resources:
requests:
memory: 500Mi
cpu: 500m
limits:
memory: 500Mi
cpu: 500m
command: [ "/bin/bash", "-c", "--"]
args: [ "device-plugin -useAscendDocker=true
-logFile=/var/log/mindx-dl/devicePlugin/devicePlugin.log -logLevel=0" ]
securityContext:
privileged: true
readOnlyRootFilesystem: true
imagePullPolicy: Never
volumeMounts:
- name: device-plugin
mountPath: /var/lib/kubelet/device-plugins
- name: pod-resource
mountPath: /var/lib/kubelet/pod-resources
- name: hiai-driver
mountPath: /usr/local/Ascend/driver
readOnly: true
- name: log-path
mountPath: /var/log/mindx-dl/devicePlugin
- name: tmp
mountPath: /tmp
- name: lingqu-log
mountPath: /var/log/lingqu
- name: localtime
mountPath: /etc/localtime
readOnly: true
- name: data-trace-file-dir
mountPath: /user/cluster-info/datatrace-config
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumes:
- name: device-plugin
hostPath:
path: /var/lib/kubelet/device-plugins
- name: pod-resource
hostPath:
path: /var/lib/kubelet/pod-resources
- name: hiai-driver
hostPath:
path: /usr/local/Ascend/driver
- name: log-path
hostPath:
path: /var/log/mindx-dl/devicePlugin
type: Directory
- name: data-trace-file-dir
hostPath:
path: /user/cluster-info/datatrace-config
type: DirectoryOrCreate
- name: tmp
hostPath:
path: /tmp
- name: lingqu-log
hostPath:
path: /var/log/lingqu
type: DirectoryOrCreate
- name: localtime
hostPath:
path: /etc/localtime
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/ascend/mind-cluster.git
git@gitee.com:ascend/mind-cluster.git
ascend
mind-cluster
mind-cluster
master

Search