-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add time slicing manifest to gpu resource in development cluster (#4419)
* add slicing manefest * update gpu-slicing * linter fix --------- Co-authored-by: Emterry <emma.terry@digital.justice.gov.uk> Co-authored-by: Emterry <123941245+Emterry@users.noreply.github.com>
- Loading branch information
1 parent
358ac78
commit 3635d2a
Showing
6 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
terraform/aws/analytical-platform-development/cluster/kubernetes-manifests.tf
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 |
---|---|---|
@@ -1,3 +1,19 @@ | ||
resource "kubernetes_manifest" "nvidia_device_plugin" { | ||
manifest = yamldecode(file("src/kubernetes/nvidia-device-plugin.yml")) | ||
} | ||
|
||
resource "kubernetes_manifest" "nvidia_gpu_slicing" { | ||
manifest = yamldecode(file("src/kubernetes/nvidia-gpu-slicing.yml")) | ||
} | ||
|
||
resource "kubernetes_manifest" "nvidia_cluster_role" { | ||
manifest = yamldecode(file("src/kubernetes/nvidia-cluster-role.yml")) | ||
} | ||
|
||
resource "kubernetes_manifest" "nvidia_cluster_role_binding" { | ||
manifest = yamldecode(file("src/kubernetes/nvidia-cluster-role-binding.yml")) | ||
} | ||
|
||
resource "kubernetes_manifest" "nvidia_service_account" { | ||
manifest = yamldecode(file("src/kubernetes/nvidia-service-account.yml")) | ||
} |
13 changes: 13 additions & 0 deletions
13
...ws/analytical-platform-development/cluster/src/kubernetes/nvidia-cluster-role-binding.yml
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: ClusterRoleBinding | ||
metadata: | ||
name: nvidia-device-plugin-daemonset-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: nvidia-device-plugin-daemonset-service-account | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: nvidia-device-plugin-daemonset-role | ||
apiGroup: rbac.authorization.k8s.io |
9 changes: 9 additions & 0 deletions
9
terraform/aws/analytical-platform-development/cluster/src/kubernetes/nvidia-cluster-role.yml
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,9 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: nvidia-device-plugin-daemonset-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "list", "watch"] |
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
16 changes: 16 additions & 0 deletions
16
terraform/aws/analytical-platform-development/cluster/src/kubernetes/nvidia-gpu-slicing.yml
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 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: nvidia-device-plugin-daemonset | ||
namespace: kube-system | ||
data: | ||
any: |- | ||
version: v1 | ||
flags: | ||
migStrategy: none | ||
sharing: | ||
timeSlicing: | ||
resources: | ||
- name: nvidia.com/gpu | ||
replicas: 4 |
6 changes: 6 additions & 0 deletions
6
...orm/aws/analytical-platform-development/cluster/src/kubernetes/nvidia-service-account.yml
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: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: nvidia-device-plugin-daemonset-service-account | ||
namespace: kube-system |