Fix rebase issues

Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
Tom Proctor
2024-10-04 14:22:38 +01:00
parent 64776a0277
commit aebba51df8
3 changed files with 10 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ func TestTailscaleEgressServices(t *testing.T) {
UID: types.UID("1234-UID"),
},
Spec: tsapi.ProxyGroupSpec{
Replicas: pointer.To(3),
Replicas: pointer.To[int32](3),
Type: tsapi.ProxyGroupTypeEgress,
},
}

View File

@@ -356,12 +356,12 @@ func runReconcilers(opts reconcilerOpts) {
}
egressSvcFilter := handler.EnqueueRequestsFromMapFunc(egressSvcsHandler)
proxyGroupFilter := handler.EnqueueRequestsFromMapFunc(egressSvcsFromEgressProxyGroup(mgr.GetClient(), opts.log))
egressProxyGroupFilter := handler.EnqueueRequestsFromMapFunc(egressSvcsFromEgressProxyGroup(mgr.GetClient(), opts.log))
err = builder.
ControllerManagedBy(mgr).
Named("egress-svcs-reconciler").
Watches(&corev1.Service{}, egressSvcFilter).
Watches(&tsapi.ProxyGroup{}, proxyGroupFilter).
Watches(&tsapi.ProxyGroup{}, egressProxyGroupFilter).
Complete(&egressSvcsReconciler{
Client: mgr.GetClient(),
tsNamespace: opts.tailscaleNamespace,
@@ -458,15 +458,15 @@ func runReconcilers(opts reconcilerOpts) {
}
// Recorder reconciler.
proxyGroupFilter := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &tsapi.ProxyGroup{})
ownedByProxyGroupFilter := handler.EnqueueRequestForOwner(mgr.GetScheme(), mgr.GetRESTMapper(), &tsapi.ProxyGroup{})
proxyClassFilterForProxyGroup := handler.EnqueueRequestsFromMapFunc(proxyClassHandlerForProxyGroup(mgr.GetClient(), startlog))
err = builder.ControllerManagedBy(mgr).
For(&tsapi.ProxyGroup{}).
Watches(&appsv1.StatefulSet{}, proxyGroupFilter).
Watches(&corev1.ServiceAccount{}, proxyGroupFilter).
Watches(&corev1.Secret{}, proxyGroupFilter).
Watches(&rbacv1.Role{}, proxyGroupFilter).
Watches(&rbacv1.RoleBinding{}, proxyGroupFilter).
Watches(&appsv1.StatefulSet{}, ownedByProxyGroupFilter).
Watches(&corev1.ServiceAccount{}, ownedByProxyGroupFilter).
Watches(&corev1.Secret{}, ownedByProxyGroupFilter).
Watches(&rbacv1.Role{}, ownedByProxyGroupFilter).
Watches(&rbacv1.RoleBinding{}, ownedByProxyGroupFilter).
Watches(&tsapi.ProxyClass{}, proxyClassFilterForProxyGroup).
Complete(&ProxyGroupReconciler{
recorder: eventRecorder,

View File

@@ -415,7 +415,7 @@ func pgTailscaledConfig(pg *tsapi.ProxyGroup, class *tsapi.ProxyClass, idx int32
// For egress proxies only, we need to ensure that stateful filtering is
// not in place so that traffic from cluster can be forwarded via
// Tailscale IPs.
if pg.Spec.Type == tsapi.ProxyClassTypeEgress {
if pg.Spec.Type == tsapi.ProxyGroupTypeEgress {
conf.NoStatefulFiltering = "true"
}
if shouldAcceptRoutes(class) {