Commit Graph

499 Commits

Author SHA1 Message Date
ruiwen-zhao
572e6e0ffb Add MaxParallelImagePulls support
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2023-03-02 03:57:59 +00:00
Kubernetes Prow Robot
53f3583c7f
Merge pull request #114785 from TommyStarK/kubelet/replace-deprecated-pointer-function
kubelet: Replace deprecated pointer function
2023-03-01 18:04:55 -08:00
Paco Xu
3d536bd14b API docs: point to current docs instead of archived designs 2023-02-16 15:32:08 +08:00
Paco Xu
019d2615af archived design proposals are now moved to Design Proposals Archive Repo. 2023-02-08 11:12:22 +08:00
songxiao-wang87
3e6b954290 Making a run test.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2023-01-31 09:38:48 +00:00
TommyStarK
1fcc8fbf59 kubelet: Replace deprecated pointer function
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-01-08 13:44:09 +01:00
Moshe Levi
ce46ba7be8 kubelet podresource: fix GetAllocatableResources metrics
The GetAllocatableResources increase twice the PodResourcesEndpointRequestsTotalCount
This PR fix this.

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-01-04 10:58:55 +02:00
Paco Xu
f28f40e521 remove a flag check that was introduced in #112542; address several comments
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00
Aditi Sharma
214a0ee7b8 Migrate container runtime endpoint flag to config
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-12-13 14:00:29 +08:00
PiotrProkop
daee219210 Improved multi-numa alignment in Topology Manager: add topology-manager-policy-options flag in Kubelet
This patch adds new Kubelet option topologyManagerPolicyOptions.
To introduce new TopologyManager options, first we need to introduce new
flag called `topology-manager-policy-options` to allow users to modify
behaviour of best-effort and restricted policies.

Signed-off-by: PiotrProkop <pprokop@nvidia.com>
2022-11-03 09:45:33 +01:00
Kubernetes Prow Robot
244c035b87
Merge pull request #110263 from claudiubelu/unittests
unittests: Fixes unit tests for Windows
2022-10-25 14:50:34 -07:00
Claudiu Belu
6f2eeed2e8 unittests: Fixes unit tests for Windows
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- config options not supported on Windows.
- files not closed, which means that they cannot be removed / renamed.
- paths not properly joined (filepath.Join should be used).
- time.Now() is not as precise on Windows, which means that 2
  consecutive calls may return the same timestamp.
- different error messages on Windows.
- files have \r\n line endings on Windows.
- /tmp directory being used, which might not exist on Windows. Instead,
  the OS-specific Temp directory should be used.
- the default value for Kubelet's EvictionHard field was containing
  OS-specific fields. This is now moved, the field is now set during
  Kubelet's initialization, after the config file is read.
2022-10-25 23:46:56 +03:00
Kubernetes Prow Robot
6f579d3ceb
Merge pull request #111616 from ndixita/credential-api-ga
Move the Kubelet Credential Provider feature to GA and Update the Credential Provider API to GA
2022-10-15 07:53:09 -07:00
Monis Khan
b738be9b46
Use https links for k8s KEPs, issues, PRs, etc
Signed-off-by: Monis Khan <mok@microsoft.com>
2022-09-23 23:36:24 +00:00
Dixita Narang
9c3cb6e66d Fixing boilerplate header 2022-09-16 21:20:30 +00:00
Dixita Narang
4cc741955c Adding default values for v1 credential provider config 2022-09-09 06:11:15 +00:00
Dixita Narang
977a8ebb3a Renaming usage of v1beta1 to v1, and adding API violation exceptions and
vendor module for v1
2022-09-09 06:11:06 +00:00
Dmitry Verkhoturov
d0f9e6dc36 clarify CPUCFSQuotaPeriod values, set the minimum to 1ms
cpu.cfs_period_us is measured in microseconds in the kernel but
provided in time.Duration by the user, that change clarifies the code
to make this evident to the reader.

Also, the minimum value for that feature is 1ms and not 1μs, and this
change alters the validation to reject values smaller than 1ms.
2022-09-08 23:29:13 +02:00
Antonio Ojea
d434c588d7 Revert "change CPUCFSQuotaPeriod default value to 100us to match Linux default"
This reverts commit f2d591fae6.
2022-08-26 23:51:04 +02:00
Kubernetes Prow Robot
2b5475b3fa
Merge pull request #111554 from paskal/paskal/clarify_default_cfs_period
Clarify cpu.cfs_period_us default value
2022-08-25 07:28:07 -07:00
Kubernetes Prow Robot
70254065ea
Merge pull request #109966 from zhangxyjlu/config_validation_test
Add validation test for features.GracefulNodeShutdownBasedOnPodPriority
2022-08-24 00:02:24 -07:00
Dmitry Verkhoturov
f2d591fae6 change CPUCFSQuotaPeriod default value to 100us to match Linux default
cpu.cfs_period_us is 100μs by default despite having an "ms" unit
for some unfortunate reason. Documentation:
https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html#management

The desired effect of that change is to match
k8s default `CPUCFSQuotaPeriod` value (100ms before that change)
with one used in k8s without the `CustomCPUCFSQuotaPeriod` flag enabled
and Linux CFS (100us, 1000x smaller than 100ms).
2022-08-10 03:25:05 +02:00
jinxu
0064010cdd Promote Local storage capacity isolation feature to GA
This change is to promote local storage capacity isolation feature to GA

At the same time, to allow rootless system disable this feature due to
unable to get root fs, this change introduced a new kubelet config
"localStorageCapacityIsolation". By default it is set to true. For
rootless systems, they can set this configuration to false to disable
the feature. Once it is set, user cannot set ephemeral-storage
request/limit because capacity and allocatable will not be set.

Change-Id: I48a52e737c6a09e9131454db6ad31247b56c000a
2022-08-02 23:45:48 -07:00
zhangxiaoyang
7375ba4e27 add validation test for features.GracefulNodeShutdownBasedOnPodPriority 2022-08-03 14:43:00 +08:00
Kubernetes Prow Robot
d40bc18461
Merge pull request #105126 from sallyom/tracing-kubelet
kubelet tracing instrumentation
2022-08-02 11:38:06 -07:00
Dmitry Verkhoturov
32df800ba7 change CPUCFSQuotaPeriod default value to 100us to match Linux default
cpu.cfs_period_us is 100μs by default despite having an "ms" unit
for some unfortunate reason. Documentation:
https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html#management

The desired effect of that change is to match
k8s default `CPUCFSQuotaPeriod` value (100ms before that change)
with one used in k8s without the `CustomCPUCFSQuotaPeriod` flag enabled
and Linux CFS (100us, 1000x smaller than 100ms).
2022-08-02 09:55:50 +02:00
Kubernetes Prow Robot
ea21947641
Merge pull request #111426 from ping035627/k8s-220726
Update design-proposals URL
2022-08-01 23:50:30 -07:00
PingWang
473be65a3c Update design-proposals URL
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update url

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2022-08-02 09:13:38 +08:00
Sally O'Malley
5b4456ceea
kubelet tracing: generated files
Signed-off-by: Sally O'Malley <somalley@redhat.com>
2022-08-01 12:55:14 -04:00
Sally O'Malley
47e7d8034f
kubelet tracing
Signed-off-by: Sally O'Malley <somalley@redhat.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2022-08-01 12:55:02 -04:00
Kubernetes Prow Robot
bebea5f950
Merge pull request #111152 from sivchari/fix-refer-url
fix: refer to url of Node Allocatable
2022-07-31 20:32:39 -07:00
Dmitry Verkhoturov
5126192548 clarify cpu.cfs_period_us default value
cpu.cfs_period_us is 100μs by default despite having an "ms" unit
for some unfortunate reason. Documentation:
https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html#management

The desired effect of that change is more clarity on the default value
so users would be aware that the 10ms custom value would be
not 0.1x of the default, but 100x of it.
2022-07-29 23:02:35 +02:00
Kubernetes Prow Robot
631a5a849a
Merge pull request #109778 from mythi/grpc-go-update
grpc: move to use grpc.WithTransportCredentials()
2022-07-26 12:45:09 -07:00
sivchari
3db9e1c64c fix: refer to url of Node Allocatable 2022-07-15 00:54:33 +09:00
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
Patrick Ohly
4c6338ac0f logs: replace config methods with functions
API types are only supposed to have methods related to serialization.
2022-06-17 20:22:13 +02:00
Patrick Ohly
ea3f25f49b logs: add alpha+beta feature gates
It is useful to have the ability to control whether alpha or beta features are
enabled. We can group features under LoggingAlphaOptions and LoggingBetaOptions
because the configuration is designed so that each feature individually must be
enabled via its own option.

Currently, the JSON format itself is beta (graduated in 1.23) but additional
options for it were only added in 1.23 and thus are still alpha:

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M --feature-gates LoggingBetaOptions=false
  [format: Forbidden: Log format json is BETA and disabled, see LoggingBetaOptions feature, options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M
  [options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

This is the same approach that was taken for CPUManagerPolicyAlphaOptions and
CPUManagerPolicyBetaOptions.

In order to test this without modifying the global feature gate in a test file,
ValidateKubeletConfiguration must take a feature gate as argument.
2022-06-17 20:22:13 +02:00
Patrick Ohly
1aceac797d logs: make LoggingConfiguration an unversioned API
Making the LoggingConfiguration part of the versioned component-base/config API
had the theoretic advantage that components could have offered different
configuration APIs with experimental features limited to alpha versions (for
example, sanitization offered only in a v1alpha1.KubeletConfiguration). Some
components could have decided to only use stable logging options.

In practice, this wasn't done. Furthermore, we don't want different components
to make different choices regarding which logging features they offer to
users. It should always be the same everywhere, for the sake of consistency.

This can be achieved with a saner Go API by dropping the distinction between
internal and external LoggingConfiguration types. Different stability levels of
indidividual fields have to be covered by documentation (done) and potentially
feature gates (not currently done).

Advantages:

- everything related to logging is under component-base/logs;
  previously this was scattered across different packages and
  different files under "logs" (why some code was in logs/config.go
  vs. logs/options.go vs. logs/logs.go always confused me again
  and again when coming back to the code):

  - long-term config and command line API are clearly separated
    into the "api" package underneath that

  - logs/logs.go itself only deals with legacy global flags and
    logging configuration

- removal of separate Go APIs like logs.BindLoggingFlags and
  logs.Options

- LogRegistry becomes an implementation detail, with less code
  and less exported functionality (only registration needs to
  be exported, querying is internal)
2022-06-17 20:22:13 +02:00
Thearas
2457fbc643 docs: add ephemeral-storage to SystemReserved/KubeReserved comment 2022-06-01 16:19:26 +08:00
Mikko Ylinen
2c8bfad910 grpc: move to use grpc.WithTransportCredentials()
v1.43.0 marked grpc.WithInsecure() deprecated so this commit moves to use
what is the recommended replacement:

grpc.WithTransportCredentials(insecure.NewCredentials())

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-05-30 21:41:47 +03:00
Kubernetes Prow Robot
68cf2a60c6
Merge pull request #108847 from adisky/update-credential-api
Move kubelet credential provider feature flag to beta and update the api's
2022-03-24 20:05:53 -07:00
Aditi Sharma
ed16ef2206 Move feature flag credential provider to beta
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2022-03-24 22:43:38 +05:30
Kubernetes Prow Robot
190f974dd8
Merge pull request #108902 from kolyshkin/bump-golangci-lint
Fix verify:* after go 1.18 upgrade
2022-03-24 02:59:06 -07:00
Kir Kolyshkin
4513de06a8 Regen mocks using go 1.18
Generated by ./hack/update-mocks.sh using go 1.18

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-23 10:19:38 -07:00
Qiming Teng
4567032b5f Fix doc strings for kubelet config APIs 2022-03-21 16:35:21 +08:00
Kubernetes Prow Robot
5d6ef39406
Merge pull request #96004 from serathius/datapolicy-kubelet-pkg
Add datapolicy tags to  pkg/kubelet/
2022-03-04 15:34:51 -08:00
Kubernetes Prow Robot
08c31088c1
Merge pull request #106858 from cmssczy/add_RegisterWithTaints_validation_test
add kubelet config validation test for RegisterWithTaints
2022-02-23 12:51:58 -08:00
Sergey Kanzhelev
7e7bc6d53b remove DynamicKubeletConfig logic from kubelet 2022-01-19 22:38:04 +00:00
Elana Hashman
dbd50d9f50
Remove dynamic log sanitization fields from Kubelet config validation 2021-12-23 13:03:13 -08:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00