Commit Graph

12247 Commits

Author SHA1 Message Date
Claudiu Belu
2be8baeaef unittests: Skip failing Windows tests
Some of the unit tests are currently failing on Windows.

Skip them for now, and remove the skips later, once the underlying issues
have been resolved.
2024-04-25 14:24:16 +00:00
Dan Winship
dc1155bd53 Move LocalTrafficDetector from pkg/proxy/util/iptables to pkg/proxy/util
Since it's used for nftables as well now.
2024-04-25 08:51:43 -04:00
Kubernetes Prow Robot
17854f0e0a Merge pull request #124496 from carlory/output-alpha3
kubeadm: remove the deprecated output.kubeadm.k8s.io/v1alpha2
2024-04-24 21:02:51 -07:00
Kubernetes Prow Robot
58788c2f7b Merge pull request #124466 from serathius/featuregate-defer
Cleanup defer from SetFeatureGateDuringTest function call
2024-04-24 15:31:21 -07:00
Kubernetes Prow Robot
bc05bef903 Merge pull request #124352 from wojtek-t/idempotent_transformer_func
Idempotent transformers in scheduler & kcm
2024-04-24 12:35:02 -07:00
Marek Siarkowicz
3ee8178768 Cleanup defer from SetFeatureGateDuringTest function call 2024-04-24 20:25:29 +02:00
bells17
1c917aa463 component-helpers: Support structured and contextual logging (#120637) 2024-04-24 03:06:15 -07:00
Kubernetes Prow Robot
646fbe6d0a Merge pull request #124480 from neolit123/1.31-fix-upgrade-component-config
kubeadm: fix bug of kubeletconfig not being downloaded on upgrade
2024-04-24 01:20:24 -07:00
Kubernetes Prow Robot
5291c11a0e Merge pull request #124468 from neolit123/1.31-improve-unit-test-performance-with-test-versions
kubeadm: improve performance of unit tests that need a k8s version
2024-04-24 01:20:17 -07:00
carlory
4f0ee034ec kubeadm: remove the deprecated output.kubeadm.k8s.io/v1alpha2 2024-04-24 15:01:20 +08:00
Lubomir I. Ivanov
eeac2dda70 kubeadm: use new etcd /livez and /readyz endpoints
etcd >= 3.5.11 includes new endpoints for liveness, startup
and readyness probes. Use them in 1.31.
2024-04-23 17:07:27 +03:00
Lubomir I. Ivanov
a04cc020f1 kubeadm: make sure we only track >= 3 etcd versions at at time
There is no point to track more than 3 etcd versions at a time
where each etcd versions maps to a k8s CP version.

It's 3 instead of 2 (k8s CP / kubeadm version skew size) because
there is a period of time where the 3rd version (newest) will
be WIP at k/k master - e.g. at the time of this commit it's 1.31.

Add a unit test to block on this.

Also fixate the min etcd version to 3.5.11.
2024-04-23 17:07:06 +03:00
Lubomir I. Ivanov
71e9712f6c kubeadm: fix bug of kubeletconfig not being downloaded on upgrade
During upgrade apply we had logic to download the kubelet and
kubeproxy configs from the cluster as part of the call to:
  FetchInitConfigurationFromCluster()

With the introduction of UpgradeConfiguration there was
some refactor in this area and the function no longer
had the argument skipComponentConfigs set to false.

It is set to 'true', an InitConfiguration is downloaded
but it would contain empty / defaulted component configs.

- Set the argument to 'false'
- Perform minor cleanup of STDOUT messages and comments.
that were missed in 1.30.
2024-04-23 16:21:52 +03:00
Kubernetes Prow Robot
695a984f56 Merge pull request #124027 from liangyuanpeng/etcd_update_3.5.13
etcd: update to v3.5.13
2024-04-23 06:00:02 -07:00
Kubernetes Prow Robot
3c323f8546 Merge pull request #124464 from carlory/output-alpha3
kubeadm use output/v1alpha3 version to print objects
2024-04-23 04:08:30 -07:00
Lubomir I. Ivanov
6e17cc7f0e kubeadm: mark the phase 'experimental-cert-rotation' as deprecated
- Mark the phase 'init kubelet-finilize experimental-cert-rotation'
as deprecated and print a warning if its used directly. It should be
removed in 1.32.
- Add a replacement phase 'enable-client-cert-rotation'.

(!!) We should stop using the 'experimental' and 'alpha' names for
phases, clI flags and k8s object names as this complicates
the graduation and users will use the feature in production regardless.

Having a 'DEPRECATED' or 'EXPERIMENTAL' text in descriptions is
sufficient to indicate a status of a feature that should not be used
in production.
2024-04-23 13:54:51 +03:00
Lubomir I. Ivanov
59746fbf4f kubeadm: improve performance of unit tests that need a k8s version
The function KubernetesReleaseVersion is being called in
a number of locations during unit tests but by default it
uses a "fetch version from URL" approach.

- Update the function to return a placeholder version
during unit tests.
- Update unit tests for this function.
- Update strings / comments in other version_tests.go
locations.

The improvement is significant:

time go test k8s.io/kubernetes/cmd/kubeadm/app/... -count=1

before:
real    2m47.733s

after:
real    0m10.234s
2024-04-23 13:50:19 +03:00
carlory
3d55c21e90 kubeadm use output/v1alpha3 version to print objects 2024-04-23 13:47:48 +08:00
Ziqi Zhao
be4535bd34 convert k8s.io/kubernetes/pkg/proxy to contextual logging, part 1
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2024-04-22 13:08:41 +08:00
carlory
a23e278d15 Graduate the flag for structural output --experimental-output to just --output 2024-04-19 16:22:45 +08:00
Kubernetes Prow Robot
0e39ca84dc Merge pull request #124375 from neolit123/1.31-remove-experimental-from-rootfs
kubeadm: remove the EXPERIMENTAL description from --rootfs
2024-04-18 13:05:35 -07:00
Kubernetes Prow Robot
c4bce63d98 Merge pull request #124374 from neolit123/1.31-remove-experimental-description-of-download-certs
kubeadm: remove the EXPERIMENTAL tag of the download-certs phase
2024-04-18 08:49:39 -07:00
Kubernetes Prow Robot
b2c32fb015 Merge pull request #123105 from danwinship/nodeport-addresses-primary
Add `--nodeport-addresses primary`, warn on empty `--nodeport-addresses`
2024-04-18 08:49:21 -07:00
Kubernetes Prow Robot
6bb968c4d2 Merge pull request #124373 from neolit123/1.31-remove-deprecated-update-status-phase
kubeadm: remove the deprecated "update-status" phase of "join"
2024-04-18 07:48:23 -07:00
Kubernetes Prow Robot
64f76b603a Merge pull request #124186 from HirazawaUi/remove-unused-func
[kubeadm]: remove kubeadm unused function
2024-04-18 06:31:30 -07:00
Dan Winship
fde1af55d2 Warn users with bad --nodeport-addresses
If users don't pass any --nodeport-addresses, suggest they should pass
`--nodeport-addresses primary`, to avoid accepting NodePort
connections on all interfaces.

If users pass a single-stack --nodeport-addresses in what looks like a
dual-stack cluster, warn them that they probably ought to be passing a
dual-stack --nodeport-addresses.
2024-04-18 09:25:06 -04:00
Dan Winship
0b599aa8e3 Add --nodeport-addresses primary
The behavior when you specify no --nodeport-addresses value in a
dual-stack cluster is terrible and we can't fix it, for
backward-compatibility reasons. Actually, the behavior when you
specify no --nodeport-addresses value in a single-stack cluster isn't
exactly awesome either...

Allow specifying `--nodeport-addresses primary` to get the
previously-nftables-backend-specific behavior of listening on only the
node's primary IP or IPs.
2024-04-18 09:25:06 -04:00
Lubomir I. Ivanov
142e077bcb kubeadm: remove the EXPERIMENTAL description from --rootfs
The global kubeadm --rootfs flag is now considered
non-experimental.
2024-04-18 15:54:42 +03:00
Lubomir I. Ivanov
f309a0c7a6 kubeadm: remove the EXPERIMENTAL tag of the download-certs phase
The phase was tagged as EXPERIMENTAL 5+ years ago.
2024-04-18 15:46:34 +03:00
Lubomir I. Ivanov
917c8d67c5 kubeadm: remove the deprecated "update-status" phase of "join"
The phase has been deprecated and a NO-OP for 3+ years.
2024-04-18 15:40:08 +03:00
Kubernetes Prow Robot
e6efba3380 Merge pull request #124361 from neolit123/1.31-stop-mounting-etc-pki
kubeadm: don't mount /etc/pki for apiserver and KCM
2024-04-18 05:27:59 -07:00
carlory
9ec6ee539a Remove cloud provider dependency from volume host and volume controllers 2024-04-18 19:00:37 +08:00
Lubomir I. Ivanov
9c156218cc kubeadm: don't mount /etc/pki for apiserver and KCM
According to kubeadm repo ticket 1665, /etc/pki
can contain subdirectories with private keys on some distros.
Avoid mounting the entire /etc/pki and mount /etc/pki/ca-trust
and /etc/pki/tls/certs instead. These directories are mounted
as an extra locations which can be used to search
for additional system CAs.
2024-04-18 12:33:18 +03:00
Kubernetes Prow Robot
f3e7e008a4 Merge pull request #124038 from SataQiu/fix-kubeadm-20240325
kubeadm: stop storing the ResolverConfig in the global KubeletConfiguration and instead set it dynamically for each node
2024-04-18 02:11:29 -07:00
Kubernetes Prow Robot
ab91dd6905 Merge pull request #123842 from my-git9/upgrade-fds
kubeadm: increase ut converage for config/upgradeconfiguration
2024-04-18 01:04:12 -07:00
Kubernetes Prow Robot
501cfb7482 Merge pull request #123545 from yangjunmyfm192085/fixproxymetrics
fix:When the --bind-address parameter of kube-proxy is configured as ipv6, the ip address of metrics listens to 127.0.0.1 by default, instead of::1
2024-04-18 00:01:03 -07:00
Kubernetes Prow Robot
96ad82583f Merge pull request #122363 from carlory/post-ga-cleaning-up-iptables-chain-ownership
remove deprecated kubelet command-line flags
2024-04-18 00:00:05 -07:00
Kubernetes Prow Robot
ef2c682635 Merge pull request #122082 from carlory/remove-keep-terminated-pod-volumes
keep-terminated-pod-volumes flag on kubelet is removed
2024-04-17 23:59:54 -07:00
Kubernetes Prow Robot
3fda574e5e Merge pull request #121770 from frzifus/tracing_kubelet_read-only
pass tracerprovider to kublet-readonly server
2024-04-17 23:59:33 -07:00
Kubernetes Prow Robot
56b39eab7c Merge pull request #119436 from claudiubelu/unittests-9
unittests: Fixes unit tests for Windows (part 9)
2024-04-17 22:51:32 -07:00
Wojciech Tyczyński
7b38106255 Idempotent transformers in scheduler & kcm 2024-04-17 21:08:44 +02:00
杨军10092085
86a31ca302 fix:When the parameter of kube-proxy is configured as ipv6, the ip address of metrics listens to 127.0.0.1 by default, instead of::1 2024-04-16 08:56:49 +08:00
Lan Liang
1dc735fd70 etcd: update to v3.5.13
Signed-off-by: Lan Liang <gcslyp@gmail.com>
2024-04-13 09:37:25 +00:00
HirazawaUi
4a4a04fa74 remove kubeadm unused function 2024-04-04 23:36:00 +08:00
devincd
9523e0fe8d put qps and burst to cmd
Signed-off-by: devincd <505259926@qq.com>
2024-04-02 18:08:26 +08:00
carlory
363fee59e4 fix panic with SIGSEGV in kubeadm certs check-expiration 2024-04-01 11:09:53 +08:00
carlory
6bea3ae99a fix ProbeControllerVolumePlugins func 2024-03-27 16:53:53 +08:00
Claudiu Belu
c2dfcf1e34 unittests: Fixes unit tests for Windows (part 9)
Currently, there are some unit tests that are failing on
Windows due to various reasons:

- time.Now() is not as precise on Windows, which means that
  2 consecutive calls may return the same timestamp.
- Different "File not found" error messages on Windows.
- The default Container Runtime URL scheme on Windows is npipe, not unix.
2024-03-26 13:42:50 +00:00
SataQiu
c1f2167803 kubeadm: stop storing the ResolverConfig in the global KubeletConfiguration and instead set it dynamically for each node 2024-03-25 18:26:46 +08:00
xin.li
a4fe397ebd kubeadm: increase ut converage for config/upgradeconfiguration
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-03-11 13:27:24 +08:00