mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
zero: fix bootstrap config path (#5035)
This commit is contained in:
parent
4193583301
commit
d20e99ca8c
7 changed files with 36 additions and 33 deletions
|
@ -12,7 +12,7 @@ type controllerConfig struct {
|
|||
otelEndpoint string
|
||||
|
||||
tmpDir string
|
||||
bootstrapConfigFileName string
|
||||
bootstrapConfigFileName *string
|
||||
|
||||
reconcilerLeaseDuration time.Duration
|
||||
databrokerRequestTimeout time.Duration
|
||||
|
@ -56,7 +56,7 @@ func WithAPIToken(token string) Option {
|
|||
// WithBootstrapConfigFileName sets the name of the file to store the bootstrap config in.
|
||||
func WithBootstrapConfigFileName(name string) Option {
|
||||
return func(c *controllerConfig) {
|
||||
c.bootstrapConfigFileName = name
|
||||
c.bootstrapConfigFileName = &name
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func Run(ctx context.Context, opts ...Option) error {
|
|||
return fmt.Errorf("init api: %w", err)
|
||||
}
|
||||
|
||||
src, err := bootstrap.New([]byte(c.cfg.apiToken))
|
||||
src, err := bootstrap.New([]byte(c.cfg.apiToken), c.cfg.bootstrapConfigFileName, c.api)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating bootstrap config: %w", err)
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ func (c *controller) runBootstrap(ctx context.Context) error {
|
|||
ctx = log.WithContext(ctx, func(c zerolog.Context) zerolog.Context {
|
||||
return c.Str("service", "zero-bootstrap")
|
||||
})
|
||||
return c.bootstrapConfig.Run(ctx, c.api, c.cfg.bootstrapConfigFileName)
|
||||
return c.bootstrapConfig.Run(ctx)
|
||||
}
|
||||
|
||||
func (c *controller) runPomeriumCore(ctx context.Context) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue