Skip to content

Commit 6732778

Browse files
committed
add node-accelerators flag
1 parent 955b996 commit 6732778

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

kubetest2-gce/deployer/common.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ func (d *deployer) buildEnv() []string {
146146
// target the right network
147147
env = append(env, fmt.Sprintf("NETWORK=%s", d.network))
148148

149+
// NODE_ACCELERATORS is used by kube-up.sh script to set type and number of GPUs
150+
env = append(env, fmt.Sprintf("NODE_ACCELERATORS=%s", d.NodeAccelerators))
151+
149152
if d.EnableCacheMutationDetector {
150153
env = append(env, "ENABLE_CACHE_MUTATION_DETECTOR=true")
151154
}

kubetest2-gce/deployer/deployer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ type deployer struct {
9191
CreateCustomNetwork bool `desc:"Sets the environment variable CREATE_CUSTOM_NETWORK=true during deployment."`
9292
NodeScopes string `desc:"Sets the NODE_SCOPES environment variable during deployment."`
9393
NodeServiceAccount string `desc:"Sets the KUBE_GCE_NODE_SERVICE_ACCOUNT environment variable during deployment."`
94+
NodeAccelerators string `desc:"Sets the NODE_ACCELERATORS environment variable during deployment."`
9495
CloudProvider string `desc:"Sets the CLOUD_PROVIDER environment variable during deployment."`
9596
FeatureGates string `desc:"Sets the KUBE_FEATURE_GATES environment variable during deployment."`
9697

0 commit comments

Comments
 (0)