Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ffb32472
Commit
ffb32472
authored
Jun 05, 2018
by
wojtekt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kubelet manager configuration
parent
b005f2fb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
0 deletions
+50
-0
internal.yaml
.../app/util/config/testdata/conversion/master/internal.yaml
+1
-0
v1alpha1.yaml
.../app/util/config/testdata/conversion/master/v1alpha1.yaml
+1
-0
v1alpha1_without_TypeMeta.yaml
...testdata/conversion/master/v1alpha1_without_TypeMeta.yaml
+1
-0
v1alpha2.yaml
.../app/util/config/testdata/conversion/master/v1alpha2.yaml
+1
-0
defaulted.yaml
...app/util/config/testdata/defaulting/master/defaulted.yaml
+1
-0
helpers_test.go
pkg/kubelet/apis/kubeletconfig/helpers_test.go
+1
-0
types.go
pkg/kubelet/apis/kubeletconfig/types.go
+19
-0
defaults.go
pkg/kubelet/apis/kubeletconfig/v1beta1/defaults.go
+3
-0
types.go
pkg/kubelet/apis/kubeletconfig/v1beta1/types.go
+22
-0
No files found.
cmd/kubeadm/app/util/config/testdata/conversion/master/internal.yaml
View file @
ffb32472
...
...
@@ -96,6 +96,7 @@ KubeletConfiguration:
clusterDNS
:
-
10.96.0.10
clusterDomain
:
cluster.local
configMapAndSecretChangeDetectionStrategy
:
Watch
containerLogMaxFiles
:
5
containerLogMaxSize
:
10Mi
contentType
:
application/vnd.kubernetes.protobuf
...
...
cmd/kubeadm/app/util/config/testdata/conversion/master/v1alpha1.yaml
View file @
ffb32472
...
...
@@ -85,6 +85,7 @@ kubeletConfiguration:
clusterDNS
:
-
10.96.0.10
clusterDomain
:
cluster.local
configMapAndSecretChangeDetectionStrategy
:
Watch
containerLogMaxFiles
:
5
containerLogMaxSize
:
10Mi
contentType
:
application/vnd.kubernetes.protobuf
...
...
cmd/kubeadm/app/util/config/testdata/conversion/master/v1alpha1_without_TypeMeta.yaml
View file @
ffb32472
...
...
@@ -82,6 +82,7 @@ kubeletConfiguration:
clusterDNS
:
-
10.96.0.10
clusterDomain
:
cluster.local
configMapAndSecretChangeDetectionStrategy
:
Watch
containerLogMaxFiles
:
5
containerLogMaxSize
:
10Mi
contentType
:
application/vnd.kubernetes.protobuf
...
...
cmd/kubeadm/app/util/config/testdata/conversion/master/v1alpha2.yaml
View file @
ffb32472
...
...
@@ -86,6 +86,7 @@ kubeletConfiguration:
clusterDNS
:
-
10.96.0.10
clusterDomain
:
cluster.local
configMapAndSecretChangeDetectionStrategy
:
Watch
containerLogMaxFiles
:
5
containerLogMaxSize
:
10Mi
contentType
:
application/vnd.kubernetes.protobuf
...
...
cmd/kubeadm/app/util/config/testdata/defaulting/master/defaulted.yaml
View file @
ffb32472
...
...
@@ -81,6 +81,7 @@ kubeletConfiguration:
clusterDNS
:
-
10.192.0.10
clusterDomain
:
cluster.global
configMapAndSecretChangeDetectionStrategy
:
Watch
containerLogMaxFiles
:
5
containerLogMaxSize
:
10Mi
contentType
:
application/vnd.kubernetes.protobuf
...
...
pkg/kubelet/apis/kubeletconfig/helpers_test.go
View file @
ffb32472
...
...
@@ -153,6 +153,7 @@ var (
"CgroupsPerQOS"
,
"ClusterDNS[*]"
,
"ClusterDomain"
,
"ConfigMapAndSecretChangeDetectionStrategy"
,
"ContainerLogMaxFiles"
,
"ContainerLogMaxSize"
,
"ContentType"
,
...
...
pkg/kubelet/apis/kubeletconfig/types.go
View file @
ffb32472
...
...
@@ -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 */
...
...
pkg/kubelet/apis/kubeletconfig/v1beta1/defaults.go
View file @
ffb32472
...
...
@@ -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
}
...
...
pkg/kubelet/apis/kubeletconfig/v1beta1/types.go
View file @
ffb32472
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment