Skip to content

Commit 7454fd8

Browse files
committed
Prevent Nvidia DaemonSet from running on CPU instances
1 parent 6c9750d commit 7454fd8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cortex.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@ function install_cortex() {
171171
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
172172
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
173173
-e CORTEX_CLUSTER=$CORTEX_CLUSTER \
174+
-e CORTEX_REGION=$CORTEX_REGION \
174175
-e CORTEX_NAMESPACE=$CORTEX_NAMESPACE \
176+
-e CORTEX_NODE_TYPE=$CORTEX_NODE_TYPE \
175177
-e CORTEX_LOG_GROUP=$CORTEX_LOG_GROUP \
176178
-e CORTEX_BUCKET=$CORTEX_BUCKET \
177-
-e CORTEX_REGION=$CORTEX_REGION \
178179
-e CORTEX_IMAGE_ARGO_CONTROLLER=$CORTEX_IMAGE_ARGO_CONTROLLER \
179180
-e CORTEX_IMAGE_ARGO_EXECUTOR=$CORTEX_IMAGE_ARGO_EXECUTOR \
180181
-e CORTEX_IMAGE_FLUENTD=$CORTEX_IMAGE_FLUENTD \

manager/install_cortex.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ envsubst < manifests/fluentd.yaml | kubectl apply -f - >/dev/null
176176
envsubst < manifests/operator.yaml | kubectl apply -f - >/dev/null
177177
envsubst < manifests/cluster-autoscaler.yaml | kubectl apply -f - >/dev/null
178178
envsubst < manifests/metrics-server.yaml | kubectl apply -f - >/dev/null
179-
envsubst < manifests/nvidia.yaml | kubectl apply -f - >/dev/null
179+
180+
instance_prefix=$(echo $CORTEX_NODE_TYPE | cut -c1-2)
181+
if [ "$instance_prefix" = "p2" ] || [ "$instance_prefix" = "p3" ] || [ "$instance_prefix" = "g3" ]; then
182+
envsubst < manifests/nvidia.yaml | kubectl apply -f - >/dev/null
183+
fi
180184

181185
validate_cortex

0 commit comments

Comments
 (0)