Commit Graph

120669 Commits

Author SHA1 Message Date
Lukasz Szaszkiewicz
41e706600a client-go/reflector: make UseWatchList a pointer
until #115478(use streaming against the etcd storage)
is resolved the cacher need a way to disable the streaming.
2024-01-19 14:40:18 +01:00
Oksana Baranova
a4afaeda37 print error message regardless verbosity level
Signed-off-by: Oksana Baranova <oksana.baranova@intel.com>
2024-01-19 13:57:27 +02:00
Patrick Ohly
de014579a1 e2e: enforce usage of WithFlaky instead of [Flaky]
Now that we have it (8a89a1f5a5), let's also make sure that
the new WithFlaky is used everywhere instead if [Flaky]. This way it can be
used for filtering by label.
2024-01-19 12:17:37 +01:00
Kubernetes Prow Robot
c6887b1c00
Merge pull request #117803 from sourcelliu/preFilterState
Optimize the performance of the Clone method of preFilterState
2024-01-19 10:57:20 +01:00
Patrick Ohly
e3ee4e3585 e2e: replace klog.Fatal with assertion
Using klog.Fatal to abort a test leads to a poor user experience because the
output is buffered in ginkgo.GinkgoWriter and not flushed before killing the
process. The output is also different from other failures. Using the normal
error checking is better.

Before:

    $ KUBECONFIG=/no/such/config go test -v ./test/e2e/
      Jan 19 10:06:58.475: INFO: The --provider flag is not set. Continuing as if --provider=skeleton had been used.
    === RUN   TestE2E
      I0119 10:06:58.475844   99472 e2e.go:109] Starting e2e run "5303f626-ae0e-44d7-abf1-b4956d910ef4" on Ginkgo node 1
    Running Suite: Kubernetes e2e suite - /nvme/gopath/src/k8s.io/kubernetes/test/e2e
    =================================================================================
    Random Seed: 1705655217 - will randomize all specs

    Will run 4678 of 7421 specs
    goroutine 817 [running]:
    k8s.io/klog/v2/internal/dbg.Stacks(0x0)
    	/nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/internal/dbg/dbg.go:35 +0x85
    k8s.io/klog/v2.(*loggingT).output(0x9d92b20, 0x3, 0x0, 0xc00069d7a0, 0x2, {0x834c6e8?, 0x9d91c80?}, 0x300000060?, 0x0)
    ...
    k8s.io/klog/v2.Fatal(...)
    	/nvme/gopath/src/k8s.io/kubernetes/vendor/k8s.io/klog/v2/klog.go:1652
    k8s.io/kubernetes/test/e2e.setupSuite({0x7fb49064c078, 0xc003072360})
    	/nvme/gopath/src/k8s.io/kubernetes/test/e2e/e2e.go:187 +0x125
    ...
    FAIL	k8s.io/kubernetes/test/e2e	0.759s
    FAIL

After:

    $ KUBECONFIG=/no/such/config go test -v ./test/e2e/
      Jan 19 10:12:58.889: INFO: The --provider flag is not set. Continuing as if --provider=skeleton had been used.
    === RUN   TestE2E
      I0119 10:12:58.889224  106019 e2e.go:109] Starting e2e run "bed5a77a-f595-42d0-b512-5f601067444b" on Ginkgo node 1
    Running Suite: Kubernetes e2e suite - /nvme/gopath/src/k8s.io/kubernetes/test/e2e
    =================================================================================
    Random Seed: 1705655578 - will randomize all specs

    Will run 4678 of 7421 specs
    ------------------------------
    [SynchronizedBeforeSuite] [FAILED] [0.001 seconds]
    [SynchronizedBeforeSuite]
    /nvme/gopath/src/k8s.io/kubernetes/test/e2e/e2e.go:69

      Timeline >>
      Jan 19 10:12:59.063: INFO: >>> kubeConfig: /no/such/config
      Jan 19 10:12:59.063: INFO: Unexpected error: Error loading client:
          <*errors.errorString | 0xc00182c130>:
          error creating client: error loading KubeConfig: open /no/such/config: no such file or directory
          {
              s: "error creating client: error loading KubeConfig: open /no/such/config: no such file or directory",
          }
      [FAILED] in [SynchronizedBeforeSuite] - /nvme/gopath/src/k8s.io/kubernetes/test/e2e/e2e.go:186 @ 01/19/24 10:12:59.064
      << Timeline

      [FAILED] Error loading client: error creating client: error loading KubeConfig: open /no/such/config: no such file or directory
      In [SynchronizedBeforeSuite] at: /nvme/gopath/src/k8s.io/kubernetes/test/e2e/e2e.go:186 @ 01/19/24 10:12:59.064
    ------------------------------

    Summarizing 1 Failure:
      [FAIL] [SynchronizedBeforeSuite]
      /nvme/gopath/src/k8s.io/kubernetes/test/e2e/e2e.go:186

    Ran 0 of 7421 Specs in 0.001 seconds
    FAIL! -- A BeforeSuite node failed so all tests were skipped.
    --- FAIL: TestE2E (0.18s)
    FAIL
    FAIL	k8s.io/kubernetes/test/e2e	0.769s
    FAIL
2024-01-19 10:14:07 +01:00
carlory
427e0fadba Fix flaking test: CSI Mock workload info CSI PodInfoOnMount Update 2024-01-19 14:28:13 +08:00
Kubernetes Prow Robot
eb1ae05cf0
Merge pull request #122030 from carlory/121799
fix issue with using feature HonorPVReclaimPolicy in csi-provisioner
2024-01-19 04:35:48 +01:00
Kubernetes Prow Robot
e9756693d0
Merge pull request #122850 from neolit123/1.30-v1beta4-timeouts
kubeadm: use separate context in GetConfigMapWithShortRetry
2024-01-19 03:28:14 +01:00
Lubomir I. Ivanov
2cdd9a7130 kubeadm: use separate context in GetConfigMapWithShortRetry
Intentionally pass a new context to this API call.
This will let the API call run independently of the parent
context timeout, which is quite short and can cause the API
call to return abruptly.
2024-01-19 00:19:07 +02:00
Kubernetes Prow Robot
5c664599a9
Merge pull request #122843 from liggitt/local-up-darwin
Fix local-up-cluster on darwin
2024-01-18 20:11:08 +01:00
Kubernetes Prow Robot
b27b56a46c
Merge pull request #122842 from pohly/klog-update
dependencies: klog v2.120.1
2024-01-18 20:11:00 +01:00
Kubernetes Prow Robot
c82da711b0
Merge pull request #122839 from pohly/ginkgo-gomega-update
dependencies: ginkgo v2.15.0, gomega v1.31.0
2024-01-18 20:10:50 +01:00
Kubernetes Prow Robot
eabd6e4584
Merge pull request #122704 from carlory/fix-introactive-storageclass
If a pvc has an empty storageclass name, don't try to assign a default StorageClass
2024-01-18 20:10:41 +01:00
Kubernetes Prow Robot
3bbf0cc47f
Merge pull request #122837 from tnqn/remove-permission
Remove unneeded permissions of node-controller role
2024-01-18 19:03:20 +01:00
Kubernetes Prow Robot
afb1523bf4
Merge pull request #122833 from kannon92/add-density-test-flake
mark density tests as flaky
2024-01-18 19:03:11 +01:00
Jordan Liggitt
1192f313b8
Fix local-up-cluster on darwin 2024-01-18 08:51:45 -08:00
Patrick Ohly
e2222f1e30 dependencies: klog v2.120.1 2024-01-18 16:58:40 +01:00
Kubernetes Prow Robot
8835dabc3b
Merge pull request #122841 from neolit123/1.30-v1beta4-timeouts
kubeadm: special case context errors in GetConfigMapWithShortRetry
2024-01-18 15:57:24 +01:00
Kevin Hannon
8a89a1f5a5 mark density tests as flaky 2024-01-18 09:50:39 -05:00
Patrick Ohly
18f0af1f00 dependencies: ginkgo v2.15.0, gomega v1.31.0
The main reason for updating is support for reporting the cause of context
cancellation: Ginkgo provides that information when canceling a context and
Gomega polling code includes that when generating a failure message.
2024-01-18 15:24:31 +01:00
Lubomir I. Ivanov
26a79e4c0b kubeadm: special case context errors in GetConfigMapWithShortRetry
If some code is about to go over the context deadline,
"x/time/rate/rate.go" would return and untyped error with the string
"would exceed context deadline". If some code already exceeded
the deadline the error would be of type DeadlineExceeded.
Ignore such context errors and only store API and connectivity errors.
2024-01-18 15:35:25 +02:00
Kubernetes Prow Robot
b1ab18ade2
Merge pull request #122608 from p0lyn0mial/upstream-kcm-enable-watchlistclient-fg
kube-controller-manager: unit tests WatchListClient feature for client-go
2024-01-18 12:05:21 +01:00
Kubernetes Prow Robot
1e136ef8a0
Merge pull request #122523 from yasindce1998/secret-fix
fix: create tls secret cert to crt for --cert flag
2024-01-18 09:52:36 +01:00
Lukasz Szaszkiewicz
8668c7f718 kube-controller-manager/options: unit test WatchListClient feature gate for command line options 2024-01-18 09:22:14 +01:00
Quan Tian
3a6060745c Remove unneeded permissions of node-controller role
Signed-off-by: Quan Tian <qtian@vmware.com>
2024-01-18 15:58:28 +08:00
Vandit Singh
83ff8a2f49
Negative index regression test for json-patch (#122625)
* add testcase with negative index

* exercise successful negative index patching

* use different values for testing

Co-authored-by: Chris Bandy <bandy.chris@gmail.com>

---------

Co-authored-by: Chris Bandy <bandy.chris@gmail.com>
2024-01-18 08:44:19 +01:00
Kubernetes Prow Robot
a02a00ecd7
Merge pull request #122142 from pohly/client-go-events-adapter-context
client-go events: also support context for NewEventBroadcasterAdapter
2024-01-18 08:44:12 +01:00
Kubernetes Prow Robot
5ad2c12a69
Merge pull request #122701 from carlory/fix-quota
Fix resource deletion failure caused by quota calculation error when InPlacePodVerticalScaling is turned on
2024-01-18 06:38:21 +01:00
Kubernetes Prow Robot
2624e93d55
Merge pull request #122823 from pohly/e2e-deadcode-removal
e2e: remove dead code
2024-01-17 22:42:51 +01:00
Kubernetes Release Robot
f40ff3d9ff CHANGELOG: Update directory for v1.26.13 release 2024-01-17 19:42:12 +00:00
Kubernetes Release Robot
14294ce870 CHANGELOG: Update directory for v1.28.6 release 2024-01-17 19:40:03 +00:00
Kubernetes Release Robot
4a9906fd34 CHANGELOG: Update directory for v1.27.10 release 2024-01-17 19:39:57 +00:00
Kubernetes Release Robot
4f8aa21da8 CHANGELOG: Update directory for v1.29.1 release 2024-01-17 19:37:24 +00:00
Kubernetes Prow Robot
6180759dba
Merge pull request #122738 from benluddy/client-go-feature-gate-adapter
Inject feature gate instance into client-go for kube components.
2024-01-17 18:33:56 +01:00
Kubernetes Prow Robot
b26f6dfce9
Merge pull request #121783 from atwamahmoud/ignore-scheduler-tests
Add tests for ignoring scheduler processing
2024-01-17 18:33:47 +01:00
Patrick Ohly
f8e25eff92 client-go events: also support context for NewEventBroadcasterAdapter
27a68aee3a introduced context support. In order to use that
also with NewEventBroadcasterAdapter, a variant of the call is needed to allow
the caller to specify the context.

The `logcheck:context` comment ensures that code which is meant to be
contextual uses the new call.
2024-01-17 18:06:29 +01:00
Kubernetes Prow Robot
05780d58bf
Merge pull request #122788 from my-git9/renewal-manager
kubeadm: increase ut coverage for certs/renewal/manager
2024-01-17 17:20:03 +01:00
xin.li
6451fb0fe2 kubeadm: increase ut coverage for certs/renewal/manager
Signed-off-by: xin.li <xin.li@daocloud.io>
2024-01-17 21:51:24 +08:00
Roman Bednar
2ce04fc04b flag PersistentVolumeLastPhaseTransitionTime field as beta 2024-01-17 13:14:09 +01:00
Patrick Ohly
3aa366a3eb e2e: remove dead code
The dead code was found with:

    deadcode -test -filter=k8s.io/kubernetes/test/e2e/framework/... ./test/e2e ./test/e2e_node ./test/e2e_node ./test/e2e_kubeadm

See https://go.dev/blog/deadcode for an introduction.

Only dead code which is clearly not needed anymore (glog logging),
questionable (skipping based on feature gates) or
redundant (WaitForPodSuccessInNamespaceSlow) gets removed for now. More
removals might make sense in the future.
2024-01-17 12:57:35 +01:00
Kubernetes Prow Robot
909faa3a9b
Merge pull request #116627 from claudiubelu/unittests-8
unittests: Fixes unit tests for Windows (part 8)
2024-01-17 05:43:54 +01:00
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