Commit Graph

12208 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
ae8474adcd Merge pull request #124557 from danwinship/metrics-and-stuff
kube-proxy metrics cleanup (and stuff)
2024-04-26 18:31:57 -07:00
Dr. Stefan Schimanski
7e0fea2331 kube-apiserver/aggregator: remove unused PeerCAFile in config
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-26 23:22:09 +02:00
Kubernetes Prow Robot
563885e4bd Merge pull request #124551 from sttts/sttts-kube-apiserver-config-split
pkg/controlplane: split up config into generic controlplane and kube-related part
2024-04-26 14:16:12 -07:00
Kubernetes Prow Robot
4b2d1b6a20 Merge pull request #124529 from danwinship/localtraffic-cleanup-1
LocalTrafficDetector implementation cleanup
2024-04-26 14:16:03 -07:00
Kubernetes Prow Robot
bae83009d3 Merge pull request #124503 from neolit123/1.31-convert-create-job-preflight-to-warning
kubeadm: check for available nodes during 'CreateJob' preflight
2024-04-26 08:49:26 -07:00
Dr. Stefan Schimanski
96a144c977 Address comments
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-26 17:47:30 +02:00
Dan Winship
3db434d6be Remove errors from LocalTrafficDetector constructors
The constructors only return an error if you pass them invalid data,
but we only ever pass them data which has already been validated,
making the error checking just annoying. Just make them return garbage
output if you give them garbage input.
2024-04-26 11:34:37 -04:00
Dan Winship
ba57fd7c84 Merge linux and windows kube-proxy metric registration together
Windows proxy metric registration was in a separate file, which had
led to some metrics (eg the new ProxyHealthzTotal and ProxyLivezTotal)
not being registered for Windows even though they were implemented by
platform-generic code.

(A few other metrics were neither registered on, nor implemented on
Windows, and that's probably a bug.)

Also, beyond linux-vs-windows, make it clearer which metrics are
specific to individual backends.
2024-04-26 09:27:41 -04:00
Dr. Stefan Schimanski
e37917fea7 pkg/controlplane: split up config into generic controlplane and kube-related part
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-26 14:14:06 +02:00
Kubernetes Prow Robot
4066055caa Merge pull request #124549 from sttts/sttts-aggregator-without-crds
kube-apiserver/aggregator: fix panic with crds disabled
2024-04-26 03:09:18 -07:00
Lubomir I. Ivanov
786ad3ca81 kubeadm: check for available nodes during 'CreateJob' preflight
Instead of erroring during the preflight check 'CreateJob'
from "upgrade" commands when there are no schedulable nodes,
show a warning.

This can happen in single node clusters.

Also increase the Job TTL after completion to 20 seconds
to make sure it's more than the timeout what waits
for the Job to complete.
2024-04-26 12:18:02 +03:00
Dr. Stefan Schimanski
91de83b694 kube-apiserver/aggregator: fix panic with crds disabled
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-26 09:05:20 +02:00
Kubernetes Prow Robot
ba05a8deb3 Merge pull request #124419 from neolit123/1.31-deprecate-experimental-cert-rotation
kubeadm: mark the phase 'experimental-cert-rotation' as deprecated
2024-04-25 23:28:39 -07:00
SataQiu
328c5edaeb kubeadm: enable KubernetesReleaseVersion test 2024-04-26 11:30:51 +08:00
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
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