Skip to content

Commit 5ce1a43

Browse files
committed
proxy/authentication: set proper 10h resync period
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
1 parent 7372e1f commit 5ce1a43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/proxy/options/authentication.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ import (
3838
kcpauthentication "github.com/kcp-dev/kcp/pkg/proxy/authentication"
3939
)
4040

41+
const resyncPeriod = 10 * time.Hour
42+
4143
// Authentication wraps BuiltInAuthenticationOptions so we can minimize the
4244
// dependencies on apiserver auth machinery, specifically by overriding the
4345
// ApplyTo so we can remove those config dependencies not relevant to the
@@ -111,7 +113,7 @@ func (c *Authentication) ApplyTo(ctx context.Context, authenticationInfo *generi
111113
return fmt.Errorf("failed to create client for ServiceAccountTokenGetter: %w", err)
112114
}
113115

114-
versionedInformers := kcpkubernetesinformers.NewSharedInformerFactory(tokenGetterClient, 10*time.Minute)
116+
versionedInformers := kcpkubernetesinformers.NewSharedInformerFactory(tokenGetterClient, resyncPeriod)
115117

116118
authenticatorConfig.ServiceAccountTokenGetter = serviceaccountcontroller.NewClusterGetterFromClient(
117119
tokenGetterClient,

0 commit comments

Comments
 (0)