Skip to content

Commit 7328fee

Browse files
authored
Refactor reconcilers and implementations (#250)
Previously, all reconcilers and implementations looked almost the same. This commit: - Replaces all reconcilers with a single one. - Removes all implementations. Now the reconciler sends upsert and delete events to the event channel instead of the implementations. The sending to the events part of the reconciler doesn't have the shutdown bug (a possibility to hang while sending to the channel during the shutdown) all implementations shared. - Removes the sdk package. Additionally, the Manager now uses the same logger as the other components.
1 parent 12710c1 commit 7328fee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2381
-1158
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ require (
1010
github.com/onsi/ginkgo/v2 v2.3.1
1111
github.com/onsi/gomega v1.22.1
1212
github.com/spf13/pflag v1.0.5
13-
golang.org/x/net v0.0.0-20220722155237-a158d28d115b
1413
k8s.io/api v0.25.3
1514
k8s.io/apimachinery v0.25.3
15+
k8s.io/client-go v0.25.3
1616
sigs.k8s.io/controller-runtime v0.13.0
1717
sigs.k8s.io/gateway-api v0.5.1
1818
)
@@ -55,6 +55,7 @@ require (
5555
go.uber.org/multierr v1.7.0 // indirect
5656
go.uber.org/zap v1.21.0 // indirect
5757
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
58+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
5859
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
5960
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
6061
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
@@ -69,7 +70,6 @@ require (
6970
gopkg.in/yaml.v2 v2.4.0 // indirect
7071
gopkg.in/yaml.v3 v3.0.1 // indirect
7172
k8s.io/apiextensions-apiserver v0.25.0 // indirect
72-
k8s.io/client-go v0.25.0 // indirect
7373
k8s.io/component-base v0.25.0 // indirect
7474
k8s.io/klog/v2 v2.70.1 // indirect
7575
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ k8s.io/apiextensions-apiserver v0.25.0 h1:CJ9zlyXAbq0FIW8CD7HHyozCMBpDSiH7EdrSTC
629629
k8s.io/apiextensions-apiserver v0.25.0/go.mod h1:3pAjZiN4zw7R8aZC5gR0y3/vCkGlAjCazcg1me8iB/E=
630630
k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc=
631631
k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo=
632-
k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E=
633-
k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8=
632+
k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0=
633+
k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA=
634634
k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y=
635635
k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk=
636636
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=

internal/implementations/endpointslice/endpointslice.go

Lines changed: 0 additions & 48 deletions
This file was deleted.

internal/implementations/endpointslice/endpointslice_test.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

internal/implementations/endpointslice/implementation_suite_test.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

internal/implementations/gateway/gateway.go

Lines changed: 0 additions & 49 deletions
This file was deleted.

internal/implementations/gateway/gateway_test.go

Lines changed: 0 additions & 61 deletions
This file was deleted.

internal/implementations/gateway/implementation_suite_test.go

Lines changed: 0 additions & 13 deletions
This file was deleted.

internal/implementations/gatewayclass/gatewayclass.go

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)