Commit Graph

12457 Commits

Author SHA1 Message Date
Antonio
250d00d8dc #128117 Fix misleading kubadm output
The control-plane should be referred to in plural otherwise it can be misleading to join the the cp to other nodes.
2024-10-16 11:32:18 +02:00
Kubernetes Prow Robot
62c1aa0529 Merge pull request #127929 from pohly/prune-junit-xml-failure
prune-junit-xml: simplify failure message
2024-10-14 17:08:21 +01:00
Kubernetes Prow Robot
769695a218 Merge pull request #126776 from neolit123/1.31-improve-dry-run-logic
kubeadm: refactor the dry-run logic
2024-10-14 10:20:21 +01:00
Patrick Ohly
fba2bcf2d2 prune-junit-xml: simplify failure message
In Go unit tests, the entire test output becomes the failure message because
`go test` doesn't track why a test fails. This can make the failure message
pretty large, in particular in integration tests.

We cannot identify the real failure either because Kubernetes has no convention
for how to format test failures. What we can do is recognize log output added
by klog.

prune-junit-xml now moves the full text to to the test output and only keep
those lines in the failure which are not from klog.

The klog output parsing might eventually get moved to
k8s.io/logtools/logparse. For now it is developed as a sub-package of
prune-junit-xml.
2024-10-13 09:37:50 +02:00
Lubomir I. Ivanov
30f9893374 kubeadm: refactor the dry-run logic
The current dryrun client implemnetation is suboptimal
and sparse. It has the following problems:

- When an object CREATE or UPDATE reaches the default dryrun client
the operation is a NO-OP, which means subsequent GET calls must
fully emulate the object that exists in the store.
- There are multiple implmentations of a DryRunGetter interface
such the one in init_dryrun.go but there are no implementations
for reset, upgrade, join.
- There is a specific DryRunGetter that is backed by a real
client in clientbacked_dryrun.go, but this is used for upgrade
and does not work in conjuction with a fake client.

This commit does the following changes:

- Removes all existing *dryrun*.go implementations.
- Add a new DryRun implementation in dryrun.go that implements
3 clients - fake clientset, real clientset, real dynamic client.
- The DryRun object uses the method chaining pattern.
- Allows the user opt-in into real clients only if needed, by passing
a real kubeconfig. By default only constructs a fake client.
- The default reactor chain for the fake client, always logs the
object action, then for GET or LIST actions attempts to use the
real dynamic client to get the object. If a real object does not
exist it attempts to get the object from the fake object store.
- The user can prepend or append reactors to the chain.
- All known needed reactors for operations during init, join,
reset, upgrade are added as methods of the DryRun struct.
- Adds detailed unit test for the DryRun struct and its methods
including reactors.

Additional changes:
- Use the new DryRun implementation in all command workflows -
init, join, reset, upgrade.
- Ensure that --dry-run works even if there is no active cluster
by returning faked objects. For join, a faked cluster-info
with a fake bootstrap token and CA are used.
2024-10-11 00:15:59 +03:00
Kubernetes Prow Robot
cc67c4cf34 Merge pull request #127970 from aaron-prindle/set-add-feature-kube-apiserver-test-framework
test: enable featureGate AddMetrics on kube-apiserver testserver
2024-10-10 00:28:29 +01:00
Kubernetes Prow Robot
dd87bc0646 Merge pull request #127901 from skitt/k8s-sigs-yaml
Use sigs.k8s.io/yaml instead of gopkg.in/yaml
2024-10-09 19:38:29 +01:00
Aaron Prindle
4e2562e0bb test: enable featureGate AddMetrics on kube-apiserver testserver 2024-10-09 03:14:15 +00:00
Kubernetes Prow Robot
e386aa0ac4 Merge pull request #127893 from aokumasan/fix-incorrect-test-case-name
Fix incorrect test case name
2024-10-08 14:42:22 +01:00
Stephen Kitt
f1fa4086b3 Use sigs.k8s.io/yaml instead of gopkg.in/yaml
Since we have a Kubernetes-specific fork of go-yaml, use that
consistently throughout the project. This doesn't eliminate the
dependencies on gopkg.in/yaml, which are still used indirectly; but it
ensures that the whole project benefits from fixes or changes to
sigs.k8s.io/yaml.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2024-10-07 15:32:00 +02:00
Kubernetes Prow Robot
7b28a115ba Merge pull request #127810 from aojea/proxy_conntrack_flags
unit test kube-proxy conntrack flags
2024-10-05 19:48:03 +01:00
Antonio Ojea
df7215a144 unit test kube-proxy conntrack flags
Assert the flag behavior on kube-proxy using unit tests.
2024-10-05 13:29:34 +00:00
aokumasan
0b62989086 Fix incorrect test case name 2024-10-05 18:45:01 +09:00
Kubernetes Prow Robot
5ecd83f1e6 Merge pull request #127843 from Cookiery/chore/cleanup
chore: cleanup lint, remove unused args, etc.
2024-10-05 06:46:27 +01:00
Cookiery
4ce7f8547d chore: cleanup code
chore: cleanup code

chore: cleanup code

chore: cleanup code
2024-10-04 20:43:01 +08:00
Kubernetes Prow Robot
c923a61ddd Merge pull request #125982 from harche/compressible_reserved
Set only compressible resources on system and kube reserved cgroup slices
2024-10-04 04:08:27 +01:00
Harshal Patil
3bad47e8ed Set only compressible resources on system slice
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2024-10-03 13:23:34 -04:00
Antonio Ojea
7c4c7b14b2 Revert "kube-proxy: internal config: refactor HealthzAddress and MetricsAddress " 2024-10-02 15:08:35 +02:00
Kubernetes Prow Robot
98657377dc Merge pull request #126889 from aroradaman/kube-proxy-refactor-healthz-metrics-address
kube-proxy: internal config: refactor HealthzAddress and MetricsAddress
2024-10-01 14:45:49 +01:00
Kubernetes Prow Robot
1b71b94b73 Merge pull request #127711 from elmiko/correct-provider-deprecation-logic
Correct cloud provider detection logic to be more representative of deprecation and disablement status
2024-09-30 20:37:24 +01:00
elmiko
38fe239ac4 factor our cloudprovider.DeprecationWarningForProvider
this change removes the deprecation warning function in favor of using
the `cloudprovider.DisableWarningForProvider`. it also fixes some of the
logic to ensure that non-external providers are properly detected and
warned about.
2024-09-30 12:20:25 -04:00
Kubernetes Prow Robot
e34f7f4d80 Merge pull request #127671 from mmorel-35/testify/error-contains
fix: use `ErrorContains(t, err` instead of `Contains(t, err.Error()`
2024-09-28 19:18:01 +01:00
Kubernetes Prow Robot
0c713c7bd6 Merge pull request #127285 from bzsuni/bz/etcd/update/v3.5.16
Update etcd from v3.5.15 to v3.5.16
2024-09-28 15:16:02 +01:00
Kubernetes Prow Robot
80941e3e87 Merge pull request #127643 from Jefftree/set-emulation-integration-test
Allow emulation version to be set in integration test
2024-09-27 21:56:01 +01:00
Matthieu MOREL
f777addb05 fix: use ErrorContains(t, err instead of Contains(t, err.Error()
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-26 22:22:20 +02:00
Jeffrey Ying
ff13ffc6e0 Update cmd/kube-apiserver/app/testing/testserver.go
Co-authored-by: Joe Betz <jpbetz@google.com>
2024-09-26 15:29:33 -04:00
Jeffrey Ying
396d36596c Update cmd/kube-apiserver/app/testing/testserver.go
Co-authored-by: Joe Betz <jpbetz@google.com>
2024-09-26 15:29:24 -04:00
elmiko
d1d05d3eba remove IsDeprecatedInternal from cloudprovider.plugins
The internal cloud controller loops are disabled at this point, this
function should not be used as it does not return accurate information.
In its place we check for the presence of the external cloud provider as
that is the only acceptable value.
2024-09-26 14:55:25 -04:00
SataQiu
2dc0d2962a kubeadm: fix a bug where the RemoveMember function did not return the correct member list when the member to be removed did not exist 2024-09-26 14:29:30 +08:00
Jefftree
dacc2e1f5d Allow emulation version to be set in integration test 2024-09-25 22:01:15 -04:00
Kubernetes Prow Robot
4c4edfede5 Merge pull request #127398 from my-git9/patch-23
kubeadm: update comment for ArgumentsFromCommand function in app/util/arguments
2024-09-25 11:40:00 +01:00
xin.li
706e939382 kubeadm: update comment for ArgumentsFromCommand function in app/util/arguments
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-09-25 16:19:28 +08:00
Kubernetes Prow Robot
99ff62e87a Merge pull request #127491 from SataQiu/fix-etcd-20240920
kubeadm: check whether the peer URL for the added etcd member already exists when the MemberAddAsLearner/MemberAdd fails
2024-09-25 05:08:07 +01:00
Kubernetes Prow Robot
5dd244ff00 Merge pull request #125796 from haorenfsa/fix-gc-sync-blocked
garbagecollector: controller should not be blocking on failed cache sync
2024-09-25 04:02:00 +01:00
SataQiu
9af1b25bec kubeadm: check the member list status before adding or removing an etcd member 2024-09-24 22:53:42 +08:00
Daman Arora
3fe9ecd5af kube-proxy: internal config: refactor Healthz and Metrics Address
Refactor Healthz with Metrics Address for internal configuration of
kube-proxy adhering to the v1alpha2 version specifications as detailed
in https://kep.k8s.io/784.

Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-09-23 23:16:30 +05:30
Daman Arora
11c0683c32 kube-proxy: use netutils.MultiListen for healthz and metrics server
Signed-off-by: Daman Arora <aroradaman@gmail.com>
2024-09-23 23:03:26 +05:30
Kubernetes Prow Robot
f9a57ba82d Merge pull request #126760 from ncdc/ncdc/emeritus
Move ncdc to emeritus
2024-09-20 21:01:58 +01:00
Kubernetes Prow Robot
f2700895a4 Merge pull request #127422 from srivastav-abhishek/go-vet-fix
Go vet fixes for gotip
2024-09-20 14:37:58 +01:00
Abhishek Kr Srivastav
95860cff1c Fix Go vet errors for master golang
Co-authored-by: Rajalakshmi-Girish <rajalakshmi.girish1@ibm.com>
Co-authored-by: Abhishek Kr Srivastav <Abhishek.kr.srivastav@ibm.com>
2024-09-20 12:36:38 +05:30
SataQiu
18318a32ce kubeadm: check whether the peer URL for the added etcd member already exists when the MemberAddAsLearner/MemberAdd fails 2024-09-20 11:52:47 +08:00
Kubernetes Prow Robot
920e9e34b0 Merge pull request #126977 from aaron-prindle/compat-version-132
chore: bump DefaultKubeBinaryVersion to 1.32, make 1.32 CEL changes, fix int tests to handle 1 version off API deprecation, and fix prerelease-lifecycle-gen for # of APIs
2024-09-17 23:50:43 +01:00
Aaron Prindle
701e6c7ab1 chore: bump DefaultKubeBinaryVersion to 1.32, make 1.32 CEL changes, fix int tests to handle 1 version off API deprecation, and fix prerelease-lifecycle-gen for # of APIs 2024-09-17 19:32:14 +00:00
Jordan Liggitt
3153a73653 Merge kubelet configuration files using versioned serialized data 2024-09-17 11:59:09 -04:00
haorenfsa
87ca404634 garbagecollector: add initialSyncTimeout for Run
Signed-off-by: haorenfsa <haorenfsa@gmail.com>
2024-09-14 00:01:37 +08:00
Yuya Yabe
db66416c45 Add activeDeadlineSeconds to kubeadm upgrade-health-check job
With https://github.com/kubernetes/kubernetes/pull/122079,
kubeadm now relies on `ttlSecondsAfterFinished` to clean
up `upgrade-health-check` once its pod reaches a terminal state.
However, there is a case where the pod won't reach a terminal state and
the job will not register a terminal state, hence no garbage collection.

For example, if the pause image is not present, `ErrImagePull` will make
the pod keep retrying to pull the image and the pod will never reach a
terminal state on its own. And the job will continue to wait for the pod
to reach a terminal state which will not happen.

So we need to set `activeDeadlineSeconds` to prevent the job from
waiting forever for the pod to reach a terminal state.

Without this, users invoking `kubeadm upgrade plan` need to cleanup the
job outside of kubeadm even if they ignore the preflight result because
the job still runs when the result is configured to be ignored via
`--ignore-prelight-errors=CreateJob` flag.

Since the timeout for the polling in the `CreateJob` step in kubeadm
is 15 seconds, we should set the `activeDeadlineSeconds` to the same
timeout.
2024-09-12 19:40:25 +00:00
Lubomir I. Ivanov
914fd40712 kubeadm: add default paths to 'upgrade diff'
After the flags to control manifest paths were removed,
the variables in diff.go remained empty and the validation
fails with "empty manifest path".

Always populate the paths with the kubeadm defaults under
/etc/kubernetes/manifest and remove the empty path validation.
2024-09-12 11:59:53 +03:00
Kubernetes Prow Robot
d62b797c16 Merge pull request #127123 from neolit123/1.32-remove-deprecated-upgrade-flags
kubeadm: remove deprecated upgrade flags for 1.32
2024-09-11 19:03:20 +01:00
SataQiu
036e072e41 kubeadm: skip addons phase on worker node 2024-09-11 14:28:09 +08:00
bzsuni
5b6ef4302e Update etcd from v3.5.15 to v3.5.16
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-09-11 10:51:34 +08:00