Commit Graph

110161 Commits

Author SHA1 Message Date
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
Sarvesh Rangnekar
02d944d046 Add a priority queue to implement MultiCIDR tie-breaks
The Priority is determined as follows:
P0: ClusterCIDR with higher number of matching labels has highest
priority.
P1: ClusterCIDR having cidrSet with fewer allocatable Pod CIDRs has
higher priority.
P2: ClusterCIDR with a PerNodeMaskSize having fewer IPs has higher
priority.
P3: ClusterCIDR having label with lower alphanumeric value has higher
priority.
P4: ClusterCIDR with a cidrSet having a smaller IP address value has
higher priority.
2022-08-05 01:06:43 +00:00
Sarvesh Rangnekar
b6392a4b07 Add cidrset to support multiple CIDRs
Add a new cidrset named `multicidrset` which extends the current
cidrset mechanism to track allocatable Pod and Service CIDRs.
multicidrset stores the info about allocated CIDRs in a Map as opposed
to the current cidrset implementation where it is stored in a bitmap.
2022-08-05 01:06:43 +00:00
Sarvesh Rangnekar
0ee3719d0b Add describer and printer for ClusterCIDR API 2022-08-05 01:06:42 +00:00
Sarvesh Rangnekar
299724d099 Auto generate code for ClusterCIDR API 2022-08-05 01:06:35 +00:00
Sarvesh Rangnekar
7093b10416 Introduce networking/v1alpha1 api, ClusterCIDR type
Introduce networking/v1alpha1 api group.

Add `ClusterCIDR` type to networking/v1alpha1 api group, this type
will enable the NodeIPAM controller to support multiple ClusterCIDRs.
2022-08-05 00:54:00 +00:00
Kubernetes Prow Robot
bd9444c1cf
Merge pull request #111702 from flawedmatrix/fix-e2e-network-test-flake
Fix e2e network dns_configmap test
2022-08-04 17:25:46 -07:00
Kubernetes Release Robot
5e9b42ecba CHANGELOG: Update directory for v1.25.0-beta.0 release 2022-08-04 22:46:34 +00:00
Edwin Xie
f167b9f4ab Fix e2e network dns_configmap test
Updates predicate to check for a length >=2 to avoid
the index out of bounds panic.

Signed-off-by: Edwin Xie <exie@vmware.com>
Co-authored-by: Tyler Schultz <tschultz@vmware.com>
2022-08-04 21:04:02 +00:00
Kubernetes Prow Robot
eefcf6aa80
Merge pull request #111113 from mimowo/retriable-pod-failures-job-controller
Support handling of pod failures with respect to the configured rules
2022-08-04 13:35:46 -07:00
Jonathan Dobson
0ee8fed853 Add conformance test for CSIInlineVolume feature 2022-08-04 13:06:30 -06:00
Jonathan Dobson
5f774832a5 Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
Kubernetes Prow Robot
d0c92aedba
Merge pull request #111691 from alexanderConstantinescu/remove-sched-pred-from-ccm
[CCM - service controller] Remove schedulability predicate for LB set
2022-08-04 12:03:46 -07:00
Tim Hockin
5f59159bfc Docs: node-port-range should not overlap ephemeral 2022-08-04 10:26:26 -07:00
Kubernetes Prow Robot
897cdea783
Merge pull request #111696 from liggitt/go119mod
Update go.mod to go1.19
2022-08-04 10:25:58 -07:00
Kubernetes Prow Robot
b6d0f6ab61
Merge pull request #108692 from jsafrane/selinux
Speed up SELinux volume relabeling using mounts MVP
2022-08-04 10:25:45 -07:00
Michal Wozniak
bf9ce70de3 Support handling of pod failures with respect to the specified rules 2022-08-04 18:39:08 +02:00
Kubernetes Prow Robot
c8edeab234
Merge pull request #111678 from dims/fix-things-commented-out-in-1.19-rc2
[golang] Fix things commented out in 1.19rc2
2022-08-04 09:01:47 -07:00
bells17
e539e04103 Use stretchr/testify/assert 2022-08-05 00:54:19 +09:00
piroux
34b54e7646 Add struct keys in PV controller tests
Signed-off-by: piroux <pierre.roux01@gmail.com>
2022-08-04 17:01:36 +02:00
Davanum Srinivas
8bec318b5d
Switch klog call to use structured logging
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-04 10:54:37 -04:00
Kubernetes Prow Robot
15d290f280
Merge pull request #111521 from wongma7/ephemeralcopy
Clear ephemeral container resources field when creating one in volume test
2022-08-04 07:51:50 -07:00
Davanum Srinivas
a2408f39c7
[golang] Fix things commented out in 1.19rc2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-04 10:27:09 -04:00
Jordan Liggitt
00db9f0229 Update go.mod to go1.19 2022-08-04 10:03:05 -04:00
Rodrigo Campos
4267f2ee0c volume: FeatureGate access to GetHostIDsForPod()
After the userns PR got merged:
	https://github.com/kubernetes/kubernetes/pull/111090

gnufied decided it might be safer if we feature gate this part of the
code, due to the kubelet volume host type assertion.

That is a great catch and this patch just moves the code inside the
feature gate if.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-04 14:08:29 +02:00
SataQiu
ea9f0a8c8e kubelet: remove unused custommetrics package 2022-08-04 20:00:38 +08:00
Kubernetes Prow Robot
305ad47627
Merge pull request #111679 from puerco/kubecross-1.19
[go] Bump images, dependencies and versions to go 1.19
2022-08-04 04:58:04 -07:00