Commit Graph

12268 Commits

Author SHA1 Message Date
Dr. Stefan Schimanski
3b6d2a66a4 pkg/controlplane: split apart generic server part of instance.go
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-29 10:15:02 +02:00
Kubernetes Prow Robot
c6b6163e2e Merge pull request #124576 from sttts/sttts-peer-proxy-generic-move
controlplane/apiserver: move peer proxy code to allow generic aggregator construction
2024-04-29 01:11:06 -07:00
Dr. Stefan Schimanski
c252ebe50c controlplane/apiserver: move peer proxy code to allow aggregator construction
This reverts commit 0bb6ff5e454cfc99c0b611e22162391eaa31e103.

Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-29 08:13:43 +02:00
Dan Winship
f1f390f13b clean up LocalTrafficDetector construction / tests (#124582)
* LocalTrafficDetector construction and test improvements

* Reorder getLocalDetector unit test fields so "input" args come before "output" args

* Don't pass DetectLocalMode as a separate arg to getLocalDetector

It's already part of `config`

* Clarify test names in preparation for merging

* Merge single-stack/dual-stack LocalTrafficDetector construction

Also, only warn if the *primary* IP family is not correctly configured
(since we don't actually know if the cluster is really dual-stack or
not), and pass the pair of detectors to the proxiers as a map rather
than an array.

* Remove the rest of Test_getDualStackLocalDetectorTuple
2024-04-28 08:51:23 -07:00
Kubernetes Prow Robot
7196c749f2 Merge pull request #124147 from devincd/put-qps-cmd
Place the qps and burst parameters on the command line in kubemark
2024-04-28 04:53:11 -07:00
Kubernetes Prow Robot
38c2a963b4 Merge pull request #123984 from carlory/volume-remove-cloud-provider
Remove cloud provider dependency from volume host and volume controllers
2024-04-28 02:54:14 -07:00
Dr. Stefan Schimanski
3daae717c3 controlplane: split out SystemNamespaces
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
2024-04-27 14:19:56 +02:00
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
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