-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from run-ai/erez/kwok-fake-node-updater-RUN-19999
adding status updater / device plugin for kwok nodes
- Loading branch information
Showing
18 changed files
with
541 additions
and
43 deletions.
There are no files selected for viewing
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
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
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,16 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/run-ai/fake-gpu-operator/internal/common/app" | ||
"github.com/run-ai/fake-gpu-operator/internal/common/config" | ||
"github.com/run-ai/fake-gpu-operator/internal/common/constants" | ||
status_updater "github.com/run-ai/fake-gpu-operator/internal/kwok-gpu-device-plugin" | ||
) | ||
|
||
func main() { | ||
requiredEnvVars := []string{constants.EnvTopologyCmName, constants.EnvTopologyCmNamespace, constants.EnvFakeGpuOperatorNs} | ||
config.ValidateConfig(requiredEnvVars) | ||
|
||
appRunner := app.NewAppRunner(&status_updater.KWOKDevicePluginApp{}) | ||
appRunner.Run() | ||
} |
16 changes: 0 additions & 16 deletions
16
deploy/fake-gpu-operator/templates/device-plugin/deployment-template.yaml
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/clusterrole.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,26 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: fake-kwok-gpu-device-plugin | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
- nodes/status | ||
verbs: | ||
- update | ||
- list | ||
- get | ||
- watch | ||
- patch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- get | ||
- update | ||
- create | ||
- list | ||
- delete |
12 changes: 12 additions & 0 deletions
12
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/clusterrolebinding.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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: fake-kwok-gpu-device-plugin | ||
roleRef: | ||
kind: ClusterRole | ||
apiGroup: rbac.authorization.k8s.io | ||
name: fake-kwok-gpu-device-plugin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kwok-gpu-device-plugin | ||
namespace: "{{ .Release.Namespace }}" |
39 changes: 39 additions & 0 deletions
39
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/deployment.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,39 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kwok-gpu-device-plugin | ||
annotations: | ||
checksum/topology: {{ include (print $.Template.BasePath "/topology-cm.yml") . | sha256sum }} | ||
labels: | ||
app: kwok-gpu-device-plugin | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: kwok-gpu-device-plugin | ||
component: kwok-gpu-device-plugin | ||
replicas: 1 | ||
template: | ||
metadata: | ||
annotations: | ||
checksum/topology: {{ include (print $.Template.BasePath "/topology-cm.yml") . | sha256sum }} | ||
labels: | ||
app: kwok-gpu-device-plugin | ||
component: kwok-gpu-device-plugin | ||
spec: | ||
containers: | ||
- name: kwok-gpu-device-plugin | ||
image: "{{ .Values.kwokGpuDevicePlugin.image.repository }}:{{ .Values.kwokGpuDevicePlugin.image.tag }}" | ||
imagePullPolicy: "{{ .Values.kwokGpuDevicePlugin.image.pullPolicy }}" | ||
resources: | ||
{{- toYaml .Values.kwokGpuDevicePlugin.resources | nindent 12 }} | ||
env: | ||
- name: TOPOLOGY_CM_NAME | ||
value: topology | ||
- name: TOPOLOGY_CM_NAMESPACE | ||
value: "{{ .Release.Namespace }}" | ||
- name: FAKE_GPU_OPERATOR_NAMESPACE | ||
value: "{{ .Release.Namespace }}" | ||
restartPolicy: Always | ||
serviceAccountName: kwok-gpu-device-plugin | ||
imagePullSecrets: | ||
- name: gcr-secret |
13 changes: 13 additions & 0 deletions
13
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/role.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,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: fake-kwok-gpu-device-plugin | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- list | ||
- get | ||
- watch |
12 changes: 12 additions & 0 deletions
12
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/rolebinding.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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: fake-kwok-gpu-device-plugin | ||
roleRef: | ||
kind: Role | ||
apiGroup: rbac.authorization.k8s.io | ||
name: fake-kwok-gpu-device-plugin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kwok-gpu-device-plugin | ||
namespace: "{{ .Release.Namespace }}" |
4 changes: 4 additions & 0 deletions
4
deploy/fake-gpu-operator/templates/kwok-gpu-device-plugin/serviceaccount.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,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kwok-gpu-device-plugin |
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
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
Oops, something went wrong.