Commit Graph

110137 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
7b1b801295
Merge pull request #111773 from amewayne/fix_mem_leak_in_preemption
fix a memory leakage problem when calling DryRunPreemption
2022-08-11 08:36:58 -07:00
SataQiu
25a81a7514 kube-proxy: optimize the format of the flag usage string 2022-08-11 19:37:25 +08:00
Antonin Bas
2e282e8e02 Update Netpol e2e tests to use framework CreateNamespace
The main purpose of this change is to update the e2e Netpol tests to use
the srandard CreateNamespace function from the Framework. Before this
change, a custom Namespace creation function was used, with the
following consequences:

* Pod security admission settings had to be enforced locally (not using
  the centralized mechanism)
* the custom function was brittle, not waiting for default Namespace
  ServiceAccount creation, causing tests to fail in some infrastructures
* tests were not benefiting from standard framework capabilities:
  Namespace name generation, automatic Namespace deletion, etc.

As part of this change, we also do the following:

* clearly decouple responsibilities between the Model, which defines the
  K8s objects to be created, and the KubeManager, which has access to
  runtime information (actual Namespace names after their creation by
  the framework, Service IPs, etc.)
* simplify / clean-up tests and remove as much unneeded logic / funtions
  as possible for easier long-term maintenance
* remove the useFixedNamespaces compile-time constant switch, which
  aimed at re-using existing K8s resources across test cases. The
  reasons: a) it is currently broken as setting it to true causes most
  tests to panic on the master branch, b) it is not a good idea to have
  some switch like this which changes the behavior of the tests and is
  never exercised in CI, c) it cannot possibly work as different test
  cases have different Model requirements (e.g., the protocols list can
  differ) and hence different K8s resource requirements.

For #108298

Signed-off-by: Antonin Bas <abas@vmware.com>
2022-08-10 11:38:26 -07:00
Kubernetes Prow Robot
f5956716e3
Merge pull request #111786 from jeremyrickard/publishing-release-125
staging/publishing: add release-1.25 branch
2022-08-10 11:16:25 -07:00
Ashutosh Kumar
707d50d806 chore(e2e): add e2e test for non graceful node shutdown
Signed-off-by: Ashutosh Kumar <sonasingh46@gmail.com>
2022-08-10 21:55:00 +05:30
Kubernetes Prow Robot
3b945fd77d
Merge pull request #111746 from RomanBednar/retro-sc-assignment-int
Add integration test for Retroactive default StorageClass assignement
2022-08-10 09:04:25 -07:00
Jeremy Rickard
ac1d38b750
Add missing codegen rule
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2022-08-10 09:02:35 -06:00
Kubernetes Prow Robot
518e0aca6f
Merge pull request #111784 from deads2k/fix-cleaner
Revert "enforce strict alpha handling for API serving"
2022-08-10 07:52:30 -07:00
Jeremy Rickard
3d2ffc5287
Add publishing bot rules for 1.25 2022-08-10 08:27:41 -06:00
David Eads
696e41a698 Revert "enforce strict alpha handling for API serving"
This reverts commit 233e0cb8c3.
2022-08-10 09:42:37 -04:00
SataQiu
31f1d84d9a kubeadm: try to load CA cert from external CertificateAuthority file when CertificateAuthorityData is empty for existing kubeconfig 2022-08-10 21:03:27 +08:00
amewayne
1457ad548c fix a memory leak problem when calling DryRunPreemption 2022-08-10 12:02:27 +08:00
Dmitry Verkhoturov
f2d591fae6 change CPUCFSQuotaPeriod default value to 100us to match Linux default
cpu.cfs_period_us is 100μs by default despite having an "ms" unit
for some unfortunate reason. Documentation:
https://www.kernel.org/doc/html/latest/scheduler/sched-bwc.html#management

The desired effect of that change is to match
k8s default `CPUCFSQuotaPeriod` value (100ms before that change)
with one used in k8s without the `CustomCPUCFSQuotaPeriod` flag enabled
and Linux CFS (100us, 1000x smaller than 100ms).
2022-08-10 03:25:05 +02:00
Kubernetes Release Robot
a38bb7ed81 CHANGELOG: Update directory for v1.25.0-rc.0 release 2022-08-09 22:36:19 +00:00
Kubernetes Prow Robot
d1a9a77280
Merge pull request #111770 from cici37/testForCelBeta
[test] Remove feature to enable e2e tests
2022-08-09 14:48:38 -07:00
Kubernetes Prow Robot
3e396dbac5
Merge pull request #111657 from aojea/hc_nodeport
document that services healthcheckNodePort is inmutable once set
2022-08-09 13:20:39 -07:00
Cici Huang
00ca624362 Remove feature 2022-08-09 19:23:27 +00:00
André Martins
94e7b2b8fd client-go/rest: check if url is nil to prevent nil pointer dereference
Signed-off-by: André Martins <aanm90@gmail.com>
2022-08-09 16:53:45 +02:00
Kubernetes Prow Robot
42a5eb4818
Merge pull request #111748 from zhaodiaoer/check-nil-InstanceMetadata
Prevent panic in cloud-provider
2022-08-09 07:00:50 -07:00
Roman Bednar
77d904f053 add integration tests for retroactive SC assignment
Also stress tested for ~2 hours to minimize possible races:

$ stress ./volume.test  -test.run=TestRetroactiveStorageClassAssignment
...
1h59m50s: 3198 runs so far, 0 failures
1h59m55s: 3200 runs so far, 0 failures
2h0m0s: 3201 runs so far, 0 failures
2h0m5s: 3202 runs so far, 0 failures
2022-08-09 15:22:38 +02:00
Chih-Chieh Yang
94097457fd Minor fixes 2022-08-09 12:19:00 +00:00
Kubernetes Prow Robot
f0bd02ca5e
Merge pull request #111346 from piotrnosek/hpa-tests-2
Add e2e HPA Behavior tests: scale up/down limited by number of Pods / min, scale up/down limited by percentage / min
2022-08-09 03:14:50 -07:00
Arda Güçlü
60680fc1d5 (kubectl cluster-info): Move towards RESTClientGetter instead cmdutil.Factory
To preserve loose coupling, it is needed to pass `RESTClientGetter`
instead `cmdutil.Factory` for all kubectl commands.

This PR removes `cmdutil.Factory` usage in `cluster-info` command and
instead passes `RESTClientGetter`.
2022-08-09 12:50:21 +03:00
SataQiu
5d7d288c04 make the validation logic about LeaderElectionConfiguration consistent between component-base and client-go 2022-08-09 11:47:05 +08:00
Kubernetes Prow Robot
a837be03ff
Merge pull request #111751 from dobsonj/issue111740
Fix flaky CSIInlineVolumes e2e test (issue 111740)
2022-08-08 19:54:49 -07:00
Kubernetes Prow Robot
25a3274a4f
Merge pull request #111440 from verb/111025-ec-conformance
Promote Ephemeral Containers e2e test to Conformance
2022-08-08 15:35:57 -07:00
Kubernetes Prow Robot
0d9aaf1bca
Merge pull request #111749 from endocrimes/dani/dbus-restart-test
node_e2e: add a dbus restart test
2022-08-08 14:27:57 -07:00
André Martins
f8f190cdd2 Revert "client-go: remove no longer used finalURLTemplate"
The functionality provided by the finalURLTemplate is still used by
certain external projects to track the request latency for requests
performed to kube-apiserver.

Using a template of the URL, instead of the URL itself, prevents the
explosion of label cardinality in exposed metrics since it aggregates
the URLs in a way that common URLs requests are reported as being the
same.

This reverts commit bebf5a608f.

Signed-off-by: André Martins <aanm90@gmail.com>
2022-08-08 23:27:45 +02:00
Jonathan Dobson
645f667376 Fix flaky CSIInlineVolumes e2e test (issue 111740) 2022-08-08 12:54:11 -06:00
Danielle Lancashire
e8442054fe node_e2e: add a dbus restart test 2022-08-08 16:56:13 +00:00
zhaodiaoer
fd67e04d70
Prevent panic in cloud-provider
Prevent panic when cloud-provider InstancesV2.InstanceMetadata
        returns (nil,nil)

Signed-off-by: zhaodiaoer <ddaaren@gmail.com>
2022-08-08 22:15:51 +08:00
Arda Güçlü
cddbb0c563 Use OpenAPI to determine patch type in kubectl apply patching
Currently `kubectl apply` determines correct patch type for given
GVKs by trying to register schema and if it succeeds, it uses
strategic-merge-patch.

But OpenAPI endpoint already stores which patch types are supported
by GVKs. This PR checks OpenAPI endpoint to retrieve patch type,
if OpenAPI is enabled. If it is not enabled, patch type determination
will be done as conventional registration method.
2022-08-08 14:33:11 +03:00
Kubernetes Prow Robot
759785ea14
Merge pull request #109090 from sarveshr7/multicidr-rangeallocator
Enhance NodeIPAM to support multiple ClusterCIDRs
2022-08-07 15:40:18 -07:00
Abirdcfly
c8c5539e76
update golangci-lint for go 1.19
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-07 12:01:15 +08:00
Abirdcfly
b7bcbf3619
delete hardcode go version in golangci-lint config
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-07 11:43:07 +08:00
Wei Huang
7df9bfcfef
Expose a pending pods summary in scheudler's dummper output 2022-08-05 22:02:38 -07:00
Kubernetes Prow Robot
985c9202cc
Merge pull request #110182 from kerthcet/cleanup/remove-potential-goroutine-leak-in-metric-recorder
Remove potential goroutine leak in testing framework
2022-08-05 19:14:17 -07:00
Sarvesh Rangnekar
1473e13d1b Add integration test for multi cluster cidr 2022-08-06 00:11:06 +00:00
Sarvesh Rangnekar
5b801ba9f9 Introduce MultiCIDRRangeAllocator
MultiCIDRRangeAllocator is a new Range Allocator which makes using
multiple ClusterCIDRs possible. It consists of two controllers, one for
reconciling the ClusterCIDR API objects and the other for allocating
Pod CIDRs to the nodes.

The allocation is based on the rules defined in
https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs
2022-08-06 00:10:39 +00:00
Kubernetes Prow Robot
64ed914545
Merge pull request #111258 from dobsonj/kep-596-ga-feature-flag
KEP-596: Move CSIInlineVolume feature to GA
2022-08-05 13:54:30 -07:00
Kubernetes Prow Robot
137439194d
Merge pull request #111721 from alculquicondor/fix-delete-expectations
Fix deleting UIDs tracking expectations
2022-08-05 12:07:25 -07:00
Kubernetes Prow Robot
11d4cb52f2
Merge pull request #111693 from kinvolk/rata/userns-support-2022
volume: FeatureGate access to GetHostIDsForPod()
2022-08-05 09:37:48 -07:00
Aldo Culquicondor
c1e0dac461 Fix deleting UIDs tracking expectations
Change-Id: I5dad644cf5cb232ebed0950a14b35a781a38eeb0
2022-08-05 12:37:31 -04:00
kerthcet
97e3e50493 Remove potential goroutine leak in NewFramework
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-08-06 00:05:22 +08:00
Alexander Constantinescu
c44ab14e20 Service controller: use a workqueue for node updates
Services which fail to be successfully synced as a cause by a triggered node event
are actually never retried. The commit before this one gave an example of when such
services used to be retried before, but that was not really efficient nor fully
correct. Moving to a workqueue for node events is a more modern approach to syncing
nodes, and placing all service keys that have failed on the service workqueue, in
case they do, fixes the re-sync problem

Also, now that we are using a node workqueue and use one go-routine to service items
from that queue, we don't need the `nodeSyncLock` anymore. So further clean that up
from the controller.
2022-08-05 17:20:11 +02:00
ialidzhikov
bfe98c0c2a Run node-local-dns in non-privileged mode 2022-08-05 14:18:27 +03:00
Alexander Constantinescu
72c1c6559e Cleanup service sync path
It dawned on me that `needsFullSync` can never be false. `needsFullSync` was used
to compare the set of nodes that were existing last time the node event handler was
triggered, with the current set of node for this run. However, if `triggerNodeSync`
gets called it's always because the set of nodes have changed due to a condition
changing on one node, or a new node being added/removed. If `needsFullSync` can
never be false then a lot of things in the service sync path was just spurious, for
ex: `servicesToRetry`, `knownHosts`. Essentially: if we ever need to `triggerNodeSync`
then the set of nodes have somehow changed and we always need to re-sync all services.

Before this patch series there was a possibility for `needsFullSync` to be set to false.
`shouldSyncNode` and the predicates used to list nodes were not aligned, specifically
for Unschedulable nodes. This means that we could have been triggered by a change to
the schedulable state but not actually computed any diffs between the old vs. new nodes.
Meaning, whenever there was a change in schedulable state we would just try to re-sync
all service updates that might have failed when we synced last time. But I believe this
to be an overlooked coincidence, rather than something actually intended.
2022-08-05 12:39:59 +02:00
Antonio Ojea
5ec9d4a530 doc services healthcheckNodePort is inmutable 2022-08-05 11:51:50 +02:00
Arda Güçlü
55cb8ba1eb (kubectl certificate): Move towards restClientGetter instead cmdutil.Factory
To preserve loose coupling, it is needed to pass `RESTClientGetter`
instead `cmdutil.Factory` for all kubectl commands.

This PR removes `cmdutil.Factory` usage and instead
passes `RESTClientGetter` as well as required changes in unit tests.
2022-08-05 09:34:10 +03:00
Octopusjust
d1dd3691c5
Update cmdutil_test.go
Modify error reporting format
2022-08-05 09:47:12 +08:00