Commit Graph

1442 Commits

Author SHA1 Message Date
Patrick Ohly
7de1b05e85 logging: add ContextualLogging feature
InitLogs overrides the klog default and turns contextual logging off. This
ensures that it is only enabled in Kubernetes commands that explicitly enable
it via a feature gate. A feature gate for it gets defined in
k8s.io/component-base/logs and is then used by Options.ValidateAndApply.

The effect of disabling contextual logging is very limited according to
benchmarks with kube-scheduler. The feature gets added anyway to satisfy the
PRR recommendation that features should be controllable.

The following commands have support for contextual logging:
- kube-apiserver
- kube-controller-manager
- kubelet
- kube-scheduler
- component-base/logs example

Supporting a feature gate check in ValidateAndApply and not in InitLogs is a
simplification: changing InitLogs to accept a FeatureGate would have implied
changing also component-base/cli.Run. This didn't seem worthwhile because
ValidateAndApply already covers the relevant commands.
2022-03-29 13:29:57 +02:00
Mark Rossetti
2e036ad7c3 Fixing logic for kubelet permissions check on windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-03-24 14:57:08 -07:00
Kubernetes Prow Robot
14e8db067e
Merge pull request #108191 from ravisantoshgudimetla/wire-cert-contexts
Wire cert contexts
2022-03-23 11:20:17 -07:00
Mark Rossetti
f63a194d9e Run kubelet in a job object in windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-03-15 12:17:52 -07:00
Kubernetes Prow Robot
a41f9e976d
Merge pull request #108107 from aojea/kubelet_http2_heartbeat
kubelet apiserver: be gentle closing connections on heartbeat failures
2022-03-09 01:32:12 -08:00
Ravi Gudimetla
8b84a793b3 API Server Changes
This commit includes all the changes needed for APIServer. Instead of modifying the existing signatures for the methods which either generate or return stopChannel, we generate a context from the channel and use the generated context to be passed to the controllers which are started in APIServer. This ensures we don't have to touch APIServer dependencies.
2022-03-07 09:37:01 -05:00
Kubernetes Prow Robot
d7d121999d
Merge pull request #108480 from wojtek-t/log_golang_envs
Log main golang runtime env vars
2022-03-04 00:10:51 -08:00
Wojciech Tyczyński
ef2e32ab65 Log main golang runtime env vars 2022-03-04 08:04:02 +01:00
Kubernetes Prow Robot
428ec843a5
Merge pull request #107121 from borgerli/fix-kubelet-config-log
1.21 regression: fix regression introduced by PR 100320 - sensitive information would be logged
2022-03-03 00:28:48 -08:00
Jack
91c7f3f66a chore(kubelet): simpler createAndInitKubelet func 2022-02-24 14:20:32 -08:00
Kubernetes Prow Robot
06e107081e
Merge pull request #104732 from mengjiao-liu/remove-flag-experimental-check-node-capabilities-before-mount
kubelet: Remove the deprecated flag `--experimental-check-node-capabilities-before-mount`
2022-02-24 07:56:30 -08:00
Antonio Ojea
39e9b19b88 kubelet: rename closeAllConns to onHeartbeatFailure
Since the behavior of the kubelet OnHeartbeatFailure hook has changed
to close only the idle connections, rename this function to match
the semantics.
2022-02-18 16:30:22 +01:00
Antonio Ojea
ac22287051 kubelet apiserver: be gentle closing connections on heartbeat failures 2022-02-14 17:32:24 +01:00
Matthias Bertschy
9500ee9d9c container_manager: use oomScoreAdj instead of default when set 2022-02-12 15:23:13 +01:00
Ciprian Hacman
0819451ea6 Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00
Kubernetes Prow Robot
8d01b02c60
Merge pull request #107096 from hakman/remove_non-masquerade-cidr
Remove deprecated flag --non-masquerade-cidr in kubelet
2022-02-08 12:42:50 -08:00
ahrtr
972dc46a1f replace deprecated io/ioutil with os and io for cmd 2022-02-01 13:59:41 +08:00
Sergey Kanzhelev
7e7bc6d53b remove DynamicKubeletConfig logic from kubelet 2022-01-19 22:38:04 +00:00
Ciprian Hacman
21809043b5 Remove deprecated flag --non-masquerade-cidr in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-19 09:17:26 +02:00
cyclinder
07999dac70 Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-14 16:02:50 +02:00
Kubernetes Prow Robot
b1c204a237
Merge pull request #104774 from kerthcet/bug/fix-kubelet-log-defer-conflict-with-exit
fix kubelet flushlogs not working together with exit
2022-01-06 10:40:32 -08:00
Mengjiao Liu
beda4cafb6 kubelet: Remove the deprecated flag --experimental-check-node-capabilities-before-mount 2022-01-06 11:47:11 +08:00
Kubernetes Prow Robot
4eae933dc7
Merge pull request #106667 from SergeyKanzhelev/updateDeprecationMessages
updated deprecation messages from 1.23 to 1.24
2022-01-04 23:03:20 -08:00
Kubernetes Prow Robot
f5f34166b7
Merge pull request #106954 from saschagrunert/experimental-runtime-flags
Mark `--container-runtime-endpoint` and `--image-service-endpoint` stable
2021-12-20 06:19:25 -08:00
Li Bo
7311aa4131 fix regression introduced by PR 100320 2021-12-18 21:39:24 +08:00
Sascha Grunert
5983850dbc
Mark --container-runtime-endpoint and --image-service-endpoint stable
Since we removed dockershim we now rely on both flags, which therefore
should not marked experimental any more.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-12-10 14:54:10 +01: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
Kubernetes Prow Robot
cdf3ad823a
Merge pull request #97252 from dims/drop-dockershim
Completely remove in-tree dockershim from kubelet
2021-12-08 12:51:46 -08:00
Davanum Srinivas
bc78dff42e
update files to drop dockershim
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-07 15:15:13 -05:00
kerthcet
185e0a041c prefer %w to unwrap errors
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-11-30 10:56:13 +08:00
Sergey Kanzhelev
a11453efbc remove ReallyCrashForTesting and cleaned up some references to HandleCrash behavior 2021-11-29 20:00:10 +00:00
Sergey Kanzhelev
54a279e0b0 updated deprecation messages from 1.23 to 1.24 2021-11-24 21:58:47 +00:00
Kubernetes Prow Robot
1304dfd73e
Merge pull request #106520 from pohly/log-print-flags
kubelet: print flags after initializing logging
2021-11-18 01:53:02 -08:00
Patrick Ohly
316ac13d00 kubelet: print flags after initializing logging
If done too soon, the klog.V() calls are ignored because the log verbosity
isn't set. In Kubernetes 1.22, the verbosity was set, but not the logging
format.
2021-11-18 07:53:16 +01:00
Hanna Lee
a7daeb37af Convert one more utilflag.IPVar to &utilflag.IPVar 2021-11-17 08:56:01 +01:00
Hanna Lee
30ea05ae7b Update IPVar and IPPortVar functions to have pointer receivers to fix 'ineffective assignment' 2021-11-17 08:56:00 +01:00
Kubernetes Prow Robot
1f6d5caa9a
Merge pull request #105437 from cmssczy/update-kubelet-configuration
migrate --register-with-taints to KubeletConfiguration
2021-11-16 17:44:00 -08:00
Oksana Naumov
3af11fc12d Add support for Portworx to csi-translation lib
Signed-off-by: Oksana Naumov <trierra.dev@gmail.com>
2021-11-16 13:26:09 -08:00
Kubernetes Prow Robot
45f77ca4ba
Merge pull request #104844 from aojea/clientgo_close_idle
CloseIdleConnections of wrapped Transport RoundTrippers
2021-11-16 08:45:27 -08:00
Antonio Ojea
15ea255457 don't use a custom dialer for the kubelet
Don't use a custom dialer for the kubelet if is not rotating
certificates, so we can reuse TCP connections because we don't need
a customer dialer.

Kubelet needs to be able to recover from stale http connections.
HTTP2 has a mechanism to detect broken connections by sending periodical pings.
HTTP1 only can have one persistent connection, and it will close all Idle connections
once the Kubelet heartbet fails. However, since there are many edge cases that we can't
control, users can still opt-in to the previous behavior for closing the connections by
setting the environment variable DISABLE_HTTP2.
2021-11-16 15:39:30 +01:00
caozhiyuan
bad4faf1b9 migrate --register-with-taints to KubeletConfiguration 2021-11-16 19:10:36 +08:00
kerthcet
9600e8d93b fix kubelet flushlogs not working together with os.Exit()
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-11-16 13:27:37 +08:00
Humble Chirammal
7c40eb9ae0 Add support for rbd plugin to csi-translation-lib
In support of csi-migration proposal here:
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/csi-migration.md

Will help with migration of in-tree RBD plugin ( kubernetes.io/rbd)
to RBD CSI driver ( rbd.csi.ceph.com ).

Fixes https://github.com/kubernetes/enhancements/issues/2923

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-11-15 23:46:29 +05:30
Patrick Ohly
25907036ea kubelet: avoid deprecation remark for traditional logging flags
Just because the options can now also be set via a configuration file does not
mean that the command line flags should not be used anymore.
2021-11-03 12:02:48 +01:00
Patrick Ohly
4df70dfd41 component-base: initialize logging as soon as possible
In various places log messages where emitted as part of validation or even
before it (for example, cli.PrintFlags). Those log messages did not use the
final logging configuration, for example text output instead of JSON or not the
final verbosity. The last point became more obvious after moving the setup of
verbosity into logs.Options.Apply because PrintFlags never printed anything
anymore.

In order to force applications to deal with logging as soon as possible, the
Options.Validate and Options.Apply methods are now private. Applications should
use the new Options.ValidateAndApply directly after parsing.
2021-11-03 11:55:54 +01:00
Patrick Ohly
3948cb8d1b component-base: move v/vmodule/log-flush-frequency into LoggingConfiguration
These three options are the ones from logs.AddFlags which are not deprecated.
Therefore it makes sense to make them available also via the configuration file
support in the one command which currently supports that (kubelet).

Long-term, all commands should use LoggingConfiguration, either with a
configuration file (as in kubelet) or via flags (kube-scheduler,
kube-apiserver, kube-controller-manager).

Short-term, both approaches have to be supported. As the majority of the
commands only use logs.AddFlags, that function by default continues to register
the flags and only leaves that to Options.AddFlags when explicitly requested.

A drive-by bug fix is done for log flushing: the periodic flushing called
klog.Flush and therefore missed explicit flushing of the newer logr
backend. This bug was never present in any release Kubernetes and therefore the
fix is not submitted in a separate PR.
2021-11-03 07:41:46 +01:00
Debabrata Panigrahi
89062fea47
Updated kubelet server references about 4h hardcoded timeout (#104735)
* Updated non idle logging time

* Update cmd/kubelet/app/options/options.go

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>

Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2021-10-20 09:23:57 -07:00
Patrick Ohly
00e4a599f6 command lines: always show flags with hyphens
All Kubernetes commands should show flags with hyphens in their help text even
when the flag originally was defined with underscore. Converting a command to
this style is not breaking its command line API because the old-style parameter
with underscore is accepted as alias.

The easiest solution to achieve this is to set normalization shortly before
running the command in the new central cli.Run or the few places where that
function isn't used yet.

There may be some texts which depends on normalization at flag definition time,
like the --logging-format usage warning. Those get generated assuming that
hyphens will be used.
2021-09-30 13:46:49 +02:00
Patrick Ohly
21d1bcd6b8 initialize logging after flag parsing
It wasn't documented that InitLogs already uses the log flush frequency, so
some commands have called it before parsing (for example, kubectl in the
original code for logs.go). The flag never had an effect in such commands.

Fixing this turned into a major refactoring of how commands set up flags and
run their Cobra command:

- component-base/logs: implicitely registering flags during package init is an
  anti-pattern that makes it impossible to use the package in commands which
  want full control over their command line. Logging flags must be added
  explicitly now, something that the new cli.Run does automatically.

- component-base/logs: AddFlags would have crashed in kubectl-convert if it
  had been called because it relied on the global pflag.CommandLine. This
  has been fixed and kubectl-convert now has the same --log-flush-frequency
  flag as other commands.

- component-base/logs/testinit: an exception are tests where flag.CommandLine has
  to be used. This new package can be imported to add flags to that
  once per test program.

- Normalization of the klog command line flags was inconsistent. Some commands
  unintentionally didn't normalize to the recommended format with hyphens. This
  gets fixed for sample programs, but not for production programs because
  it would be a breaking change.

This refactoring has the following user-visible effects:

- The validation error for `go run ./cmd/kube-apiserver --logging-format=json
  --add-dir-header` now references `add-dir-header` instead of `add_dir_header`.

- `staging/src/k8s.io/cloud-provider/sample` uses flags with hyphen instead of
  underscore.

- `--log-flush-frequency` is not listed anymore in the --logging-format flag's
  `non-default formats don't honor these flags` usage text because it will also
  work for non-default formats once it is needed.

- `cmd/kubelet`: the description of `--logging-format` uses hyphens instead of
  underscores for the flags, which now matches what the command is using.

- `staging/src/k8s.io/component-base/logs/example/cmd`: added logging flags.

- `apiextensions-apiserver` no longer prints a useless stack trace for `main`
  when command line parsing raises an error.
2021-09-30 13:46:49 +02:00
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Kubernetes Prow Robot
fed612c9f8
Merge pull request #103172 from niulechuan/cleanup/deprecated_flag
Remove deprecated flag --experimental-bootstrap-kubeconfig
2021-09-21 14:08:18 -07:00
Kubernetes Prow Robot
c79f7c1add
Merge pull request #104711 from claudiubelu/update-pause-3.6
update pause image references to use 3.6
2021-09-13 19:09:08 -07:00
Sascha Grunert
46077e6be7
Remove deprecated --seccomp-profile-root/seccompProfileRoot configuration
The configuration is deprecated and targets removal for v1.23. Tests
cases have been changed as well.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-08-31 09:55:28 +02:00
Claudiu Belu
18936d4785 updates pause image references
The pause:3.6 image has been published.

Also updates older / incorrect references.
2021-08-29 21:50:05 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
tanjing2020
523b4c0918 Replace 'x.Sub(time.Now())' with 'time.Until(x)' 2021-07-23 10:03:36 +08:00
Francesco Romani
c5cb263dcf smtalign: propagate policy options to cpumanager
The CPUManagerPolicyOptions received from the kubelet config/command line args
is propogated to the Container Manager.

We defer the consumption of the options to a later patch(set).

Co-authored-by: Swati Sehgal <swsehgal@redhat.com>
Signed-off-by: Francesco Romani <fromani@redhat.com>
2021-07-08 23:15:35 +02:00
Swati Sehgal
cc76a756e4 smtalign: add cpu-manager-policy-options flag in Kubelet
In this patch we enhance the kubelet configuration to support
cpuManagerPolicyOptions.

In order to introduce SMT-awareness in CPU Manager, we introduce a
new flag in Kubelet to allow the user to specify an additional flag
called `cpumanager-policy-options` to allow the user to modify the
behaviour of static policy to strictly guarantee allocation of whole
core.

Co-authored-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2021-07-08 23:14:59 +02:00
Li Bo
c3d9b10ca8 feature: support Memory QoS for cgroups v2 2021-07-08 09:26:46 +08:00
Kubernetes Prow Robot
8e56a34195
Merge pull request #102966 from SergeyKanzhelev/deprecateDynamicKubeletConfig
deprecate and disable by default DynamicKubeletConfig feature flag
2021-07-07 17:05:15 -07:00
Sergey Kanzhelev
dffc2a60a2 deprecate and disable by default DynamicKubeletConfig feature flag 2021-07-02 23:53:11 +00:00
Lukasz Szaszkiewicz
4a2aef00d6 adds metrics for authorization webhook 2021-06-30 09:26:25 +02:00
Lukasz Szaszkiewicz
322c18c147 adds metrics for authentication webhook 2021-06-29 09:49:14 +02:00
Niu Lechuan
606de85fca Remove deprecated flag --experimental-bootstrap-kubeconfig in kubelet
Signed-off-by: Niu Lechuan <lechuan.niu@daocloud.io>
2021-06-25 11:10:25 +08:00
Kubernetes Prow Robot
2e93b3924a
Merge pull request #101943 from saschagrunert/seccomp-default
Add kubelet `SeccompDefault` alpha feature
2021-06-24 13:07:41 -07:00
Kubernetes Prow Robot
06dfe683ce
Merge pull request #103123 from dims/remove-fakefs-to-drop-spf13/afero-dependency
Remove fakefs to drop spf13/afero dependency
2021-06-24 07:57:41 -07:00
Davanum Srinivas
5feff280e1
remove fakefs to drop spf13/afero dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-24 09:51:34 -04:00
Monis Khan
7e891e5d6c
csr: correctly handle backdating of short lived certs
This change updates the backdating logic to only be applied to the
NotBefore date and not the NotAfter date when the certificate is
short lived. Thus when such a certificate is issued, it will not be
immediately expired.  Long lived certificates continue to have the
same lifetime as before.

Consolidated all certificate lifetime logic into the
PermissiveSigningPolicy.policy method.

Signed-off-by: Monis Khan <mok@vmware.com>
2021-06-23 15:36:11 -04:00
Sascha Grunert
8b7003aff4
Add SeccompDefault feature
This adds the gate `SeccompDefault` as new alpha feature. Seccomp path
and field fallbacks are now passed to the helper functions, whereas unit
tests covering those code paths have been added as well.

Beside enabling the feature gate, the feature has to be enabled by the
`SeccompDefault` kubelet configuration or its corresponding
`--seccomp-default` CLI flag.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>

Apply suggestions from code review

Co-authored-by: Paulo Gomes <pjbgf@linux.com>
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-06-23 10:22:57 +02:00
Kubernetes Prow Robot
e55ff835b4
Merge pull request #102922 from SataQiu/update-link
cmd/kubelet: replace KEP link with the documentation one as it is available now
2021-06-19 13:10:50 -07:00
SataQiu
a47afdded0 cmd/kubelet: replace KEP link with the documentation one as it is available now 2021-06-16 23:38:58 +08:00
Davanum Srinivas
7fcdbbef06
Switch to github.com/coreos/go-systemd/v22 and drop older package
- We use the new v22 module released on May 10
- We drop the unmaintained `github.com/coreos/pkg`

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-16 11:14:16 -04:00
Kubernetes Prow Robot
71d6a48d3e
Merge pull request #102431 from serathius/loggingconfig
Use LoggingConfig within LogOptions
2021-06-16 02:21:59 -07:00
Kubernetes Prow Robot
7b9c335826
Merge pull request #98869 from liuxu623/master
fix kubelet flag description: --event-qps and --event-burst
2021-06-15 22:55:59 -07:00
Marek Siarkowicz
f9343f837d Use LoggingConfig within LogOptions
Co-authored-by: mengjiao.liu <mengjiao.liu@daocloud.io>
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
Co-authored-by: Heisenberg <yuzhiquanlong@gmail.com>
2021-06-15 17:14:43 +02:00
Kubernetes Prow Robot
29a8105cec
Merge pull request #101272 from Jiawei0227/deprecateflag
Remove CSIMigrationvSphereComplete flag
2021-06-05 10:40:38 -07:00
Sascha Grunert
b167fc24d7
Update pause image to v3.5
Update dependencies and the test images to use pause 3.5. We also
provide a changelog entry for the new container image version.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-05-25 09:04:46 +02:00
Kubernetes Prow Robot
13cafd5cb0
Merge pull request #101480 from yuzhiquan/little-nit-for-kubelet
Fix some nit for kubelet
2021-05-24 21:49:05 -07:00
Jiawei Wang
94db1e18ba Remove scaleio from volume plugins 2021-05-19 10:35:21 -07:00
Kubernetes Prow Robot
10b09e8a46
Merge pull request #100326 from wzshiming/fix/memory-leak
Fix watchForLockfileContention memory leak
2021-05-07 13:31:16 -07:00
Jiawei Wang
fa1a4100c6 Remove CSIMigrationVSphereComplete flag 2021-05-04 21:38:47 -07:00
yuzhiquan
ee2c3c1859 fix broken links by https 2021-04-26 14:58:42 +08:00
yuzhiquan
747c6f20dc error string should not be capitalized 2021-04-26 14:56:39 +08:00
wangyx1992
5109c3d548 cleanup: fix errors in wrapped format and log capitalization in kubelet
Signed-off-by: wangyx1992 <wang.yixiang@zte.com.cn>
2021-04-25 11:09:24 +08:00
Kubernetes Prow Robot
95ef042fb3
Merge pull request #98152 from jianzzha/master
update --reserved-cpus cpu list validation
2021-04-24 07:56:59 -07:00
Kubernetes Prow Robot
43b9491055
Merge pull request #101057 from wangyysde/remove-chaos-chance
removing kubelet's flag chaos-chance
2021-04-23 19:27:52 -07:00
Kubernetes Prow Robot
1ceddc790d
Merge pull request #98516 from chymy/fix-kubelet-option
To be consistent with global flags in --logging-format description
2021-04-22 19:50:01 -07:00
Jianzhu Zhang
bbfbc5e889 Update --reserved-cpus cpu list validation so kubelet won't fail to start due to off-line CPUs 2021-04-22 21:39:20 -04:00
Kubernetes Prow Robot
1960a7becf
Merge pull request #100981 from songxiao-wang87/run-test3
spelling mistake
2021-04-22 13:18:40 -07:00
wangyysde
4467082ddb removed kubelet's flag chaos-chance 2021-04-13 14:09:55 +08:00
songxiao-wang87
9c880ad907 spelling error server.go.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2021-04-10 11:00:28 +08:00
navist2020
4f7d87f72c Don't use Yoda conditions 2021-04-08 18:14:45 +08:00
chymy
ec7624b80d Fix flag spelling err in kubelet options
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-04-06 10:06:27 +08:00
Davanum Srinivas
ba56884d91
Ensure providerless kubelet does not pull cloud providers
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-21 21:36:38 -04:00
Elana Hashman
6af7eb6d49
Migrate missed log entries in kubelet
Co-Authored-By: pacoxu <paco.xu@daocloud.io>
2021-03-18 14:26:26 -07:00
Shiming Zhang
a3d337491f Fix watchForLockfileContention memory leak 2021-03-17 15:10:53 +08:00
wawa0210
ae381fcf09
When the parameters are incorrect, kubelet only outputs the error log instead of the entire stack log 2021-03-17 08:35:55 +08:00
Kubernetes Prow Robot
5ead6af84e
Merge pull request #99994 from AfrouzMashayekhi/sl-cmd-kubelet
Migrate cmd/kubelet and pkg/kubelet/cadvisor , pkg/kubelet/cri/remote/util , pkg/kubelet/images to structured logging
2021-03-16 14:49:56 -07:00
Kubernetes Prow Robot
b0a5fbdec0
Merge pull request #99289 from yuzhiquan/fix-kubelet-logformat-flag
Fix kubelet log format flag error
2021-03-16 14:48:43 -07:00
Peri Thompson
46738b7f48 Added check for Windows Permissions 2021-03-10 11:15:42 +00:00
yuzhiquan
819d66ddf7 fix kubelet logformat flag error display 2021-03-10 11:34:59 +08:00
afrouz
8f2e927b4a Migrate cmd/kubelet, image, cadvisor and cri to structured logging 2021-03-09 23:12:10 +03:30
Kubernetes Prow Robot
7863e8f891
Merge pull request #99248 from pandaamanda/kubelet_duplicate_default_value
remove duplicate default message for some flag
2021-03-05 01:56:22 -08:00
Kubernetes Prow Robot
983cac7f96
Merge pull request #97000 from mlevesquedion/avoid-logging-headers
Avoid logging headers from kubelet configuration
2021-03-04 13:38:22 -08:00
pacoxu
cd54bd94e9 deprecate cAdvisor json metrics collected by Kubelet
- remove unused code for cadvisor json metrics collected

Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-03-02 15:36:21 +08:00
Kubernetes Prow Robot
ef47564f46
Merge pull request #99247 from KofClubs/delete-redundancy-kubelet-options.go
Deleted a redundant line from #91275
2021-03-01 21:09:36 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
liuxu
385b7d7ff0 fix --event-qps and --event-burst 2021-02-26 17:05:04 +08:00
xiongzhongliang
ac0f4977d4 remove duplicate default message for some flag
remove duplicate default message for some flag
2021-02-23 22:24:52 +08:00
Kubernetes Prow Robot
031f2afbba
Merge pull request #98931 from michaelbeaumont/kubelet_well_known
Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis
2021-02-20 11:55:41 -08:00
Zhang Zhanpeng
b0b4867ba8 Deleted a redundant line missing from #91275
Signed-off-by: Zhang Zhanpeng <zhanpeng.zhang@daocloud.io>
2021-02-20 10:55:38 +08:00
Sri Saran Balaji Vellore Rajakumar
af05a7eca3 Refactor Kubelet Server to take kubeConfiguration instead of multiple fields 2021-02-11 16:15:35 -08:00
Sri Saran Balaji Vellore Rajakumar
51cdf4e97b Add support to disable /debug/pprof and /debug/flags/v endpoint
Co-authored-by: xiaofei.sun <sunxiaofei@kuaishou.com>
Co-authored-by: SaranBalaji90 <srisaranbalaji@gmail.com>
2021-02-11 15:56:53 -08:00
Michael Beaumont
a5a6762d33
Move pkg/kubelet/apis to k8s.io/kubelet/pkg/apis 2021-02-09 21:37:39 +01:00
Kubernetes Prow Robot
943e67c01f
Merge pull request #95479 from mgjeong/feature-memory-manager-working
Memory manager
2021-02-09 03:40:56 -08:00
Artyom Lukianov
932134034c memory manager: update API constant to have camel case format
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:02 +02:00
Artyom Lukianov
7561a0f96e memory manager: provide new flag var to parse reserved-memory parameter
The new flag will parse the `--reserved-memory` flag straight forward
to the []kubeletconfig.MemoryReservation variable instead of parsing
it to the middle map representation.

It gives us possibility to get rid of a lot of unneeded code and use the single
presentation for the reserved-memory.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:01 +02:00
Artyom Lukianov
ff2a110920 memory manager: provide the new type to contain resources for each NUMA node
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:10:00 +02:00
Artyom Lukianov
24be74e759 memory manager: update bazel files
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-02-09 01:09:59 +02:00
Krzysztof Wiatrzyk
711e85af24 memory manager: adding additional tests for server.go file, for parseReservedMemoryConfig() function. 2021-02-09 00:54:58 +02:00
Artyom Lukianov
93accb51e4 memory manager: add memory manager flag under kubelet options and kubelet config
The commit also includes generated files after `make generated_files`.

Signed-off-by: Byonggon Chun <bg.chun@samsung.com>
2021-02-09 00:54:58 +02:00
pacoxu
8946f26769 update pause to 3.4.1 for kubelet/kubeadm
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-05 21:33:01 +08:00
Jiawei Wang
bda557b4bc Disable in-tree plugin without enabling CSI migration
This commit replaces the CSIMigrationXXXComplete flag
with InTreePluginXXUnregister flag. This new flag will
be a superset of the CSIMigrationXXXComplete. But this
decouple the plugin unregister from CSI migration. So
if a K8s distribution want to go directly with CSI and
do not support in-tree, they can use this flag directly.

Testing:
1. Enable the InTreePluginXXUnregister and not CSIMigrationXXX,
verify that the PVC using old plugin name will have error
saying cannot find the plugin
2. Enable both the InTreePluginXXUnregister and CSIMigrationXXX
verify that the PVC using old plugin name will start to use
the migrated CSI plugin
2021-01-22 16:58:51 -08:00
Kubernetes Prow Robot
0da0d186a6
Merge pull request #96675 from pacoxu/fix/volume-stats-agg-period
fix: volume stats disabled when value is negative.(Currently, 0 means defualt 1m)
2021-01-19 22:17:58 -08:00
Kubernetes Prow Robot
fe58a937bd
Merge pull request #96857 from jnummelin/kubelet-cri-endpoint-help
Finetune container-runtime-endpoint option help text
2021-01-15 16:17:43 -08:00
Antonio Ojea
2e4aed2d4a bind-address flag usage 2020-12-11 18:47:24 +01:00
pacoxu
4901855fdd fix doc/comments error: volume stats agg period default value 1m and disable when it is negative like -1s.
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2020-12-07 11:46:54 +08:00
Michaël Lévesque-Dion
046ec59a8b use 'masked' instead of 'redacted' 2020-12-03 11:01:41 -05:00
Michaël Lévesque-Dion
0841b13e37 use deepcopy to actually operate on a copy 2020-12-02 14:44:11 -05:00
Michaël Lévesque-Dion
ec271c0e4f use a copy of the config 2020-12-02 12:57:17 -05:00
Michaël Lévesque-Dion
4ab4801139 avoid logging kubelet configuration headers 2020-12-01 18:36:48 -05:00
wangyamei
f6d7cab203 Update the help text for kubelet's enable-cadvisor-json-endpoints flag to explicitly mention that it has no effect on the /stats/summary endpoint.enable-cadvisor-json-endpoints 2020-11-28 21:59:57 +08:00
Jussi Nummelin
3f284fa892 Finetune container-runtime-endpoint option help text
Signed-off-by: Jussi Nummelin <jussi.nummelin@gmail.com>
2020-11-25 10:04:34 +00:00
Kubernetes Prow Robot
71331d8596
Merge pull request #96372 from serathius/sanitization-kubelet
Add --experimental-logging-sanitization flag to kubelet
2020-11-12 11:21:12 -08:00
Marek Siarkowicz
8e60d75c15 Add --experimental-logging-sanitization flag to Kubelet
Co-authored-by: Jordan Liggitt <jordan@liggitt.net>
2020-11-12 12:32:19 +01:00
sw.han
d070bff273 Add kubelet configuration flag 'topology-manager-scope'
add kubelet config option.
* --topology-manager-scope=[ container | pod ]
* default=container

Signed-off-by: Krzysztof Wiatrzyk <k.wiatrzyk@samsung.com>
2020-11-12 12:25:54 +01:00
Kubernetes Prow Robot
d233111f5b
Merge pull request #94196 from andrewsykim/registry-creds
kubelet: add alpha credential provider plugins
2020-11-11 19:59:11 -08:00
Andrew Sy Kim
51441fd052 kubelet: support alpha credential provider exec plugins
Signed-off-by: Andrew Sy Kim <kim.andrewsy@gmail.com>
2020-11-10 13:44:06 -05:00
pigletfly
19a36d4b9a Remove duplicate import 2020-11-10 19:11:46 +08:00
Tim Allclair
a439bc5572
Remove --redirect-container-streaming functionality (#95935)
* Remove --redirect-container-streaming functionality

* Update bazel
2020-11-09 11:50:11 -08:00
Kubernetes Prow Robot
10221a8dac
Merge pull request #94643 from lonng/simplify-code
Avoid unnecessary calls if other error occurred
2020-11-09 11:49:57 -08:00
Kubernetes Prow Robot
2ee1003430
Merge pull request #96051 from ravisantoshgudimetla/add-priority-flag
[kubelet] Allow priority to be set for kubelet process on Windows
2020-11-02 13:41:52 -08:00
ravisantoshgudimetla
784098f8b6 Build files 2020-11-03 01:19:00 +05:30
ravisantoshgudimetla
f4c2dcd030 [kubelet] Allow priority to be set for kubelet process on Windows 2020-11-03 01:18:59 +05:30
Abu Kashem
2f812c3194
set webhook retry backoff parameters for kubelet 2020-11-01 10:22:21 -05:00
Dan Winship
75242fce7a kubelet: allow specifying dual-stack node IPs on bare metal
Discussion is ongoing about how to best handle dual-stack with clouds
and autodetected IPs, but there is at least agreement that people on
bare metal ought to be able to specify two explicit IPs on dual-stack
hosts, so allow that.
2020-10-07 17:25:54 -04:00
Srini Brahmaroutu
fbe5daed73 Change code to use staging/k8s.io/mount-utils 2020-09-16 21:51:24 -07:00
Kubernetes Prow Robot
5566dc93c4
Merge pull request #94508 from andrewsykim/remove-cni-alpha
kubelet: remove alpha warnings for CNI flags
2020-09-09 09:07:08 -07:00
Kubernetes Prow Robot
293a53f2c0
Merge pull request #94140 from derekwaynecarr/pid-ga
Promote PidLimits to GA
2020-09-09 06:35:52 -07:00