Commit graph

10577 commits

Author SHA1 Message Date
Jordan Liggitt
203d8ac838
Generate and format files
- Run hack/update-codegen.sh
    - Run hack/update-generated-device-plugin.sh
    - Run hack/update-generated-protobuf.sh
    - Run hack/update-generated-runtime.sh
    - Run hack/update-generated-swagger-docs.sh
    - Run hack/update-openapi-spec.sh
    - Run hack/update-gofmt.sh

Replay of a9593d634c
2022-12-20 17:26:07 -05:00
Jordan Liggitt
7e2e4821dd
Match go1.17 defaults for SHA-1 and GC 2022-12-20 17:26:01 -05:00
Jordan Liggitt
84fde398c4
Ignore unstructured log warnings
The fixes to this file included in 1.24 in 0f4d0660a7
rely on multi-line support in klog not present in the version used in
1.23
2022-12-20 17:25:59 -05:00
Patrick Ohly
4da1f79f99
enhance and fix log calls
Some of these changes are cosmetic (repeatedly calling klog.V instead of
reusing the result), others address real issues:

- Logging a message only above a certain verbosity threshold without
  recording that verbosity level (if klog.V().Enabled() { klog.Info... }):
  this matters when using a logging backend which records the verbosity
  level.

- Passing a format string with parameters to a logging function that
  doesn't do string formatting.

All of these locations where found by the enhanced logcheck tool from
https://github.com/kubernetes/klog/pull/297.

In some cases it reports false positives, but those can be suppressed with
source code comments.

Partial cherry-pick of edffc700a4
2022-12-20 17:25:58 -05:00
Brian McQueen
ae80fed225
change k8s.gcr.io/pause to registry.k8s.io/pause 2022-12-07 11:31:41 -05:00
Paco Xu
974e9492a7 use etcd 3.5.6-0 after promotion 2022-11-24 17:20:31 +08:00
Lubomir I. Ivanov
304eb41e10 kubeadm: mutate ClusterConfiguration.imageRepository to "registry.k8s.io"
If the user runs "kubeadm upgrade apply", kubeadm can download
a configuration from the cluster. If the configuration contains
the legacy default imageRepository of "k8s.gcr.io", mutate it
to the new default of "registry.k8s.io" and update the
configuration in the config map.

During "upgrade node/diff" download the configuration, mutate the
image repository locally, but do not mutate the in-cluster value.
That is done only on "apply".

This ensures that users are migrated from the old default registry
domain.
2022-10-28 14:19:06 +03:00
Lubomir I. Ivanov
a98d0db2af kubeadm: use registry.k8s.io instead of k8s.gcr.io
Update constants, API types, and unit tests to use the new
registry location.

Update dependencies.yaml as well.
2022-10-27 14:33:03 +03:00
Antonio Ojea
7bc8104ff6 kube-proxy wait for cluster cidr skip delete events 2022-10-24 16:13:01 +00:00
Antonio Ojea
6cca063191 kube-proxy handle node PodCIDR changs
Kube/proxy, in NodeCIDR local detector mode, uses the node.Spec.PodCIDRs
field to build the Services iptables rules.

The Node object depends on the kubelet, but if kube-proxy runs as a
static pods or as a standalone binary, it is not possible to guarantee
that the values obtained at bootsrap are valid, causing traffic outages.

Kube-proxy has to react on node changes to avoid this problems, it
simply restarts if detect that the node PodCIDRs have changed.

In case that the Node has been deleted, kube-proxy will only log an
error and keep working, since it may break graceful shutdowns of the
node.
2022-10-24 16:13:01 +00:00
Davanum Srinivas
f9e15b3ac3 etcd: Updated to v3.5.5
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-10-19 09:42:18 +05:30
SataQiu
95d3fbc36d kubeadm: allow RSA and ECDSA format keys in preflight check 2022-09-17 10:41:22 +08:00
Di Jin
0e4fc8b0e6
Add an option for aggregator 2022-09-09 11:20:49 -04:00
Kubernetes Prow Robot
b49bf4e7ee
Merge pull request #111079 from marosset/automated-cherry-pick-of-#108146-upstream-release-1.23
Automated cherry pick of #108146: Fixing logic for kubelet permissions check on windows
2022-08-12 07:32:43 -07:00
Mark Rossetti
579ca64e44 Fixing logic for kubelet permissions check on windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2022-07-11 16:16:39 -07:00
SataQiu
bf4cb96e0f kubeadm: fix the bug that configurable KubernetesVersion not respected during kubeadm join 2022-07-08 21:28:50 +08:00
SataQiu
602dd1dbcf kubeadm: fix the bug that configurable KubernetesVersion not respected during kubeadm join 2022-07-01 09:43:05 +02:00
Kubernetes Prow Robot
884dc65a51
Merge pull request #109381 from JohnRusk/automated-cherry-pick-of-#108107-upstream-release-1.23
Automated cherry pick of #108107: kubelet apiserver: be gentle closing connections on
2022-05-09 02:11:19 -07:00
Kubernetes Prow Robot
dcce2357ff
Merge pull request #108890 from Huang-Wei/automated-cherry-pick-of-#108613-upstream-release-1.23
Automated cherry pick of #108613: Fix a bug that out-of-tree plugin is misplaced when using
2022-04-28 05:25:51 -07:00
Antonio Ojea
8e1fb52b49 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-04-08 10:42:20 +12:00
Antonio Ojea
359ad38d11 kubelet apiserver: be gentle closing connections on heartbeat failures 2022-04-08 10:42:19 +12:00
Lubomir I. Ivanov
e637f54d91 kubeadm: add etcd flag for member data consistency
Include the flag "--experimental-initial-corrupt-check"
in etcd static pod manifests to ensure
etcd member data consistency.

The etcd feature is planned for graduation in 3.6,
at which point we should switch to using the flag
without the "experimental" prefix.
2022-03-28 20:50:51 +03:00
Wei Huang
2faf631707
Fix a bug that out-of-tree plugin is misplaced when using scheduler v1beta3 config 2022-03-22 11:31:16 -07:00
Kubernetes Prow Robot
dec38350d9
Merge pull request #108469 from Haleygo/automated-cherry-pick-of-#108410-upstream-release-1.23
Automated cherry pick of #108410: fix dryrun when ca file exists
2022-03-03 12:53:16 -08:00
Haleygo
0b8199041d fix dryrun when ca file exists 2022-03-03 12:29:36 +08:00
Li Bo
903f164b67
fix regression introduced by PR 100320 2022-03-02 16:45:40 -08:00
SataQiu
799ffd5806 kubeadm: fix the bug that 'kubeadm init --dry-run --upload-certs' command failed with 'secret not found' error 2022-02-15 18:02:06 +08:00
Kubernetes Prow Robot
6330df279a
Merge pull request #107075 from knabben/automated-cherry-pick-of-#106581-upstream-release-1.23
Automated cherry pick of #106581: Enabling kube-proxy metrics on windows kernel mode
2022-01-14 10:34:28 -08:00
Patrick Ohly
16a4de9268 cli: let kubectl handle error printing
cli.Run was an attempt to elliminate error handling in Kubernetes
commands. However, it had to rely on heuristics that are not necessarily right
for all commands.

kubectl is one example which has its own error printing code that should be
used in all cases after a command failure. It now gets used also for
`--warnings-as-errors`. Previously, that caused the following message to be
logged at the end:

  E0110 16:56:01.987555  202060 run.go:120] "command failed" err="1 warning received"

Now it ends with:

 error: 1 warning received
2022-01-11 20:14:24 +01:00
SataQiu
e36b9382ec kubeadm: remove the restriction that the ca.crt can only contain one certificate 2022-01-06 12:45:22 +08:00
Amim Knabben
d42a44fcb2 Enabling kube-proxy metrics on windows kernel mode 2021-12-16 10:33:37 -03:00
Kubernetes Prow Robot
52a3af8f3a
Merge pull request #106933 from SergeyKanzhelev/automated-cherry-pick-of-#106667-upstream-release-1.23
Automated cherry pick of #106667: updated deprecation messages from 1.23 to 1.24
2021-12-14 11:53:02 -08:00
Kubernetes Prow Robot
122e2980af
Merge pull request #106931 from neolit123/automated-cherry-pick-of-#106927-origin-release-1.23
Automated cherry pick of #106854: kubeadm: avoid requiring a CA key during kubeconfig
2021-12-09 21:51:12 -08:00
Sergey Kanzhelev
5fc309181a updated deprecation messages from 1.23 to 1.24 2021-12-09 23:49:26 +00:00
Lubomir I. Ivanov
b63d5a805b kubeadm: avoid requiring a CA key during kubeconfig expiration checks
When the "kubeadm certs check-expiration" command is used and
if the ca.key is not present, regular on disk certificate reads
pass fine, but fail for kubeconfig files. The reason for the
failure is that reading of kubeconfig files currently
requires reading both the CA key and cert from disk. Reading the CA
is done to ensure that the CA cert in the kubeconfig is not out of date
during renewal.

Instead of requiring both a CA key and cert to be read, only read
the CA cert from disk, as only the cert is needed for kubeconfig files.

This fixes printing the cert expiration table even if the ca.key
is missing on a host (i.e. the CA is considered external).
2021-12-09 23:59:43 +02:00
Lubomir I. Ivanov
a18dbc12a4 kubeadm: print the CA of kubeconfig files in "check expiration"
Apply a small fix to ensure the kubeconfig files
that kubeadm manages have a CA when printed in the table
of the "check expiration" command. "CAName" is the field used for that.

In practice kubeconfig files can contain multiple credentials
from different CAs, but this is not supported by kubeadm and there
is a single cluster CA that signs the single client cert/key
in kubeadm managed kubeconfigs.
2021-12-09 23:47:11 +02:00
Lubomir I. Ivanov
880e0ac50f kubeadm: validate local etcd certficates during expiration checks
In case stacked etcd is used, the code that does expiration checks
does not validate if the etcd CA is "external" (missing key)
and if the etcd CA signed certificates are valid.

Add a new function UsingExternalEtcdCA() similar to existing functions
for the cluster CA and front-proxy CA, that performs the checks for
missing etcd CA key and certificate validity.

This function only runs for stacked etcd, since if etcd is external
kubeadm does not track any certs signed by that etcd CA.

This fixes a bug where the etcd CA will be reported as local even
if the etcd/ca.key is missing during "certs check-expiration".
2021-12-09 23:47:11 +02: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
07a883d8e6 Remove //lint:ignore pragmas that aren't being used anymore 2021-11-17 08:56:54 +01:00
Hanna Lee
c862d7c0e9 Fix last remaining SA5011 error by removing unnecessary r != nil check 2021-11-17 08:56:01 +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
Hanna Lee
0f3836dcc5 Ignore deprecation warnings with //nolint:staticcheck 2021-11-17 08:55:57 +01:00
Kubernetes Prow Robot
9dd8aad535
Merge pull request #104750 from sanposhiho/fix/bug/proxy/defer-with-os-exit
Fix(kube-proxy): remove os.Exit from cobra.Command
2021-11-16 21:13:53 -08:00
Kubernetes Prow Robot
c0b5ed7556
Merge pull request #105611 from damemi/simplified-multipoint-extension
Scheduler simplified MultiPoint plugin config
2021-11-16 17:44:12 -08: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
Kubernetes Prow Robot
8d9e424f73
Merge pull request #103447 from trierra/csi-translation-portworx
Csi translation portworx
2021-11-16 17:43:53 -08:00
Kubernetes Prow Robot
e14bdbaa1c
Merge pull request #105057 from jiahuif-forks/feature/enum-types-feature-enablement
Add Support for OpenAPIEnum in OpenAPI v2
2021-11-16 16:35:55 -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