Commit Graph

144 Commits

Author SHA1 Message Date
Davanum Srinivas
60fe406f67
remove vestiges of providerless tag
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-06-06 12:18:38 -04:00
Davanum Srinivas
efdb2961b6
drop unused code pointed out by linter
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 09:03:57 -04:00
Davanum Srinivas
bf268f02a3
Remove gcp in-tree cloud provider and credential provider
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-05-01 09:03:53 -04:00
bells17
1c917aa463
component-helpers: Support structured and contextual logging (#120637) 2024-04-24 03:06:15 -07:00
Kubernetes Prow Robot
fd40d68a39
Merge pull request #123238 from MirrorShih/master
Fix infinite loop and replace channel with queue
2024-04-18 14:30:07 -07:00
Krzysztof Dąbrowski
170d143b1a
Revert changes in tests 2024-03-30 20:47:29 +01:00
Krzysztof Dąbrowski
5e94ffe90b
nodeipam: poll nodes immediately 2024-03-29 20:56:08 +01:00
MirrorShih
62f89972b6 Fix infinite loop and replace channel with queue 2024-03-05 17:32:11 +00:00
Mengjiao Liu
b584b87a94 kube-controller-manager: readjust log verbosity
- Increase the global level for broadcaster's logging to 3 so that users can ignore event messages by lowering the logging level. It reduces information noise.
- Making sure the context is properly injected into the broadcaster, this will allow the -v flag value to be used also in that broadcaster, rather than the above global value.
- test: use cancellation from ktesting
- golangci-hints: checked error return value
2024-02-26 14:51:56 +08:00
Antonin Bas
75a3069294 Remove unused lookupIP field in NodeIPAM Controller struct
I am not sure why this was originally required, but it doesn't seem to
have been used for years.

Signed-off-by: Antonin Bas <antonin.bas@broadcom.com>
2024-02-14 13:28:35 -08:00
Kubernetes Prow Robot
c9158e9a19
Merge pull request #122595 from dims/support-building-with-and-without-cloud-providers
KUBE_PROVIDERLESS - Support building with and without cloud providers
2024-01-11 05:42:23 +01:00
Antonio Ojea
e46778a246 remove dead code
Change-Id: I8e1fd101ecb32436d82363c76fa84c476b171d52
2024-01-08 13:15:28 +00:00
Davanum Srinivas
b7012da2ad
Remove providerless tag in controller_test.go
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-08 07:03:49 -05:00
Davanum Srinivas
7a236bd7e0
Add providerless tags appropriately in test/
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-01-07 08:16:05 -05:00
ii2day
4b1408c2e7 Fix typos: update registerCidrsetMetrics to registerCIDRSetMetrics
Signed-off-by: ii2day <ji.li@daocloud.io>
2023-12-04 10:09:52 +08:00
Antonio Ojea
c2d473f0d4 remove ClusterCIDR
KEP-2593 proposed to expand the existing node-ipam controller
to be configurable via a ClusterCIDR objects, however, there
were reasonable doubts on the SIG about the feature and after
several months of dicussions we decided to not move forward
with the KEP intree, hence, we are going to remove the existing
code, that is still in alpha.

https://groups.google.com/g/kubernetes-sig-network/c/nts1xEZ--gQ/m/2aTOUNFFAAAJ

Change-Id: Ieaf2007b0b23c296cde333247bfb672441fe6dfc
2023-10-14 19:06:22 +00:00
Ziqi Zhao
dfc1838379 Migrated pkg/controller/volume|util|replicaset|nodeipam to contextual logging
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-07-06 07:39:52 +08:00
Tobias Klauser
e7c679c362
cidrset, multicidrset: directly use getIndexForIP method
Instead of constructing a *net.IPnet whose .Mask field is never used,
call the getIndexForIP method of *CidrSet and *MultiCIDRSet directly.
2023-05-11 10:53:03 +02:00
Antonio Ojea
fd62265d19 unexport buggy function nodeSelectorAsSelector
Change-Id: I1e48ac0dd0b33c367fa9be4f4adb11a4531849f9
2023-03-09 16:58:25 +00:00
Paco Xu
0e6636eb33 nodeipam: return error instead of panics 2023-03-08 12:47:14 +08:00
Paco Xu
4fdca4c5f6 node ipam ut: run test in parallel to avoid timeout; and optimize the panic check 2023-03-08 11:10:51 +08:00
JunYang
780ef3afb0 use klog.InfoS instead of klog.V(0),Info 2023-03-07 15:50:01 +08:00
Antonio Ojea
3bb203e7eb replace nodeipam custom logic by a workqueue
Change-Id: I242174b9d92606b1225a4af29a0730b7cd7d3c03
2023-02-06 19:34:29 +00:00
Sarvesh Rangnekar
c791d69b3e Fix the nodeSelector key creation mechanism
Fixes the issue caused when multile ClusterCIDR objects have the same
nodeSelector values, order of the requirements in the nodeSelector is
not preserved when nodeSelector is marshalled and converted to a string.
2023-02-01 13:48:07 +00:00
Sarvesh Rangnekar
a8f120b76c Fix the delete flow for ClusterCIDR objects
Fixes the deletion of ClusterCIDR object, when a Node is associated(has
Pod CIDRs allocated from this ClusterCIDR) with it. Currently the
ClusterCIDR finalizer is never cleaned up as there is no reconciliation
happening after the associated Node has been deleted. This commit fixes
the issue by adding workitems from all events to a worker queue and
reconcile until the delete is successful.
2023-01-30 19:35:41 +00:00
Patrick Ohly
bc6c7fa912 logging: fix names of keys
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments.
2023-01-23 14:24:29 +01:00
JunYang
29086e2b04 use klog instead of klog.V(0) 2023-01-14 21:15:50 +08:00
Sanskar Jaiswal
b501d6036a add metric for max no. of CIDRs that can be allocated from MultiCIDRSet
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-12-05 15:18:45 +00:00
Sanskar Jaiswal
37f4d4624b add metric for max no. of CIDRs that can be allocated from CidrSet
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
2022-12-05 15:18:45 +00:00
Kubernetes Prow Robot
694698ca38
Merge pull request #110485 from Octopusjust/k8s-pr
cidr_set.go :  fix several typo
2022-11-08 13:51:00 -08:00
Wojciech Tyczyński
e0002c7e26 Clean shutdown of nodeipam controller 2022-11-04 10:34:36 +01:00
Wojciech Tyczyński
c84c27b6ac Clean shutdown of event broadcaster in controllers 2022-11-02 21:08:43 +01:00
Kubernetes Prow Robot
28ced69b76
Merge pull request #113054 from logicalhan/proxy-metric
remove rate limiter metric as it is not in use
2022-10-17 11:09:18 -07:00
Kubernetes Prow Robot
5e775e3c83
Merge pull request #112558 from aojea/ipam_owners
update sig-network reviewers/approvers on controller manager
2022-10-14 10:54:46 -07:00
Han Kang
2bbd445f50 remove rate limiter metric as it is not in use
Change-Id: I91157653e3860eeecc3f572aee88da6ffc65faed
2022-10-13 13:07:11 -07:00
Antonio Ojea
5598735370 update sig-network reviewers/approvers on controller manager 2022-09-19 10:34:39 +02:00
JunYang
2db4dea565 use klog.InfoS instead of klog.V(0).InfoS 2022-08-25 18:46:34 +08: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
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
Jakub Przychodzeń
7dd4e89a99 Enable 'running_managed_controllers' for KCM nodeipam controller 2022-07-27 14:30:40 +00:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
ZhangYu
0be333dd7d modify incorrect words 2022-06-10 09:18:42 +08:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Neha Lohia
fa1b6765d5
move pkg/util/node to component-helpers/node/util (#105347)
Signed-off-by: Neha Lohia <nehapithadiya444@gmail.com>
2021-11-12 07:52:27 -08:00
Kubernetes Prow Robot
372103f4b8
Merge pull request #100672 from wangyx1992/structured-log
Structured Logging migration: modify logs of controller-manager
2021-09-22 20:27:10 -07:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00