@@ -84,42 +84,36 @@ jobs:
8484
8585 KIND_CONFIG_FILE=${TEMP_DIR}/kind.yaml
8686
87- # Create KIND config with 1 worker node
88- cat > ${KIND_CONFIG_FILE} <<'EOF'
89- kind : Cluster
90- apiVersion : kind.x-k8s.io/v1alpha4
91- containerdConfigPatches :
92- - |-
93- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."REGISTRY_PLACEHOLDER"]
94- endpoint = ["http://REGISTRY_PLACEHOLDER"]
95- nodes :
96- - role : control-plane
97- image : NODE_IMAGE_PLACEHOLDER
98- kubeadmConfigPatches :
99- - |
100- kind: InitConfiguration
101- nodeRegistration:
102- kubeletExtraArgs:
103- node-labels: "ingress-ready=true"
104- extraPortMappings :
105- - containerPort : 80
106- hostPort : 80
107- protocol : TCP
108- - containerPort : 443
109- hostPort : 443
110- protocol : TCP
111- - role : worker
112- image : NODE_IMAGE_PLACEHOLDER
113- labels :
114- worker-1 : true
115- extraMounts :
116- - hostPath : /dev/null
117- containerPath : /var/run/nvidia-container-devices/all
118- EOF
119-
120- # Replace placeholders with actual values
121- sed -i "s|REGISTRY_PLACEHOLDER|${REGISTRY_ADDRESS}|g" ${KIND_CONFIG_FILE}
122- sed -i "s|NODE_IMAGE_PLACEHOLDER|${NODE_IMAGE}|g" ${KIND_CONFIG_FILE}
87+ # Create KIND config with 1 worker node
88+ echo "kind: Cluster" > ${KIND_CONFIG_FILE}
89+ echo "apiVersion: kind.x-k8s.io/v1alpha4" >> ${KIND_CONFIG_FILE}
90+ echo "containerdConfigPatches:" >> ${KIND_CONFIG_FILE}
91+ echo "- |-" >> ${KIND_CONFIG_FILE}
92+ echo " [plugins.\"io.containerd.grpc.v1.cri\".registry.mirrors.\"${REGISTRY_ADDRESS}\"]" >> ${KIND_CONFIG_FILE}
93+ echo " endpoint = [\"http://${REGISTRY_ADDRESS}\"]" >> ${KIND_CONFIG_FILE}
94+ echo "nodes:" >> ${KIND_CONFIG_FILE}
95+ echo "- role: control-plane" >> ${KIND_CONFIG_FILE}
96+ echo " image: ${NODE_IMAGE}" >> ${KIND_CONFIG_FILE}
97+ echo " kubeadmConfigPatches:" >> ${KIND_CONFIG_FILE}
98+ echo " - |" >> ${KIND_CONFIG_FILE}
99+ echo " kind: InitConfiguration" >> ${KIND_CONFIG_FILE}
100+ echo " nodeRegistration:" >> ${KIND_CONFIG_FILE}
101+ echo " kubeletExtraArgs:" >> ${KIND_CONFIG_FILE}
102+ echo " node-labels: \"ingress-ready=true\"" >> ${KIND_CONFIG_FILE}
103+ echo " extraPortMappings:" >> ${KIND_CONFIG_FILE}
104+ echo " - containerPort: 80" >> ${KIND_CONFIG_FILE}
105+ echo " hostPort: 80" >> ${KIND_CONFIG_FILE}
106+ echo " protocol: TCP" >> ${KIND_CONFIG_FILE}
107+ echo " - containerPort: 443" >> ${KIND_CONFIG_FILE}
108+ echo " hostPort: 443" >> ${KIND_CONFIG_FILE}
109+ echo " protocol: TCP" >> ${KIND_CONFIG_FILE}
110+ echo "- role: worker" >> ${KIND_CONFIG_FILE}
111+ echo " image: ${NODE_IMAGE}" >> ${KIND_CONFIG_FILE}
112+ echo " labels:" >> ${KIND_CONFIG_FILE}
113+ echo " worker-1: true" >> ${KIND_CONFIG_FILE}
114+ echo " extraMounts:" >> ${KIND_CONFIG_FILE}
115+ echo " - hostPath: /dev/null" >> ${KIND_CONFIG_FILE}
116+ echo " containerPath: /var/run/nvidia-container-devices/all" >> ${KIND_CONFIG_FILE}
123117
124118 echo "KIND_CONFIG_FILE=${KIND_CONFIG_FILE}" >> $GITHUB_ENV
125119
0 commit comments