This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 558
Fix kubeletConfig for Windows agent nodes #3753
Merged
jackfrancis
merged 6 commits into
Azure:master
from
PatrickLang:patricklang-2627-squashed
Aug 30, 2018
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
fdeba54
Starting cleanup of kubelet args
ce48c14
Fixing more static parameters
33ddbd7
Fixing #3747 by setting --client-ca-file
9ba0cd3
Removing duplicate kubelet options that were already addedin defaults…
9c2c34e
Fix #3266 - Node labels don't get applied to Windows nodes
4f1b502
Adding example
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,24 @@ func setKubeletConfig(cs *api.ContainerService) { | |
"--keep-terminated-pod-volumes": "false", | ||
} | ||
|
||
// Start with copy of Linux config | ||
staticWindowsKubeletConfig := make(map[string]string) | ||
for key, val := range staticLinuxKubeletConfig { | ||
staticWindowsKubeletConfig[key] = val | ||
} | ||
|
||
// Add Windows-specific overrides | ||
// Eventually paths should not be hardcoded here. They should be relative to $global:KubeDir in the PowerShell script | ||
staticWindowsKubeletConfig["--azure-container-registry-config"] = "c:\\k\\azure.json" | ||
staticWindowsKubeletConfig["--pod-infra-container-image"] = "kubletwin/pause" | ||
staticWindowsKubeletConfig["--kubeconfig"] = "c:\\k\\config" | ||
staticWindowsKubeletConfig["--cloud-config"] = "c:\\k\\azure.json" | ||
staticWindowsKubeletConfig["--cgroups-per-qos"] = "false" | ||
staticWindowsKubeletConfig["--enforce-node-allocatable"] = "\"\"" | ||
staticWindowsKubeletConfig["--enforce-node-allocatable"] = "\"\"\"\"" | ||
staticWindowsKubeletConfig["--client-ca-file"] = "c:\\k\\ca.crt" | ||
staticWindowsKubeletConfig["--hairpin-mode"] = "promiscuous-bridge" | ||
staticWindowsKubeletConfig["--image-pull-progress-deadline"] = "20m" | ||
staticWindowsKubeletConfig["--resolv-conf"] = "\"\"\"\"" | ||
|
||
// Default Kubelet config | ||
defaultKubeletConfig := map[string]string{ | ||
|
@@ -136,6 +144,11 @@ func setKubeletConfig(cs *api.ContainerService) { | |
} | ||
setMissingKubeletValues(profile.KubernetesConfig, o.KubernetesConfig.KubeletConfig) | ||
|
||
if profile.OSType == "Windows" { | ||
// Remove Linux-specific values | ||
delete(profile.KubernetesConfig.KubeletConfig, "--pod-manifest-path") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha. I wonder if we should do this for Linux as well. Instead of this recent change that @tariq1890 made: |
||
} | ||
|
||
// For N Series (GPU) VMs | ||
if strings.Contains(profile.VMSize, "Standard_N") { | ||
if !cs.Properties.IsNVIDIADevicePluginEnabled() && !common.IsKubernetesVersionGe(o.OrchestratorVersion, "1.11.0") { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's like an escape room. You escape one just to find you must escape another.