Commit Graph

120678 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
a4a56701b5
Merge pull request #122811 from neolit123/1.30-v1beta4-timeouts
kubeadm: keep a function with short timeout in idempotency.go
2024-01-17 04:37:11 +01:00
Kubernetes Prow Robot
d399535b01
Merge pull request #122762 from yxxhero/check-initData-and-joinData-safely
Fix type assertion error in init and join commands for kubeadm
2024-01-17 04:37:05 +01:00
carlory
041e97af1f fix evaluate resource quota if a resource is updated when the InPlacePodVerticalScaling feature-gate is on 2024-01-17 11:02:54 +08:00
carlory
5ff42b2368 fix issue with using feature HonorPVReclaimPolicy in csi-provisioner 2024-01-17 10:57:30 +08:00
Kubernetes Prow Robot
c1fff408c0
Merge pull request #120254 from ionutbalutoiu/windows-tests/conn-check-retries
windows-tests: Add retries to Windows `assertConsistentConnectivity` …
2024-01-17 02:21:38 +01:00
yxxhero
d21fc96db3 Fix type assertion error in init and join commands for kubeadm
Signed-off-by: yxxhero <aiopsclub@163.com>
2024-01-17 07:50:29 +08:00
Kubernetes Prow Robot
f84b2f0254
Merge pull request #122729 from jparrill/HOSTEDCP-336
Kube codegen tool now ignore the vendor folder by default on code generation
2024-01-16 20:48:44 +01:00
Lukasz Szaszkiewicz
8a32f346a0
kube/features: improve unit testing known/registered features
Co-authored-by: Ben Luddy <bluddy@redhat.com>
2024-01-16 12:51:00 -05:00
Ben Luddy
995135973d
Inject feature gate instance into client-go for kube components.
In order to avoid a dependency cycle between component-base and client-go, client-go maintains
parallel definitions of component-base's feature types and constants. Passing kube's default feature
gate instance to client-go requires an adapter.
2024-01-16 12:51:00 -05:00
Lubomir I. Ivanov
54a6e6a772 kubeadm: keep a function with short timeout in idempotency.go
- Name the function GetConfigMapWithShortRetry to be
easier to understand that the function is with a very short timeout.
Add note that this function should be used in cases there is a
fallback to local config.
- Apply custom hardcoded interval of 50ms and timeout of 350ms to it.
Previously the fucntion used exp backoff with 5 steps up to ~340ms.
2024-01-16 17:53:21 +02:00
Mahmoud Atwa
ec89154276 Handles clean up errors 2024-01-16 11:53:55 +00:00
Kubernetes Prow Robot
9b5e2dc54d
Merge pull request #122231 from ardaguclu/get-cronjob-timezone
Add timezone column in cronjob get command
2024-01-16 12:53:18 +01:00
Mahmoud Atwa
80fbc4c319 Revert using ginkgo.DeferCleanup as it doesn't run in the correct order 2024-01-16 10:45:36 +00:00
Kubernetes Prow Robot
c75a146f23
Merge pull request #122772 from thockin/codegen_use_passed_flagset
code-gen: Use the passed FlagSet, not hardcoded
2024-01-16 09:49:33 +01:00
Kubernetes Prow Robot
72d30a588b
Merge pull request #122754 from KubeKyrie/fix/replace-expected-field
expected and actual field position adjustment
2024-01-16 06:42:03 +01:00
Kubernetes Prow Robot
ebb79e5cf9
Merge pull request #122768 from danwinship/conntrack-cleanup
conntrack cleanup cleanup
2024-01-16 01:15:29 +01:00
Kubernetes Prow Robot
8ba29970e6
Merge pull request #122529 from neolit123/1.30-v1beta4-timeouts
kubeadm: add a Timeouts struct to v1beta4
2024-01-15 19:33:58 +01:00
Dan Winship
fcb51554a1 Plumb the conntrack.Interface up to the proxiers
And use the fake interface in the unit tests, removing the dependency
on setting up FakeExec stuff when conntrack cleanup will be invoked.

Also, remove the isIPv6 argument to CleanStaleEntries, because it can
be inferred from the other args.
2024-01-15 13:09:05 -05:00
Dan Winship
cdf934d5bc Remove redundant iptables/nftables conntrack cleanup tests
The iptables and nftables proxy backends had 2 unit tests
(TestDeleteEndpointConnections and TestProxierDeleteNodePortStaleUDP)
that were effectively testing that:

  - If the proxy saw various Service/EndpointSlice events this would
    result in specific changes to the service/endpoints trackers, AND

  - If the service/endpoints trackers changed in those specific ways
    this would result in specific UpdateServiceMapResult and
    UpdateEndpointsMapResult values being generated, AND

  - If you passed those specific UpdateServiceMapResult and
    UpdateEndpointsMapResult values to conntrack.CleanStaleEntries it
    would make specific calls to the lower-level conntrack methods,
    AND

  - If you called the lower-level conntrack methods with those
    specific arguments, it would result in specific executions of the
    conntrack binary, mixed with a specific number of klog
    invocations.

This... is not a good unit test. We already test the change tracker
behavior in other unit tests, and we already tested the
Update{Service,Endpoints}MapResult behavior in the pkg/proxy unit
tests, and we already tested the conntrack exec behavior in
pkg/proxy/conntrack/conntrack_test.go, and we now test the
CleanStaleEntries behavior in pkg/proxy/conntrack/cleanup_test.go. So
there is no need to try to test the top-to-bottom behavior as a "unit
test".
2024-01-15 13:08:52 -05:00
Dan Winship
db12cbe2ae Add conntrack.Interface, test CleanStaleEntries
Add an interface between CleanStaleEntries and the lower-level
conntrack helpers (ClearEntriesForIP, etc), and a fake implementation
of that interface, so that we can explicitly test CleanStaleEntries's
logic.

Remove some comments from conntrack.go that were explaining the
functions' callers rather than explaining the functions themselves
(and which were redundant with other comments in the callers anyway).
2024-01-15 13:08:36 -05:00
Dan Winship
51063cb5c4 Clean up conntrack unit tests
Fix the test names to match the functions they are testing.

Abstract out the repetitive FakeExec handling.

Explicitly specify the "expectCommand" in each one, to make it clearer
that that's really the part that we're testing.

For everything except TestExec(), test each case with both a "success"
result and a "nothing to delete" result from the conntrack binary.
2024-01-15 13:07:08 -05:00
Kubernetes Prow Robot
789e029364
Merge pull request #122735 from avorima/fix-kubeadm-regression-2992
kubeadm: fix a regression in "kubeadm init" where --kubeconfig is ignored
2024-01-15 18:21:04 +01:00
Kubernetes Prow Robot
026a27e5eb
Merge pull request #122571 from p0lyn0mial/upstream-client-go-watch-list-fg
client-go/features: introduce WatchListClient feature gate
2024-01-15 18:20:55 +01:00
Kubernetes Prow Robot
29bf09136e
Merge pull request #122732 from ahutsunshine/typo
fix version typo of pod namespace indexer
2024-01-15 16:23:28 +01:00
Kubernetes Prow Robot
f38ff3feea
Merge pull request #121716 from kerthcet/cleanup/add-log
Add more logs to scheduler event handler
2024-01-15 16:23:19 +01:00
Kubernetes Prow Robot
591a5c0bff
Merge pull request #122764 from sanposhiho/scheduler_perf-doc
doc(scheduler_perf): enrich the documentation
2024-01-15 13:39:26 +01:00
Juan Manuel Parrilla Madrid
5cfd75a84e
Ignore vendor folder on client code generation
During the client code generation, the vendor folder now will be ignored by default.

Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
2024-01-15 11:15:07 +01:00
Kubernetes Prow Robot
be77b0b82b
Merge pull request #118389 from amewayne/support_nodeannotationschanged
support nodeAnnotationsChanged event to trigger rescheduling
2024-01-15 10:50:41 +01:00
Kensei Nakada
f29d6970c9 doc(scheduler_perf): enrich the documentation 2024-01-15 08:50:08 +00:00
Lukasz Szaszkiewicz
7773b0f53f client-go/features: introduce WatchListClient feature gate 2024-01-15 09:45:57 +01:00
Kubernetes Prow Robot
8bc0ed16cd
Merge pull request #122640 from carlory/kubectl-describe-vac
kubectl: vac support ResourceDescriber
2024-01-15 06:47:55 +01:00
Kubernetes Prow Robot
59f25b5c2d
Merge pull request #122776 from thockin/codegen_use_long_flag_names
codegen: Use long flag names for clarity
2024-01-15 03:27:31 +01:00
Tim Hockin
0d366dd99a
codegen: Use long flag names for clarity 2024-01-14 16:12:09 -08:00
Kubernetes Prow Robot
dcee8834b5
Merge pull request #122775 from thockin/codegen_s_base_file_g
update-codegen: rename "base"->"file" for clarity
2024-01-15 01:08:39 +01:00
Kubernetes Prow Robot
f174bfd067
Merge pull request #122770 from thockin/run_test_instrumentation_updates
Run test/instrumentation/update-*
2024-01-15 01:08:32 +01:00
Kubernetes Prow Robot
f2dad0c6f4
Merge pull request #122773 from thockin/sync_json-patch_dep_version
Sync code-generator/examples json-patch ver to the same as everyone else
2024-01-14 23:57:51 +01:00
Kubernetes Prow Robot
908a958bb1
Merge pull request #122771 from thockin/make_verify-fieldname-docs_actually_error
Make verify-fieldname-docs actually error
2024-01-14 23:57:44 +01:00
Kubernetes Prow Robot
f7b0257bc1
Merge pull request #122774 from thockin/dont_xargs_maybe-empty_input
codegen: don't use xargs w/ maybe-empty input
2024-01-14 20:51:44 +01:00
Tim Hockin
0f849d3b55
update-codegen: rename "base"->"file" for clarity 2024-01-14 10:41:59 -08:00
Tim Hockin
f2b550180c
codegen: don't use xargs w/ maybe-empty input
GNU xargs has a `-r, --no-run-if-empty` option but I don't think we want
to depend on GNU (thanks, MacOS).

Why?  Sometimes, when you are messing with codegens, you end up with an
empty input and then it just hangs.
2024-01-14 10:38:34 -08:00
Tim Hockin
582312d965
Sync json-patch ver to the same as everyone else
It's unclear why this needs to be different.  The commit which added it
(1993a4cb37) just says "vendor".  This was
reverted in 741f146157 saying "Revert to
json-patch 4.12.0". I suspect this one just slipped past.
2024-01-14 10:36:12 -08:00
Tim Hockin
7162b930be
code-gen: Use the passed FlagSet, not hardcoded
Even if the one we pass in is apparently always the default
CommandLine, we should use the one passed in.
2024-01-14 10:34:29 -08:00
Tim Hockin
8b8f0a70cd
Make verify-fieldname-docs actually error
Sadly, cmd/fieldnamedocscheck did not exit non-zero when it needed to.

Fix the one thing it flagged.
Add it to verify-quick
2024-01-14 10:32:08 -08:00
Tim Hockin
0c3e49e64c
Run test/instrumentation/update-* 2024-01-14 10:24:35 -08:00
Lubomir I. Ivanov
5f876b9d0a kubeadm: switch from ExponentialBackoff() to PollUntilContextTimeout()
Switch to PollUntilContextTimeout() everywhere to allow
usage of the exposed timeouts in the kubeadm API. Exponential backoff
options are more difficult to expose in this regard and a bit too
detailed for the common user - i.e. have "steps", "factor" and so on.
2024-01-14 15:07:56 +02:00
Lubomir I. Ivanov
caf5311413 kubeadm: start using the Timeouts struct values
Propagate usage of the Timeout struct values.
Apply sanitazation to timeout constants in contants.go.
2024-01-14 15:07:56 +02:00
Lubomir I. Ivanov
374e41cf66 kubeadm: replace deprecated wait.Poll() and wait.PollImmediate()
Replace the usage of the deprecated wait.Poll() and
wait.PollImmediate() functions with wait.PollUntilContextTimeout().
Since we don't have piping of context around kubeadm,
use context.Background() everywhere.

Some wait.Poll() functions were converted to "immediate" as there
is no point for them to not be. This is done for consistency.

Replace the only instance of wait.JitterUntil with
wait.PollUntilContextTimeout. JitterUntil is not deprecated
but this is also done for consistency.
2024-01-14 15:07:55 +02:00
Kubernetes Prow Robot
12fc215656
Merge pull request #122663 from aroradaman/drop-ct-state-invalid-rule
pkg/proxy/nftables: drop conntrack state invalid rule
2024-01-13 19:01:16 +01:00
carlory
8af9a177b2 If a pvc has an empty storageclass name, don't try to assign a default StorageClass to it. 2024-01-13 21:25:43 +08:00
carlory
d2b16b2a21 vac support ResourceDescriber
Co-authored-by: Arda Güçlü <aguclu@redhat.com>
2024-01-13 18:46:28 +08:00