set the time slicing config in the nvidia chart values[ci skip]
This commit is contained in:
parent
10ab0d7c40
commit
8af9e6b5bd
3 changed files with 10 additions and 5 deletions
|
|
@ -93,6 +93,7 @@ resource "kubernetes_deployment" "pgbouncer" {
|
|||
}
|
||||
}
|
||||
}
|
||||
depends_on = [kubernetes_secret.pgbouncer_auth]
|
||||
}
|
||||
|
||||
# --- 4️⃣ Service ---
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ resource "kubernetes_namespace" "nvidia" {
|
|||
}
|
||||
}
|
||||
|
||||
# Apply to operator with:
|
||||
# [not needed anymore; part of the chart values] Apply to operator with:
|
||||
# kubectl patch clusterpolicies.nvidia.com/cluster-policy -n gpu-operator --type merge -p '{"spec": {"devicePlugin": {"config": {"name": "time-slicing-config", "default": "any"}}}}'
|
||||
|
||||
resource "kubernetes_config_map" "time_slicing_config" {
|
||||
|
|
@ -37,6 +37,7 @@ resource "kubernetes_config_map" "time_slicing_config" {
|
|||
replicas: 10
|
||||
EOF
|
||||
}
|
||||
depends_on = [kubernetes_namespace.nvidia]
|
||||
}
|
||||
|
||||
resource "helm_release" "nvidia-gpu-operator" {
|
||||
|
|
@ -49,7 +50,8 @@ resource "helm_release" "nvidia-gpu-operator" {
|
|||
# version = "0.9.3"
|
||||
timeout = 6000
|
||||
|
||||
values = [templatefile("${path.module}/values.yaml", {})]
|
||||
values = [templatefile("${path.module}/values.yaml", {})]
|
||||
depends_on = [kubernetes_config_map.time_slicing_config]
|
||||
}
|
||||
|
||||
resource "kubernetes_deployment" "nvidia-exporter" {
|
||||
|
|
@ -83,9 +85,6 @@ resource "kubernetes_deployment" "nvidia-exporter" {
|
|||
port {
|
||||
container_port = 9400
|
||||
}
|
||||
port {
|
||||
container_port = 9400
|
||||
}
|
||||
security_context {
|
||||
privileged = true
|
||||
capabilities {
|
||||
|
|
@ -101,6 +100,7 @@ resource "kubernetes_deployment" "nvidia-exporter" {
|
|||
}
|
||||
}
|
||||
}
|
||||
depends_on = [helm_release.nvidia-gpu-operator]
|
||||
}
|
||||
|
||||
resource "kubernetes_service" "nvidia-exporter" {
|
||||
|
|
|
|||
|
|
@ -13,3 +13,7 @@ driver:
|
|||
version: "570.195.03" # CUDA 12.8
|
||||
upgradePolicy:
|
||||
autoUpgrade: false
|
||||
|
||||
devicePlugin:
|
||||
config:
|
||||
name: time-slicing-config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue