Skip to content

Commit cc860fc

Browse files
author
Qingchuan Hao
authored
Fix wrongly used containerLogMaxSizeMB in customized kubelet config (Azure#3771)
* Correct containerLogMaxSizeMb to containerLogMaxSizeMB in customized kubelet config * add config test for kubeletConfig.containerLogMaxSizeMB
1 parent 9a648fc commit cc860fc

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

src/aks-preview/HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
0.5.26
7+
+++++
8+
* Correct containerLogMaxSizeMb to containerLogMaxSizeMB in customized kubelet config
9+
610
0.5.25
711
+++++
812
* Add support for http proxy

src/aks-preview/azext_aks_preview/custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3991,7 +3991,7 @@ def _get_kubelet_config(file_path):
39913991
config_object.container_log_max_files = kubelet_config.get(
39923992
"containerLogMaxFiles", None)
39933993
config_object.container_log_max_size_mb = kubelet_config.get(
3994-
"containerLogMaxSizeMb", None)
3994+
"containerLogMaxSizeMB", None)
39953995

39963996
return config_object
39973997

src/aks-preview/azext_aks_preview/tests/latest/data/kubeletconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
],
1212
"failSwapOn": false,
1313
"containerLogMaxFiles": 10,
14-
"containerLogMaxSizeMb": 20
14+
"containerLogMaxSizeMB": 20
1515
}

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,12 +1451,10 @@ def test_aks_create_with_node_config(self, resource_group, resource_group_locati
14511451
'--kubelet-config={kc_path} --linux-os-config={oc_path} --aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/CustomNodeConfigPreview -o json'
14521452
self.cmd(create_cmd, checks=[
14531453
self.check('provisioningState', 'Succeeded'),
1454-
self.check(
1455-
'agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'),
1456-
self.check(
1457-
'agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500),
1458-
self.check(
1459-
'agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True)
1454+
self.check('agentPoolProfiles[0].kubeletConfig.cpuManagerPolicy', 'static'),
1455+
self.check('agentPoolProfiles[0].kubeletConfig.containerLogMaxSizeMb', 20),
1456+
self.check('agentPoolProfiles[0].linuxOsConfig.swapFileSizeMb', 1500),
1457+
self.check('agentPoolProfiles[0].linuxOsConfig.sysctls.netIpv4TcpTwReuse', True)
14601458
])
14611459

14621460
# nodepool add
@@ -1465,6 +1463,7 @@ def test_aks_create_with_node_config(self, resource_group, resource_group_locati
14651463
self.cmd(nodepool_cmd, checks=[
14661464
self.check('provisioningState', 'Succeeded'),
14671465
self.check('kubeletConfig.cpuCfsQuotaPeriod', '200ms'),
1466+
self.check('kubeletConfig.containerLogMaxSizeMb', 20),
14681467
self.check('linuxOsConfig.sysctls.netCoreSomaxconn', 163849)
14691468
])
14701469

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from codecs import open as open1
99
from setuptools import setup, find_packages
1010

11-
VERSION = "0.5.25"
11+
VERSION = "0.5.26"
1212
CLASSIFIERS = [
1313
'Development Status :: 4 - Beta',
1414
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)