runtime.Object in routerTransform
Co-authored-by: lbenguigui <lbenguigui@gmail.com>
This commit is contained in:
parent
7bda07a422
commit
d582e01892
4 changed files with 5 additions and 4 deletions
|
@ -73,7 +73,7 @@ func (p *Provider) applyRouterTransform(ctx context.Context, rt *dynamic.Router,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err := p.routerTransform.Apply(ctx, rt, ingress.Annotations)
|
err := p.routerTransform.Apply(ctx, rt, ingress)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ func (p *Provider) applyRouterTransform(ctx context.Context, rt *dynamic.Router,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err := p.routerTransform.Apply(ctx, rt, route.Annotations)
|
err := p.routerTransform.Apply(ctx, rt, route)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ func (p *Provider) applyRouterTransform(ctx context.Context, rt *dynamic.Router,
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err := p.routerTransform.Apply(ctx, rt, ingress.Annotations)
|
err := p.routerTransform.Apply(ctx, rt, ingress)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
log.Ctx(ctx).Error().Err(err).Msg("Apply router transform")
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,9 @@ import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RouterTransform interface {
|
type RouterTransform interface {
|
||||||
Apply(ctx context.Context, rt *dynamic.Router, annotations map[string]string) error
|
Apply(ctx context.Context, rt *dynamic.Router, object runtime.Object) error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue