Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion templates/cluster-template-machinepool-windows.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion templates/cluster-template-windows-apiserver-ilb.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion templates/cluster-template-windows.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@ spec:
preKubeadmCommands:
- powershell c:/create-external-network.ps1
postKubeadmCommands:
- nssm set kubelet start SERVICE_AUTO_START
- powershell C:/KubeletRestart_nssm_sc.ps1
- powershell C:/defender-exclude-calico.ps1
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data["local_hostname"] }}'
criSocket: npipe:////./pipe/containerd-containerd
kubeletExtraArgs:
cloud-provider: external
register-with-taints: node.cloudprovider.kubernetes.io/uninitialized=true:NoSchedule
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to add this here since the kubelet always adds this when cloud-provider=external:

https://github.com/kubernetes/kubernetes/blob/v1.34.2/pkg/kubelet/kubelet_node_status.go#L337-L345

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not seeing this taint, then that must be a sign that the kubelet isn't starting properly.

files:
- contentFrom:
secret:
Expand All @@ -67,6 +68,21 @@ spec:
owner: root:root
path: c:/k/azure.json
permissions: "0644"
- content: |
# This script restarts the kubelet service.
# It supports both nssm and Windows service configurations,
# ensuring a smooth transition between service managers without interruption.
# This script will eventually be removed once nssm is no longer used.
$scriptPath = "$env:SYSTEMDRIVE/k/RestartKubelet.ps1"
if (Test-Path $scriptPath) {
Write-Host "Found RestartKubelet.ps1, executing..."
& $scriptPath
} else {
Write-Host "RestartKubelet.ps1 not found. Running fallback command..."
& "$env:SYSTEMDRIVE\k\nssm.exe" set kubelet start SERVICE_AUTO_START
}
path: C:/KubeletRestart_nssm_sc.ps1
permissions: "0744"
- path: C:/defender-exclude-calico.ps1
permissions: "0744"
content: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,15 @@ spec:
- ${AZURE_SSH_PUBLIC_KEY:=""}
preKubeadmCommands: []
postKubeadmCommands:
- nssm set kubelet start SERVICE_AUTO_START
- powershell C:/KubeletRestart_nssm_sc.ps1
- powershell C:/defender-exclude-calico.ps1
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data["local_hostname"] }}'
criSocket: npipe:////./pipe/containerd-containerd
kubeletExtraArgs:
cloud-provider: external
register-with-taints: node.cloudprovider.kubernetes.io/uninitialized=true:NoSchedule
v: "2"
windows-priorityclass: "ABOVE_NORMAL_PRIORITY_CLASS"
files:
Expand All @@ -77,6 +78,21 @@ spec:
owner: root:root
path: c:/k/azure.json
permissions: "0644"
- content: |
# This script restarts the kubelet service.
# It supports both nssm and Windows service configurations,
# ensuring a smooth transition between service managers without interruption.
# This script will eventually be removed once nssm is no longer used.
$scriptPath = "$env:SYSTEMDRIVE/k/RestartKubelet.ps1"
if (Test-Path $scriptPath) {
Write-Host "Found RestartKubelet.ps1, executing..."
& $scriptPath
} else {
Write-Host "RestartKubelet.ps1 not found. Running fallback command..."
& "$env:SYSTEMDRIVE\k\nssm.exe" set kubelet start SERVICE_AUTO_START
}
path: C:/KubeletRestart_nssm_sc.ps1
permissions: "0744"
- path: C:/defender-exclude-calico.ps1
permissions: "0744"
content: |-
Expand Down
20 changes: 18 additions & 2 deletions templates/flavors/windows/machine-deployment-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,17 @@ spec:
- ${AZURE_SSH_PUBLIC_KEY:=""}
preKubeadmCommands: []
postKubeadmCommands:
- nssm set kubelet start SERVICE_AUTO_START
- powershell C:/KubeletRestart_nssm_sc.ps1
- powershell C:/defender-exclude-calico.ps1
joinConfiguration:
nodeRegistration:
name: '{{ ds.meta_data["local_hostname"] }}'
criSocket: npipe:////./pipe/containerd-containerd
kubeletExtraArgs:
cloud-provider: external
register-with-taints: node.cloudprovider.kubernetes.io/uninitialized=true:NoSchedule
v: "2"
windows-priorityclass: "ABOVE_NORMAL_PRIORITY_CLASS"
windows-priorityclass: ABOVE_NORMAL_PRIORITY_CLASS
files:
- contentFrom:
secret:
Expand All @@ -77,6 +78,21 @@ spec:
owner: root:root
path: c:/k/azure.json
permissions: "0644"
- content: |
# This script restarts the kubelet service.
# It supports both nssm and Windows service configurations,
# ensuring a smooth transition between service managers without interruption.
# This script will eventually be removed once nssm is no longer used.
$scriptPath = "$env:SYSTEMDRIVE/k/RestartKubelet.ps1"
if (Test-Path $scriptPath) {
Write-Host "Found RestartKubelet.ps1, executing..."
& $scriptPath
} else {
Write-Host "RestartKubelet.ps1 not found. Running fallback command..."
& "$env:SYSTEMDRIVE\k\nssm.exe" set kubelet start SERVICE_AUTO_START
}
path: C:/KubeletRestart_nssm_sc.ps1
permissions: "0744"
- path: C:/defender-exclude-calico.ps1
permissions: "0744"
content: |-
Expand Down
18 changes: 17 additions & 1 deletion templates/test/ci/cluster-template-prow-ci-version-windows.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading