mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Kubelet manager configuration
This commit is contained in:
parent
b005f2fba3
commit
ffb32472bb
@ -96,6 +96,7 @@ KubeletConfiguration:
|
|||||||
clusterDNS:
|
clusterDNS:
|
||||||
- 10.96.0.10
|
- 10.96.0.10
|
||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
configMapAndSecretChangeDetectionStrategy: Watch
|
||||||
containerLogMaxFiles: 5
|
containerLogMaxFiles: 5
|
||||||
containerLogMaxSize: 10Mi
|
containerLogMaxSize: 10Mi
|
||||||
contentType: application/vnd.kubernetes.protobuf
|
contentType: application/vnd.kubernetes.protobuf
|
||||||
|
@ -85,6 +85,7 @@ kubeletConfiguration:
|
|||||||
clusterDNS:
|
clusterDNS:
|
||||||
- 10.96.0.10
|
- 10.96.0.10
|
||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
configMapAndSecretChangeDetectionStrategy: Watch
|
||||||
containerLogMaxFiles: 5
|
containerLogMaxFiles: 5
|
||||||
containerLogMaxSize: 10Mi
|
containerLogMaxSize: 10Mi
|
||||||
contentType: application/vnd.kubernetes.protobuf
|
contentType: application/vnd.kubernetes.protobuf
|
||||||
|
@ -82,6 +82,7 @@ kubeletConfiguration:
|
|||||||
clusterDNS:
|
clusterDNS:
|
||||||
- 10.96.0.10
|
- 10.96.0.10
|
||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
configMapAndSecretChangeDetectionStrategy: Watch
|
||||||
containerLogMaxFiles: 5
|
containerLogMaxFiles: 5
|
||||||
containerLogMaxSize: 10Mi
|
containerLogMaxSize: 10Mi
|
||||||
contentType: application/vnd.kubernetes.protobuf
|
contentType: application/vnd.kubernetes.protobuf
|
||||||
|
@ -86,6 +86,7 @@ kubeletConfiguration:
|
|||||||
clusterDNS:
|
clusterDNS:
|
||||||
- 10.96.0.10
|
- 10.96.0.10
|
||||||
clusterDomain: cluster.local
|
clusterDomain: cluster.local
|
||||||
|
configMapAndSecretChangeDetectionStrategy: Watch
|
||||||
containerLogMaxFiles: 5
|
containerLogMaxFiles: 5
|
||||||
containerLogMaxSize: 10Mi
|
containerLogMaxSize: 10Mi
|
||||||
contentType: application/vnd.kubernetes.protobuf
|
contentType: application/vnd.kubernetes.protobuf
|
||||||
|
@ -81,6 +81,7 @@ kubeletConfiguration:
|
|||||||
clusterDNS:
|
clusterDNS:
|
||||||
- 10.192.0.10
|
- 10.192.0.10
|
||||||
clusterDomain: cluster.global
|
clusterDomain: cluster.global
|
||||||
|
configMapAndSecretChangeDetectionStrategy: Watch
|
||||||
containerLogMaxFiles: 5
|
containerLogMaxFiles: 5
|
||||||
containerLogMaxSize: 10Mi
|
containerLogMaxSize: 10Mi
|
||||||
contentType: application/vnd.kubernetes.protobuf
|
contentType: application/vnd.kubernetes.protobuf
|
||||||
|
@ -153,6 +153,7 @@ var (
|
|||||||
"CgroupsPerQOS",
|
"CgroupsPerQOS",
|
||||||
"ClusterDNS[*]",
|
"ClusterDNS[*]",
|
||||||
"ClusterDomain",
|
"ClusterDomain",
|
||||||
|
"ConfigMapAndSecretChangeDetectionStrategy",
|
||||||
"ContainerLogMaxFiles",
|
"ContainerLogMaxFiles",
|
||||||
"ContainerLogMaxSize",
|
"ContainerLogMaxSize",
|
||||||
"ContentType",
|
"ContentType",
|
||||||
|
@ -39,6 +39,23 @@ const (
|
|||||||
HairpinNone = "none"
|
HairpinNone = "none"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ResourceChangeDetectionStrategy denotes a mode in which internal
|
||||||
|
// managers (secret, configmap) are discovering object changes.
|
||||||
|
type ResourceChangeDetectionStrategy string
|
||||||
|
|
||||||
|
// Enum settings for different strategies of kubelet managers.
|
||||||
|
const (
|
||||||
|
// GetChangeDetectionStrategy is a mode in which kubelet fetches
|
||||||
|
// necessary objects directly from apiserver.
|
||||||
|
GetChangeDetectionStrategy ResourceChangeDetectionStrategy = "Get"
|
||||||
|
// TTLCacheChangeDetectionStrategy is a mode in which kubelet uses
|
||||||
|
// ttl cache for object directly fetched from apiserver.
|
||||||
|
TTLCacheChangeDetectionStrategy ResourceChangeDetectionStrategy = "Cache"
|
||||||
|
// WatchChangeDetectionStrategy is a mode in which kubelet uses
|
||||||
|
// watches to observe changes to objects that are in its interest.
|
||||||
|
WatchChangeDetectionStrategy ResourceChangeDetectionStrategy = "Watch"
|
||||||
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// KubeletConfiguration contains the configuration for the Kubelet
|
// KubeletConfiguration contains the configuration for the Kubelet
|
||||||
@ -259,6 +276,8 @@ type KubeletConfiguration struct {
|
|||||||
ContainerLogMaxSize string
|
ContainerLogMaxSize string
|
||||||
// Maximum number of container log files that can be present for a container.
|
// Maximum number of container log files that can be present for a container.
|
||||||
ContainerLogMaxFiles int32
|
ContainerLogMaxFiles int32
|
||||||
|
// ConfigMapAndSecretChangeDetectionStrategy is a mode in which config map and secret managers are running.
|
||||||
|
ConfigMapAndSecretChangeDetectionStrategy ResourceChangeDetectionStrategy
|
||||||
|
|
||||||
/* the following fields are meant for Node Allocatable */
|
/* the following fields are meant for Node Allocatable */
|
||||||
|
|
||||||
|
@ -198,6 +198,9 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
|
|||||||
if obj.ContainerLogMaxFiles == nil {
|
if obj.ContainerLogMaxFiles == nil {
|
||||||
obj.ContainerLogMaxFiles = utilpointer.Int32Ptr(5)
|
obj.ContainerLogMaxFiles = utilpointer.Int32Ptr(5)
|
||||||
}
|
}
|
||||||
|
if obj.ConfigMapAndSecretChangeDetectionStrategy == "" {
|
||||||
|
obj.ConfigMapAndSecretChangeDetectionStrategy = WatchChangeDetectionStrategy
|
||||||
|
}
|
||||||
if obj.EnforceNodeAllocatable == nil {
|
if obj.EnforceNodeAllocatable == nil {
|
||||||
obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement
|
obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,23 @@ const (
|
|||||||
HairpinNone = "none"
|
HairpinNone = "none"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ResourceChangeDetectionStrategy denotes a mode in which internal
|
||||||
|
// managers (secret, configmap) are discovering object changes.
|
||||||
|
type ResourceChangeDetectionStrategy string
|
||||||
|
|
||||||
|
// Enum settings for different strategies of kubelet managers.
|
||||||
|
const (
|
||||||
|
// GetChangeDetectionStrategy is a mode in which kubelet fetches
|
||||||
|
// necessary objects directly from apiserver.
|
||||||
|
GetChangeDetectionStrategy ResourceChangeDetectionStrategy = "Get"
|
||||||
|
// TTLCacheChangeDetectionStrategy is a mode in which kubelet uses
|
||||||
|
// ttl cache for object directly fetched from apiserver.
|
||||||
|
TTLCacheChangeDetectionStrategy ResourceChangeDetectionStrategy = "Cache"
|
||||||
|
// WatchChangeDetectionStrategy is a mode in which kubelet uses
|
||||||
|
// watches to observe changes to objects that are in its interest.
|
||||||
|
WatchChangeDetectionStrategy ResourceChangeDetectionStrategy = "Watch"
|
||||||
|
)
|
||||||
|
|
||||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||||
|
|
||||||
// KubeletConfiguration contains the configuration for the Kubelet
|
// KubeletConfiguration contains the configuration for the Kubelet
|
||||||
@ -612,6 +629,11 @@ type KubeletConfiguration struct {
|
|||||||
// Default: 5
|
// Default: 5
|
||||||
// +optional
|
// +optional
|
||||||
ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"`
|
ContainerLogMaxFiles *int32 `json:"containerLogMaxFiles,omitempty"`
|
||||||
|
// ConfigMapAndSecretChangeDetectionStrategy is a mode in which
|
||||||
|
// config map and secret managers are running.
|
||||||
|
// Default: "Watching"
|
||||||
|
// +optional
|
||||||
|
ConfigMapAndSecretChangeDetectionStrategy ResourceChangeDetectionStrategy `json:"configMapAndSecretChangeDetectionStrategy,omitempty"`
|
||||||
|
|
||||||
/* the following fields are meant for Node Allocatable */
|
/* the following fields are meant for Node Allocatable */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user