fix CPUManagerReconcilePeriod field is not allowed 0

Signed-off-by: rongfu.leng <lenronfu@gmail.com>
This commit is contained in:
rongfu.leng 2024-09-18 23:54:24 +08:00
parent 30226e6c92
commit 0c753d1cb9

View File

@ -101,7 +101,7 @@ clusterDNS:
- 192.168.1.5 - 192.168.1.5
- 192.168.1.8 - 192.168.1.8
port: 8080 port: 8080
cpuManagerReconcilePeriod: 0s cpuManagerReconcilePeriod: 1s
systemReserved: systemReserved:
memory: 2Gi memory: 2Gi
authorization: authorization:
@ -145,7 +145,7 @@ featureGates:
} }
initialConfig.ClusterDNS = []string{"192.168.1.1", "192.168.1.5", "192.168.1.8"} // overridden by slice in second file. initialConfig.ClusterDNS = []string{"192.168.1.1", "192.168.1.5", "192.168.1.8"} // overridden by slice in second file.
// This value was explicitly set in the drop-in, make sure it is retained // This value was explicitly set in the drop-in, make sure it is retained
initialConfig.CPUManagerReconcilePeriod = metav1.Duration{Duration: time.Duration(0)} initialConfig.CPUManagerReconcilePeriod = metav1.Duration{Duration: time.Second}
// Meanwhile, this value was not explicitly set, but could have been overridden by a "default" of 0 for the type. // Meanwhile, this value was not explicitly set, but could have been overridden by a "default" of 0 for the type.
// Ensure the true default persists. // Ensure the true default persists.
initialConfig.CPUCFSQuotaPeriod = metav1.Duration{Duration: time.Duration(100000000)} initialConfig.CPUCFSQuotaPeriod = metav1.Duration{Duration: time.Duration(100000000)}