Update comments and error messages

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2023-02-17 09:26:41 -08:00
parent d9e2487d0c
commit 19d9405a1c
5 changed files with 10 additions and 3 deletions

View File

@ -58146,7 +58146,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
},
"podLogsDir": {
SchemaProps: spec.SchemaProps{
Description: "podLogsDir is a custom root directory path kubelet will use to place pod's log files. Default: \"/var/log/pods\"",
Description: "podLogsDir is a custom root directory path kubelet will use to place pod's log files. Default: \"/var/log/pods/\" Note: it is not recommended to use the temp folder as a log directory as it may cause unexpected behavior in many places.",
Type: []string{"string"},
Format: "",
},

View File

@ -89,6 +89,9 @@ type KubeletConfiguration struct {
// run, or the path to a single static pod file.
StaticPodPath string
// podLogsDir is a custom root directory path kubelet will use to place pod's log files.
// Default: "/var/log/pods/"
// Note: it is not recommended to use the temp folder as a log directory as it may cause
// unexpected behavior in many places.
PodLogsDir string
// syncFrequency is the max period between synchronizing running
// containers and config

View File

@ -256,6 +256,8 @@ func TestSetDefaultsKubeletConfiguration(t *testing.T) {
EnableDebugFlagsHandler: utilpointer.Bool(false),
SeccompDefault: utilpointer.Bool(false),
MemoryThrottlingFactor: utilpointer.Float64(0),
RegisterNode: utilpointer.Bool(false),
LocalStorageCapacityIsolation: utilpointer.Bool(false),
PodLogsDir: "",
},
&v1beta1.KubeletConfiguration{

View File

@ -44,7 +44,7 @@ func TestGeneratePodSandboxConfig(t *testing.T) {
require.NoError(t, err)
pod := newTestPod()
expectedLogDirectory := filepath.Join(testPodLogsRootDirectory, pod.Namespace+"_"+pod.Name+"_12345678")
expectedLogDirectory := filepath.Join(testPodLogsDirectory, pod.Namespace+"_"+pod.Name+"_12345678")
expectedLabels := map[string]string{
"io.kubernetes.pod.name": pod.Name,
"io.kubernetes.pod.namespace": pod.Namespace,

View File

@ -99,7 +99,9 @@ type KubeletConfiguration struct {
// +optional
StaticPodPath string `json:"staticPodPath,omitempty"`
// podLogsDir is a custom root directory path kubelet will use to place pod's log files.
// Default: "/var/log/pods"
// Default: "/var/log/pods/"
// Note: it is not recommended to use the temp folder as a log directory as it may cause
// unexpected behavior in many places.
// +optional
PodLogsDir string `json:"podLogsDir,omitempty"`
// syncFrequency is the max period between synchronizing running