zero: restart config reconciliation when databroker storage is changed (#4623)

This commit is contained in:
Denis Mishin 2023-10-12 11:19:57 -04:00 committed by Kenneth Jenkins
parent 60ab9dafbe
commit 0e1061d813
5 changed files with 231 additions and 10 deletions

View file

@ -4,16 +4,9 @@ import (
"context"
"github.com/pomerium/pomerium/internal/zero/reconciler"
"github.com/pomerium/pomerium/pkg/grpc/databroker"
)
func (c *controller) RunReconciler(ctx context.Context) error {
leaser := databroker.NewLeaser("zero-reconciler", c.cfg.reconcilerLeaseDuration, c)
return leaser.Run(ctx)
}
// RunLeased implements the databroker.Leaser interface.
func (c *controller) RunLeased(ctx context.Context) error {
return reconciler.Run(ctx,
reconciler.WithAPI(c.api),
reconciler.WithDataBrokerClient(c.GetDataBrokerServiceClient()),