@@ -72,21 +72,31 @@ helm_resource(
7272namespace_create ('gpu-operator' )
7373namespace_create ('nvsentinel' )
7474
75+ # Detect architecture early for KWOK node creation
76+ arch = str (local ('uname -m' )).strip ()
77+ # Normalize architecture names for Kubernetes
78+ if arch in ['arm64' , 'aarch64' ]:
79+ k8s_arch = 'arm64'
80+ elif arch in ['x86_64' , 'amd64' ]:
81+ k8s_arch = 'amd64'
82+ else :
83+ k8s_arch = 'amd64' # Default to amd64 for unknown architectures
84+
7585skip_kwok_nodes = os .getenv ('SKIP_KWOK_NODES_IN_TILT' , '0' ) == '1'
7686
7787if not skip_kwok_nodes :
7888 # Create regular GPU nodes (all NUM_GPU_NODES are regular nodes)
7989 kwok_node_template = str (read_file ('./kwok-node-template.yaml' ))
8090 for i in range (num_gpu_nodes ):
81- node_yaml = kwok_node_template .replace ('PLACEHOLDER' , str (i ))
91+ node_yaml = kwok_node_template .replace ('PLACEHOLDER' , str (i )). replace ( 'amd64' , k8s_arch )
8292 k8s_yaml (blob (node_yaml ))
8393
8494 # Create separate Kata test nodes (in addition to regular nodes)
8595 # These are named differently (kwok-kata-test-node-*) to avoid conflicts
8696 # Set NUM_KATA_TEST_NODES=0 to disable kata testing
8797 kwok_kata_test_node_template = str (read_file ('./kwok-kata-test-node-template.yaml' ))
8898 for i in range (num_kata_test_nodes ):
89- node_yaml = kwok_kata_test_node_template .replace ('PLACEHOLDER' , str (i ))
99+ node_yaml = kwok_kata_test_node_template .replace ('PLACEHOLDER' , str (i )). replace ( 'amd64' , k8s_arch )
90100 k8s_yaml (blob (node_yaml ))
91101else :
92102 print ("Skipping KWOK node creation in Tilt (SKIP_KWOK_NODES_IN_TILT=1)" )
@@ -115,8 +125,8 @@ values_files = [
115125if use_postgresql :
116126 values_files .append ('../distros/kubernetes/nvsentinel/values-tilt-postgresql.yaml' )
117127
118- arch = str ( local ( 'uname -m' )). strip ( )
119- if arch in [ 'arm64' , 'aarch64' ] :
128+ # Add ARM64-specific values if on ARM64 (arch already detected earlier )
129+ if k8s_arch == 'arm64' :
120130 values_files .append ('../distros/kubernetes/nvsentinel/values-tilt-arm64.yaml' )
121131
122132yaml = helm (
0 commit comments