Add test ability to reinitialize worker auth roots on startup (#4895)
This commit is contained in:
1 parent
b54608b9f2
commit
d547e0d459
3 files changed
+10
-1
No files matched your search
@@ -475,7 +475,7 @@ func New(ctx context.Context, conf *Config) (*Controller, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to instantiate worker auth repository: %w", err)
|
||||
}
|
||||
_, err = server.RotateRoots(ctx, serversRepo, nodeenrollment.WithCertificateLifetime(conf.TestOverrideWorkerAuthCaCertificateLifetime))
|
||||
_, err = server.RotateRoots(ctx, serversRepo, nodeenrollment.WithCertificateLifetime(conf.TestOverrideWorkerAuthCaCertificateLifetime), nodeenrollment.WithReinitializeRoots(conf.TestWorkerAuthCaReinitialize))
|
||||
if err != nil {
|
||||
event.WriteSysEvent(ctx, op, "unable to ensure worker auth roots exist, may be due to multiple controllers starting at once, continuing")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user