Commit Graph

4460 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a31030543c Merge pull request #124920 from kimsehwan96/update-an-incorrect-comment-in-kubeadm-controlplane-join-phase
Update an incorrect comment in kubeadm controlplane join phase
2024-05-17 06:03:51 -07:00
Kubernetes Prow Robot
67012614c3 Merge pull request #124442 from neolit123/1.31-add-image-pull-policy-to-upgrade-config
kubeadm: support image pull mode and policy in UpgradeConfiguration
2024-05-16 20:12:52 -07:00
kimsehwan96
894a838a1a Update an incorrect comment in kubeadm controlplane join phase 2024-05-17 12:09:42 +09:00
Kubernetes Prow Robot
22f3ce5e5e Merge pull request #124820 from SataQiu/feat-kubeadm-20240511
kubeadm: add support for patching a corednsdeployment target
2024-05-16 02:38:22 -07:00
Lubomir I. Ivanov
df87a503c2 kubeadm: use UpgradeNodeConfiguration.IgnorePreflightErrors
When using UpgradeNodeConfiguration.IgnorePreflightErrors the field
is currently ignored in favor of the "defualted" field created
by configutil.FetchInitConfigurationFromCluster.

Fix this bug.
2024-05-16 11:34:39 +03:00
Lubomir I. Ivanov
0faa2bfbc1 kubeadm: support image pull mode and policy in UpgradeConfiguration
Add Upgrade{Apply|Node}Configuration.{ImagePullPolicy|ImagePullSerial}.
The same feature already exists in NodeRegistrationOptions for
{Init|Join}Configuration.
2024-05-16 11:34:39 +03:00
carlory
7582a768b7 kubeadm: remove outdate todo 2024-05-13 12:08:57 +08:00
SataQiu
1329935739 kubeadm: add support for patching a corednsdeployment target 2024-05-11 18:21:20 +08:00
Kubernetes Prow Robot
eeb42fa543 Merge pull request #124678 from my-git9/dns-test-54
kubeadm: increase ut coverage for addon/dns
2024-05-08 21:46:39 -07:00
Kubernetes Prow Robot
78bc18dcb0 Merge pull request #124715 from SataQiu/fix-kubeadm-20240507
kubeadm: remove deprecated UpgradeAddonsBeforeControlPlane featuregate
2024-05-07 13:29:24 -07:00
Kubernetes Prow Robot
72786649b6 Merge pull request #124652 from neolit123/1.31-add-cert-expiration-v1beta4
kubeadm: add support for custom cert validity period in v1beta4
2024-05-07 10:38:51 -07:00
SataQiu
6f94700886 kubeadm: remove deprecated UpgradeAddonsBeforeControlPlane featuregate 2024-05-07 09:24:10 +08:00
xin.li
d1dff562ad kubeam: increase ut coverage for addon/dns
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-05-03 21:21:06 +08:00
SataQiu
1c82e03c2a kubeadm: remove unused CreateKubeConfigFileFunc type 2024-05-03 16:19:51 +08:00
Lubomir I. Ivanov
d105ddd350 kubeadm: update the IsPriviligedUser preflight check on Windows
Use GetCurrentProcessToken() instead of checking the groups of a user.

The Go stdlib way of fetching the groups of an user appears
to be failing on some Windows setups. Which could be a regression
in later Go versions, or simply the code does not work on certain
setups.
2024-05-02 20:23:02 +03:00
Lubomir I. Ivanov
74e1438d86 kubeadm: add support for custom cert validity period in v1beta4
Allow the user to pass custom cert validity period with
ClusterConfiguration.CertificateValidityPeriod and
CACertificateValidityPeriod.

The defaults remain 1 year for regular cert and 10 years for CA.
Show warnings if the provided values are more than the defaults.

Additional changes:
- In "certs show-expiration" use HumanDuration() to print
more detailed durations instead of ShortHumanDuration().
- Add a new kubeadm util GetStartTime() which can be used
to consistently get a UTC time for tasks like writing certs
and unit tests.
- Update unit tests to validate the new customizable NotAfter.
2024-05-01 19:01:49 +03:00
Kubernetes Prow Robot
29a4812f03 Merge pull request #124080 from claudiubelu/skip-windows-tests
Skip failing Windows tests
2024-05-01 07:48:12 -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
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
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
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
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
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
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
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
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
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
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
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
carlory
363fee59e4 fix panic with SIGSEGV in kubeadm certs check-expiration 2024-04-01 11:09: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