mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
api: Add EnableNodeLogQuery to KubeletConfiguration
Added EnableNodeLogQuery field to kubelet/apis/config/types.go and staging/src/k8s.io/kubelet/config/v1beta1/types.go, then executed. `hack/update-codegen.sh`. This new field will default to off and will need to be explicitly enabled in addition to the NodeLogQuery gate to use the feature.
This commit is contained in:
parent
d52cbd4a5a
commit
aadad09410
7
pkg/generated/openapi/zz_generated.openapi.go
generated
7
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -58282,6 +58282,13 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"enableSystemLogQuery": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "enableSystemLogQuery enables the node log query feature on the /logs endpoint. EnableSystemLogHandler has to be enabled in addition for this feature to work. Default: false",
|
||||
Type: []string{"boolean"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"shutdownGracePeriod": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "shutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown. Default: \"0s\"",
|
||||
|
@ -55,6 +55,7 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
|
||||
obj.EventRecordQPS = 5
|
||||
obj.EnableControllerAttachDetach = true
|
||||
obj.EnableDebuggingHandlers = true
|
||||
obj.EnableSystemLogQuery = false
|
||||
obj.FileCheckFrequency = metav1.Duration{Duration: 20 * time.Second}
|
||||
obj.HealthzBindAddress = "127.0.0.1"
|
||||
obj.HealthzPort = 10248
|
||||
|
@ -190,6 +190,7 @@ var (
|
||||
"EnableControllerAttachDetach",
|
||||
"EnableDebugFlagsHandler",
|
||||
"EnableDebuggingHandlers",
|
||||
"EnableSystemLogQuery",
|
||||
"EnableProfilingHandler",
|
||||
"EnableServer",
|
||||
"EnableSystemLogHandler",
|
||||
|
@ -29,6 +29,7 @@ enableDebuggingHandlers: true
|
||||
enableProfilingHandler: true
|
||||
enableServer: true
|
||||
enableSystemLogHandler: true
|
||||
enableSystemLogQuery: false
|
||||
enforceNodeAllocatable:
|
||||
- pods
|
||||
eventBurst: 100
|
||||
|
@ -29,6 +29,7 @@ enableDebuggingHandlers: true
|
||||
enableProfilingHandler: true
|
||||
enableServer: true
|
||||
enableSystemLogHandler: true
|
||||
enableSystemLogQuery: false
|
||||
enforceNodeAllocatable:
|
||||
- pods
|
||||
eventBurst: 10
|
||||
|
@ -393,6 +393,11 @@ type KubeletConfiguration struct {
|
||||
Logging logsapi.LoggingConfiguration
|
||||
// EnableSystemLogHandler enables /logs handler.
|
||||
EnableSystemLogHandler bool
|
||||
// EnableSystemLogQuery enables the node log query feature on the /logs endpoint.
|
||||
// EnableSystemLogHandler has to be enabled in addition for this feature to work.
|
||||
// +featureGate=NodeLogQuery
|
||||
// +optional
|
||||
EnableSystemLogQuery bool
|
||||
// ShutdownGracePeriod specifies the total duration that the node should delay the shutdown and total grace period for pod termination during a node shutdown.
|
||||
// Defaults to 0 seconds.
|
||||
// +featureGate=GracefulNodeShutdown
|
||||
|
@ -491,6 +491,9 @@ func autoConvert_v1beta1_KubeletConfiguration_To_config_KubeletConfiguration(in
|
||||
if err := v1.Convert_Pointer_bool_To_bool(&in.EnableSystemLogHandler, &out.EnableSystemLogHandler, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1.Convert_Pointer_bool_To_bool(&in.EnableSystemLogQuery, &out.EnableSystemLogQuery, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ShutdownGracePeriod = in.ShutdownGracePeriod
|
||||
out.ShutdownGracePeriodCriticalPods = in.ShutdownGracePeriodCriticalPods
|
||||
out.ShutdownGracePeriodByPodPriority = *(*[]config.ShutdownGracePeriodByPodPriority)(unsafe.Pointer(&in.ShutdownGracePeriodByPodPriority))
|
||||
@ -673,6 +676,9 @@ func autoConvert_config_KubeletConfiguration_To_v1beta1_KubeletConfiguration(in
|
||||
if err := v1.Convert_bool_To_Pointer_bool(&in.EnableSystemLogHandler, &out.EnableSystemLogHandler, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := v1.Convert_bool_To_Pointer_bool(&in.EnableSystemLogQuery, &out.EnableSystemLogQuery, s); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ShutdownGracePeriod = in.ShutdownGracePeriod
|
||||
out.ShutdownGracePeriodCriticalPods = in.ShutdownGracePeriodCriticalPods
|
||||
out.ShutdownGracePeriodByPodPriority = *(*[]v1beta1.ShutdownGracePeriodByPodPriority)(unsafe.Pointer(&in.ShutdownGracePeriodByPodPriority))
|
||||
|
@ -692,6 +692,12 @@ type KubeletConfiguration struct {
|
||||
// Default: true
|
||||
// +optional
|
||||
EnableSystemLogHandler *bool `json:"enableSystemLogHandler,omitempty"`
|
||||
// enableSystemLogQuery enables the node log query feature on the /logs endpoint.
|
||||
// EnableSystemLogHandler has to be enabled in addition for this feature to work.
|
||||
// Default: false
|
||||
// +featureGate=NodeLogQuery
|
||||
// +optional
|
||||
EnableSystemLogQuery *bool `json:"enableSystemLogQuery,omitempty"`
|
||||
// shutdownGracePeriod specifies the total duration that the node should delay the
|
||||
// shutdown and total grace period for pod termination during a node shutdown.
|
||||
// Default: "0s"
|
||||
|
@ -413,6 +413,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.EnableSystemLogQuery != nil {
|
||||
in, out := &in.EnableSystemLogQuery, &out.EnableSystemLogQuery
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
out.ShutdownGracePeriod = in.ShutdownGracePeriod
|
||||
out.ShutdownGracePeriodCriticalPods = in.ShutdownGracePeriodCriticalPods
|
||||
if in.ShutdownGracePeriodByPodPriority != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user