mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Kubelet manager configuration
This commit is contained in:
parent
b005f2fba3
commit
ffb32472bb
@ -96,6 +96,7 @@ KubeletConfiguration:
|
||||
clusterDNS:
|
||||
- 10.96.0.10
|
||||
clusterDomain: cluster.local
|
||||
configMapAndSecretChangeDetectionStrategy: Watch
|
||||
containerLogMaxFiles: 5
|
||||
containerLogMaxSize: 10Mi
|
||||
contentType: application/vnd.kubernetes.protobuf
|
||||
|
@ -85,6 +85,7 @@ kubeletConfiguration:
|
||||
clusterDNS:
|
||||
- 10.96.0.10
|
||||
clusterDomain: cluster.local
|
||||
configMapAndSecretChangeDetectionStrategy: Watch
|
||||
containerLogMaxFiles: 5
|
||||
containerLogMaxSize: 10Mi
|
||||
contentType: application/vnd.kubernetes.protobuf
|
||||
|
@ -82,6 +82,7 @@ kubeletConfiguration:
|
||||
clusterDNS:
|
||||
- 10.96.0.10
|
||||
clusterDomain: cluster.local
|
||||
configMapAndSecretChangeDetectionStrategy: Watch
|
||||
containerLogMaxFiles: 5
|
||||
containerLogMaxSize: 10Mi
|
||||
contentType: application/vnd.kubernetes.protobuf
|
||||
|
@ -86,6 +86,7 @@ kubeletConfiguration:
|
||||
clusterDNS:
|
||||
- 10.96.0.10
|
||||
clusterDomain: cluster.local
|
||||
configMapAndSecretChangeDetectionStrategy: Watch
|
||||
containerLogMaxFiles: 5
|
||||
containerLogMaxSize: 10Mi
|
||||
contentType: application/vnd.kubernetes.protobuf
|
||||
|
@ -81,6 +81,7 @@ kubeletConfiguration:
|
||||
clusterDNS:
|
||||
- 10.192.0.10
|
||||
clusterDomain: cluster.global
|
||||
configMapAndSecretChangeDetectionStrategy: Watch
|
||||
containerLogMaxFiles: 5
|
||||
containerLogMaxSize: 10Mi
|
||||
contentType: application/vnd.kubernetes.protobuf
|
||||
|
@ -153,6 +153,7 @@ var (
|
||||
"CgroupsPerQOS",
|
||||
"ClusterDNS[*]",
|
||||
"ClusterDomain",
|
||||
"ConfigMapAndSecretChangeDetectionStrategy",
|
||||
"ContainerLogMaxFiles",
|
||||
"ContainerLogMaxSize",
|
||||
"ContentType",
|
||||
|
@ -39,6 +39,23 @@ const (
|
||||
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
|
||||
|
||||
// KubeletConfiguration contains the configuration for the Kubelet
|
||||
@ -259,6 +276,8 @@ type KubeletConfiguration struct {
|
||||
ContainerLogMaxSize string
|
||||
// Maximum number of container log files that can be present for a container.
|
||||
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 */
|
||||
|
||||
|
@ -198,6 +198,9 @@ func SetDefaults_KubeletConfiguration(obj *KubeletConfiguration) {
|
||||
if obj.ContainerLogMaxFiles == nil {
|
||||
obj.ContainerLogMaxFiles = utilpointer.Int32Ptr(5)
|
||||
}
|
||||
if obj.ConfigMapAndSecretChangeDetectionStrategy == "" {
|
||||
obj.ConfigMapAndSecretChangeDetectionStrategy = WatchChangeDetectionStrategy
|
||||
}
|
||||
if obj.EnforceNodeAllocatable == nil {
|
||||
obj.EnforceNodeAllocatable = DefaultNodeAllocatableEnforcement
|
||||
}
|
||||
|
@ -39,6 +39,23 @@ const (
|
||||
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
|
||||
|
||||
// KubeletConfiguration contains the configuration for the Kubelet
|
||||
@ -612,6 +629,11 @@ type KubeletConfiguration struct {
|
||||
// Default: 5
|
||||
// +optional
|
||||
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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user