Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #4075

Closed
wants to merge 49 commits into from
Closed

test #4075

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
64e498f
feat(NLB): Introduce annotation to allow ICMP for Path MTU Discovery
chriswachira Nov 12, 2024
b0e9edd
feat: add advertise ca for mtls listener
zac-nixon Dec 10, 2024
0555ac8
fix failing test
zac-nixon Dec 10, 2024
643f33d
fix: Cannot set the IPv6 addresses in dualstack mode during modification
wweiwei-li Dec 16, 2024
b25ade5
fix(helm): change topologySpreadConstraints default value
yann-soubeyrand Dec 16, 2024
31ffe10
bug fix: try SG permission add prior to revoke
zac-nixon Nov 18, 2024
ed8bd00
Merge pull request #3952 from zac-nixon/znixon/sg-revoke-flip
k8s-ci-robot Dec 17, 2024
0fe7e43
Merge pull request #3974 from zac-nixon/advertise
k8s-ci-robot Dec 17, 2024
411778c
Add helm chart values for --aws-vpc-tags argument
pinkavaj Oct 20, 2024
4c9f8a1
Merge pull request #3906 from pinkavaj/pi-args
k8s-ci-robot Jan 6, 2025
06cf08d
bug fix: use reasonable buckets for readiness gate flip metrics
zac-nixon Jan 6, 2025
d88dac5
Merge pull request #3959 from wweiwei-li/main
k8s-ci-robot Jan 6, 2025
0529acc
docs: added annotation behaviour note
AidaKhalelova Jan 8, 2025
e9445ad
Fix CVE-2024-45338 - golang.org/x/net (#4010)
shraddhabang Jan 10, 2025
10e5f72
bump sigs.k8s.io/controller-runtime to v0.19.3
zac-nixon Jan 10, 2025
ba40696
Merge pull request #4001 from zac-nixon/znixon/fix-buckets
k8s-ci-robot Jan 10, 2025
f1435b3
Merge pull request #4011 from zac-nixon/znixon/controller-runtime-bump
k8s-ci-robot Jan 11, 2025
2ff2e59
Merge pull request #3983 from yann-soubeyrand/patch-1
k8s-ci-robot Jan 13, 2025
fab90f4
https://github.com/kubernetes-sigs/aws-load-balancer-controller/pull/…
fvlaicu Jan 15, 2025
369bdac
CI-14222_manipulate_target_groups_from_different_aws_accounts (#3691)
marcosdiez Jan 15, 2025
ddc77cd
resolve pr comments for multi account tgb
zac-nixon Jan 17, 2025
577e1b6
refactor target group lookup in webhooks to reduce code duplication
zac-nixon Jan 17, 2025
db09cb9
add tests and correct regex for assume role session name
zac-nixon Jan 17, 2025
6967226
Merge pull request #3806 from fvlaicu/fix-deployment-tpl
k8s-ci-robot Jan 18, 2025
06e57df
Merge pull request #3939 from chriswachira/introduce-annotation-to-en…
k8s-ci-robot Jan 22, 2025
7e0269a
Added ISO Policy for iso-e and iso-f; updated tests based on testing …
orsenthil Jan 22, 2025
c6b5c6a
Merge pull request #4032 from orsenthil/added_regional_tests
k8s-ci-robot Jan 22, 2025
6b50067
Issue 4023. Checking for taint karpenter.sh/disrupted:NoSchedule whil…
kahirokunn Jan 20, 2025
4d5ce64
Merge pull request #4007 from AidaKhalelova/update-alb-annotation-docs
k8s-ci-robot Jan 23, 2025
dfae145
fix assume role tgb
zac-nixon Jan 18, 2025
388f1df
Merge pull request #4026 from zac-nixon/znixon/multi-acc-tgb
k8s-ci-robot Jan 24, 2025
7118c22
Merge pull request #4022 from kahirokunn/adding-issue-taint
k8s-ci-robot Jan 25, 2025
92ae3dc
allow multiple targetgroupbindings to reference same tg arn if using …
zac-nixon Jan 16, 2025
227315a
Merge pull request #4021 from zac-nixon/znixon/mc-same-cluster
k8s-ci-robot Jan 28, 2025
57472c4
Update issue templates
wweiwei-li Jan 31, 2025
60bb639
Fix docs for source ranges for internal NLB
shraddhabang Feb 17, 2025
e8c32fd
Update docs for supporting removal of availability zone for NLB
shraddhabang Feb 17, 2025
4b4c94d
Update docs for supporting removal of availability zone for NLB
shraddhabang Feb 17, 2025
9ab7f9d
change pod mutator webhook to fail-open (#4062)
M00nF1sh Feb 18, 2025
526b830
add toggle to adjust failurePolicy of pod webhook and documentations …
M00nF1sh Feb 19, 2025
dc64725
Do not render .spec.replicas if HPA Is enabled
sherifabdlnaby Feb 18, 2025
5a84850
Merge pull request #4059 from sherifabdlnaby/dont-render-replicas-wit…
k8s-ci-robot Feb 24, 2025
2792881
Merge pull request #4058 from shraddhabang/daz_docs
k8s-ci-robot Feb 24, 2025
d435b88
bump go version to 1.23.6 for clean vuln report
zac-nixon Feb 24, 2025
e70afa0
Merge pull request #4069 from zac-nixon/main
k8s-ci-robot Feb 25, 2025
e8fef67
Fix webhook error message
maruina Feb 25, 2025
c2437de
Merge pull request #4057 from shraddhabang/doc_updates
zac-nixon Feb 27, 2025
f9699da
Merge pull request #4070 from maruina/maruina/flux
k8s-ci-robot Feb 27, 2025
e942a0f
Update rule management to avoid sporadic 503 errors (#4039)
shraddhabang Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 60 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,73 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
labels: ''
assignees: ''

---

**Describe the bug**
A concise description of what the bug is.
<!--- ❤️ Thanks for taking the time to report this issue. Before you open an issue, please check if a similar issue [already exists](https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues) or has been closed before. If so, add additional helpful details to the existing issue to show that it's affecting multiple people. If not, to help us investigate, please provide the following information. ❤️-->

**Steps to reproduce**
<!-- 🚨 IMPORTANT!!!
Please complete at least the following sections
- Bug Description
- Steps to Reproduce
- Expected Behavior
- Environment
Issue missing details will be closed, as they are crucial for understand the problem. 🚨 -->

**Expected outcome**
A concise description of what you expected to happen.
**Bug Description**
<!--- A concise description of what the bug is -->

**Steps to Reproduce**
<!--- Provide a step-by-step guide to reproduce the bug. If relevant, provide the controller logs with any error messages you are seeing and relevant Kubernetes Manifests.-->
- Step-by-step guide to reproduce the bug:
- Manifests applied while reproducing the issue:
- Controller logs/error messages while reproducing the issue:

**Expected Behavior**
<!--- Describe what you expected to happen instead of the observed behavior -->

**Actual Behavior**
<!--- Describe what actually happens, including details on
- whether the bug causes the controller to stop working entirely or impact some functionality
- how often this bug occur ? [e.g., Always / Often / Occasionally / Rarely]
-->

**Regression**
Was the functionality working correctly in a previous version ? [Yes / No]
If yes, specify the last version where it worked as expected

**Current Workarounds**
<!--- If any workarounds exist, describe them here. If none exist, state "No workarounds available" -->

**Environment**
- AWS Load Balancer controller version:
- Kubernetes version:
- Using EKS (yes/no), if so version?:
- Using Service or Ingress:
- AWS region:
- How was the aws-load-balancer-controller installed:
- If helm was used then please show output of `helm ls -A | grep -i aws-load-balancer-controller`
- If helm was used then please show output of `helm -n <controllernamespace> get values <helmreleasename>`
- If helm was not used, then copy/paste the exact command used to install the controller, including flags and options.
- Current state of the Controller configuration:
- `kubectl -n <controllernamespace> describe deployment aws-load-balancer-controller`
- Current state of the Ingress/Service configuration:
- `kubectl describe ingressclasses`
- `kubectl -n <appnamespace> describe ingress <ingressname>`
- `kubectl -n <appnamespace> describe svc <servicename>`

**Possible Solution (Optional)**
<!--- If you have insights into the cause or potential fix, please share them. -->

* AWS Load Balancer controller version
* Kubernetes version
* Using EKS (yes/no), if so version?
**Contribution Intention (Optional)**
<!---If the solution is accepted, would you be willing to submit a PR?
- if yes, please follow https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/CONTRIBUTING.md to start your contribution.
- If you're not able to contribute a fix, the issue will be open for public contribution. High-impact issues will receive priority attention. We encourage community participation to help resolve issues faster.
-->
- [ ] Yes, I'm willing to submit a PR to fix this issue
- [ ] No, I cannot work on a PR at this time

**Additional Context**:
**Additional Context**
<!---Add any other context about the problem here.-->
25 changes: 19 additions & 6 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,29 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
labels: ''
assignees: ''

---

**Is your feature request related to a problem?**
A description of what the problem is. For example: I'm frustrated when [...]
<!--- ❤️ Thanks for taking the time to fill out this feature request report! We kindly ask that you search to see if a feature request [already exists](https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues?q=is%3Aissue%20state%3Aopen%20label%3Akind%2Ffeature) for your feature. If yes, show your support for features by up voting a discussion or by adding meaningful details which help the feature definition become more clear. If not, please provide following details to have the greatest chance of being worked on by a contributor. ❤️-->

**Describe the solution you'd like**
A description of what you want to happen.
**Describe the feature you are requesting**
<!--- Provide a clear and concise description of the feature -->

**Motivation**
<!--- Provide context about how it will benefit users or improve the project overall. -->

**Describe the proposed solution you'd like**
<!--- A description of what you want to happen. -->

**Describe alternatives you've considered**
A description of any alternative solutions or features you've considered.
<!--- A description of any alternative solutions or features you've considered. -->

**Contribution Intention (Optional)**
<!--- If the feature request is accepted, would you be willing to submit a PR?
* If yes, please follow https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/main/CONTRIBUTING.md to start your contribution
* If you're not able to contribute this feature, it will be open for public contribution. Feature requests are prioritized by the number of upvotes. We encourage community participation to help implement features faster.
-->
-[ ] Yes, I am willing to contribute a PR to implement this feature
-[ ] No, I cannot work on a PR at this time
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.8
1.23.6
8 changes: 8 additions & 0 deletions apis/elbv2/v1alpha1/targetgroupbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ type TargetGroupBindingSpec struct {
// networking provides the networking setup for ELBV2 LoadBalancer to access targets in TargetGroup.
// +optional
Networking *TargetGroupBindingNetworking `json:"networking,omitempty"`

// IAM Role ARN to assume when calling AWS APIs. Useful if the target group is in a different AWS account
// +optional
IamRoleArnToAssume string `json:"iamRoleArnToAssume,omitempty"`

// IAM Role ARN to assume when calling AWS APIs. Needed to assume a role in another account and prevent the confused deputy problem. https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html
// +optional
AssumeRoleExternalId string `json:"assumeRoleExternalId,omitempty"`
}

// TargetGroupBindingStatus defines the observed state of TargetGroupBinding
Expand Down
8 changes: 8 additions & 0 deletions apis/elbv2/v1beta1/targetgroupbinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ type TargetGroupBindingSpec struct {
// VpcID is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
// +optional
VpcID string `json:"vpcID,omitempty"`

// IAM Role ARN to assume when calling AWS APIs. Useful if the target group is in a different AWS account
// +optional
IamRoleArnToAssume string `json:"iamRoleArnToAssume,omitempty"`

// IAM Role ARN to assume when calling AWS APIs. Needed to assume a role in another account and prevent the confused deputy problem. https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html
// +optional
AssumeRoleExternalId string `json:"assumeRoleExternalId,omitempty"`
}

// TargetGroupBindingStatus defines the observed state of TargetGroupBinding
Expand Down
18 changes: 18 additions & 0 deletions config/crd/bases/elbv2.k8s.aws_targetgroupbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ spec:
spec:
description: TargetGroupBindingSpec defines the desired state of TargetGroupBinding
properties:
assumeRoleExternalId:
description: IAM Role ARN to assume when calling AWS APIs. Needed
to assume a role in another account and prevent the confused deputy
problem. https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html
type: string
iamRoleArnToAssume:
description: IAM Role ARN to assume when calling AWS APIs. Useful
if the target group is in a different AWS account
type: string
multiClusterTargetGroup:
description: MultiClusterTargetGroup Denotes if the TargetGroup is
shared among multiple clusters
Expand Down Expand Up @@ -242,6 +251,15 @@ spec:
spec:
description: TargetGroupBindingSpec defines the desired state of TargetGroupBinding
properties:
assumeRoleExternalId:
description: IAM Role ARN to assume when calling AWS APIs. Needed
to assume a role in another account and prevent the confused deputy
problem. https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html
type: string
iamRoleArnToAssume:
description: IAM Role ARN to assume when calling AWS APIs. Useful
if the target group is in a different AWS account
type: string
ipAddressType:
description: ipAddressType specifies whether the target group is of
type IPv4 or IPv6. If unspecified, it will be automatically inferred.
Expand Down
2 changes: 1 addition & 1 deletion config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ webhooks:
name: webhook-service
namespace: system
path: /mutate-v1-pod
failurePolicy: Fail
failurePolicy: Ignore
name: mpod.elbv2.k8s.aws
rules:
- apiGroups:
Expand Down
10 changes: 5 additions & 5 deletions controllers/elbv2/eventhandlers/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ type enqueueRequestsForEndpointsEvent struct {
}

// Create is called in response to an create event - e.g. Pod Creation.
func (h *enqueueRequestsForEndpointsEvent) Create(ctx context.Context, e event.CreateEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointsEvent) Create(ctx context.Context, e event.CreateEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epNew := e.Object.(*corev1.Endpoints)
h.enqueueImpactedTargetGroupBindings(queue, epNew)
}

// Update is called in response to an update event - e.g. Pod Updated.
func (h *enqueueRequestsForEndpointsEvent) Update(ctx context.Context, e event.UpdateEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointsEvent) Update(ctx context.Context, e event.UpdateEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epOld := e.ObjectOld.(*corev1.Endpoints)
epNew := e.ObjectNew.(*corev1.Endpoints)
if !equality.Semantic.DeepEqual(epOld.Subsets, epNew.Subsets) {
Expand All @@ -48,17 +48,17 @@ func (h *enqueueRequestsForEndpointsEvent) Update(ctx context.Context, e event.U
}

// Delete is called in response to a delete event - e.g. Pod Deleted.
func (h *enqueueRequestsForEndpointsEvent) Delete(ctx context.Context, e event.DeleteEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointsEvent) Delete(ctx context.Context, e event.DeleteEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epOld := e.Object.(*corev1.Endpoints)
h.enqueueImpactedTargetGroupBindings(queue, epOld)
}

// Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or
// external trigger request - e.g. reconcile AutoScaling, or a WebHook.
func (h *enqueueRequestsForEndpointsEvent) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointsEvent) Generic(context.Context, event.GenericEvent, workqueue.TypedRateLimitingInterface[reconcile.Request]) {
}

func (h *enqueueRequestsForEndpointsEvent) enqueueImpactedTargetGroupBindings(queue workqueue.RateLimitingInterface, ep *corev1.Endpoints) {
func (h *enqueueRequestsForEndpointsEvent) enqueueImpactedTargetGroupBindings(queue workqueue.TypedRateLimitingInterface[reconcile.Request], ep *corev1.Endpoints) {
tgbList := &elbv2api.TargetGroupBindingList{}
if err := h.k8sClient.List(context.Background(), tgbList,
client.InNamespace(ep.Namespace),
Expand Down
10 changes: 5 additions & 5 deletions controllers/elbv2/eventhandlers/endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package eventhandlers

import (
"context"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"testing"

"github.com/go-logr/logr"
Expand All @@ -15,7 +16,6 @@ import (
elbv2api "sigs.k8s.io/aws-load-balancer-controller/apis/elbv2/v1beta1"
mock_client "sigs.k8s.io/aws-load-balancer-controller/mocks/controller-runtime/client"
"sigs.k8s.io/aws-load-balancer-controller/pkg/testutils"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllertest"
"sigs.k8s.io/controller-runtime/pkg/log"
Expand All @@ -40,7 +40,7 @@ func Test_enqueueRequestsForEndpointsEvent_enqueueImpactedTargetGroupBindings(t
name string
fields fields
args args
wantRequests []ctrl.Request
wantRequests []reconcile.Request
}{
{
name: "service event should enqueue impacted ip TargetType TGBs",
Expand Down Expand Up @@ -91,7 +91,7 @@ func Test_enqueueRequestsForEndpointsEvent_enqueueImpactedTargetGroupBindings(t
},
},
},
wantRequests: []ctrl.Request{
wantRequests: []reconcile.Request{
{
NamespacedName: types.NamespacedName{Namespace: "awesome-ns", Name: "tgb-1"},
},
Expand Down Expand Up @@ -140,7 +140,7 @@ func Test_enqueueRequestsForEndpointsEvent_enqueueImpactedTargetGroupBindings(t
},
},
},
wantRequests: []ctrl.Request{
wantRequests: []reconcile.Request{
{
NamespacedName: types.NamespacedName{Namespace: "awesome-ns", Name: "tgb-1"},
},
Expand Down Expand Up @@ -172,7 +172,7 @@ func Test_enqueueRequestsForEndpointsEvent_enqueueImpactedTargetGroupBindings(t
k8sClient: k8sClient,
logger: logr.New(&log.NullLogSink{}),
}
queue := &controllertest.Queue{Interface: workqueue.New()}
queue := &controllertest.TypedQueue[reconcile.Request]{TypedInterface: workqueue.NewTyped[reconcile.Request]()}
h.enqueueImpactedTargetGroupBindings(queue, tt.args.eps)
gotRequests := testutils.ExtractCTRLRequestsFromQueue(queue)
assert.True(t, cmp.Equal(tt.wantRequests, gotRequests),
Expand Down
10 changes: 5 additions & 5 deletions controllers/elbv2/eventhandlers/endpointslices.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ type enqueueRequestsForEndpointSlicesEvent struct {
}

// Create is called in response to an create event - e.g. EndpointSlice Creation.
func (h *enqueueRequestsForEndpointSlicesEvent) Create(ctx context.Context, e event.CreateEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointSlicesEvent) Create(ctx context.Context, e event.CreateEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epNew := e.Object.(*discv1.EndpointSlice)
h.logger.V(1).Info("Create event for EndpointSlices", "name", epNew.Name)
h.enqueueImpactedTargetGroupBindings(ctx, queue, epNew)
}

// Update is called in response to an update event - e.g. EndpointSlice Updated.
func (h *enqueueRequestsForEndpointSlicesEvent) Update(ctx context.Context, e event.UpdateEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointSlicesEvent) Update(ctx context.Context, e event.UpdateEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epOld := e.ObjectOld.(*discv1.EndpointSlice)
epNew := e.ObjectNew.(*discv1.EndpointSlice)
h.logger.V(1).Info("Update event for EndpointSlices", "name", epNew.Name)
Expand All @@ -54,18 +54,18 @@ func (h *enqueueRequestsForEndpointSlicesEvent) Update(ctx context.Context, e ev
}

// Delete is called in response to a delete event - e.g. EndpointSlice Deleted.
func (h *enqueueRequestsForEndpointSlicesEvent) Delete(ctx context.Context, e event.DeleteEvent, queue workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointSlicesEvent) Delete(ctx context.Context, e event.DeleteEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) {
epOld := e.Object.(*discv1.EndpointSlice)
h.logger.V(1).Info("Deletion event for EndpointSlices", "name", epOld.Name)
h.enqueueImpactedTargetGroupBindings(ctx, queue, epOld)
}

// Generic is called in response to an event of an unknown type or a synthetic event triggered as a cron or
// external trigger request - e.g. reconcile AutoScaling, or a WebHook.
func (h *enqueueRequestsForEndpointSlicesEvent) Generic(context.Context, event.GenericEvent, workqueue.RateLimitingInterface) {
func (h *enqueueRequestsForEndpointSlicesEvent) Generic(context.Context, event.GenericEvent, workqueue.TypedRateLimitingInterface[reconcile.Request]) {
}

func (h *enqueueRequestsForEndpointSlicesEvent) enqueueImpactedTargetGroupBindings(ctx context.Context, queue workqueue.RateLimitingInterface, epSlice *discv1.EndpointSlice) {
func (h *enqueueRequestsForEndpointSlicesEvent) enqueueImpactedTargetGroupBindings(ctx context.Context, queue workqueue.TypedRateLimitingInterface[reconcile.Request], epSlice *discv1.EndpointSlice) {
tgbList := &elbv2api.TargetGroupBindingList{}
svcName, present := epSlice.Labels[svcNameLabel]
if !present {
Expand Down
10 changes: 5 additions & 5 deletions controllers/elbv2/eventhandlers/endpointslices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package eventhandlers

import (
"context"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
"testing"

"github.com/go-logr/logr"
Expand All @@ -15,7 +16,6 @@ import (
elbv2api "sigs.k8s.io/aws-load-balancer-controller/apis/elbv2/v1beta1"
mock_client "sigs.k8s.io/aws-load-balancer-controller/mocks/controller-runtime/client"
"sigs.k8s.io/aws-load-balancer-controller/pkg/testutils"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllertest"
"sigs.k8s.io/controller-runtime/pkg/log"
Expand All @@ -40,7 +40,7 @@ func Test_enqueueRequestsForEndpointSlicesEvent_enqueueImpactedTargetGroupBindin
name string
fields fields
args args
wantRequests []ctrl.Request
wantRequests []reconcile.Request
}{
{
name: "service event should enqueue impacted ip TargetType TGBs",
Expand Down Expand Up @@ -92,7 +92,7 @@ func Test_enqueueRequestsForEndpointSlicesEvent_enqueueImpactedTargetGroupBindin
},
},
},
wantRequests: []ctrl.Request{
wantRequests: []reconcile.Request{
{
NamespacedName: types.NamespacedName{Namespace: "awesome-ns", Name: "tgb-1"},
},
Expand Down Expand Up @@ -142,7 +142,7 @@ func Test_enqueueRequestsForEndpointSlicesEvent_enqueueImpactedTargetGroupBindin
},
},
},
wantRequests: []ctrl.Request{
wantRequests: []reconcile.Request{
{
NamespacedName: types.NamespacedName{Namespace: "awesome-ns", Name: "tgb-1"},
},
Expand Down Expand Up @@ -174,7 +174,7 @@ func Test_enqueueRequestsForEndpointSlicesEvent_enqueueImpactedTargetGroupBindin
k8sClient: k8sClient,
logger: logr.New(&log.NullLogSink{}),
}
queue := &controllertest.Queue{Interface: workqueue.New()}
queue := &controllertest.TypedQueue[reconcile.Request]{TypedInterface: workqueue.NewTyped[reconcile.Request]()}
h.enqueueImpactedTargetGroupBindings(context.Background(), queue, tt.args.epslice)
gotRequests := testutils.ExtractCTRLRequestsFromQueue(queue)
assert.True(t, cmp.Equal(tt.wantRequests, gotRequests),
Expand Down
Loading
Loading