Skip to content

Commit

Permalink
Fix wrongly used containerLogMaxSizeMB in customized kubelet config (#…
Browse files Browse the repository at this point in the history
…3771)

* Correct containerLogMaxSizeMb to containerLogMaxSizeMB in customized kubelet config

* add config test for kubeletConfig.containerLogMaxSizeMB
  • Loading branch information
Qingchuan Hao authored Aug 12, 2021
1 parent 9a648fc commit cc860fc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 4 additions & 0 deletions src/aks-preview/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.5.26
+++++
* Correct containerLogMaxSizeMb to containerLogMaxSizeMB in customized kubelet config

0.5.25
+++++
* Add support for http proxy
Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/azext_aks_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3991,7 +3991,7 @@ def _get_kubelet_config(file_path):
config_object.container_log_max_files = kubelet_config.get(
"containerLogMaxFiles", None)
config_object.container_log_max_size_mb = kubelet_config.get(
"containerLogMaxSizeMb", None)
"containerLogMaxSizeMB", None)

return config_object

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"failSwapOn": false,
"containerLogMaxFiles": 10,
"containerLogMaxSizeMb": 20
"containerLogMaxSizeMB": 20
}
Original file line number Diff line number Diff line change
Expand Up @@ -1451,12 +1451,10 @@ def test_aks_create_with_node_config(self, resource_group, resource_group_locati
'--kubelet-config={kc_path} --linux-os-config={oc_path} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview -o json'
self.cmd(create_cmd, checks=[
self.check('provisioningState', 'Succeeded'),
self.check(
'agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'),
self.check(
'agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500),
self.check(
'agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True)
self.check('agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'),
self.check('agentPoolProfiles[0].kubeletConfig.containerLogMaxSizeMb', 20),
self.check('agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500),
self.check('agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True)
])

# nodepool add
Expand All @@ -1465,6 +1463,7 @@ def test_aks_create_with_node_config(self, resource_group, resource_group_locati
self.cmd(nodepool_cmd, checks=[
self.check('provisioningState', 'Succeeded'),
self.check('kubeletConfig.cpuCfsQuotaPeriod', '200ms'),
self.check('kubeletConfig.containerLogMaxSizeMb', 20),
self.check('linuxOsConfig.sysctls.netCoreSomaxconn', 163849)
])

Expand Down
2 changes: 1 addition & 1 deletion src/aks-preview/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from codecs import open as open1
from setuptools import setup, find_packages

VERSION = "0.5.25"
VERSION = "0.5.26"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down

0 comments on commit cc860fc

Please sign in to comment.