mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
--events controls CRD informer creation
mgruener suggested that the --events flag could be wired to control whether or not the CRD source created and started its informer. This commit makes that change; good idea!
This commit is contained in:
parent
56a8d60fff
commit
929e618935
1
main.go
1
main.go
@ -133,6 +133,7 @@ func main() {
|
|||||||
RequestTimeout: cfg.RequestTimeout,
|
RequestTimeout: cfg.RequestTimeout,
|
||||||
DefaultTargets: cfg.DefaultTargets,
|
DefaultTargets: cfg.DefaultTargets,
|
||||||
OCPRouterName: cfg.OCPRouterName,
|
OCPRouterName: cfg.OCPRouterName,
|
||||||
|
UpdateEvents: cfg.UpdateEvents,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup all the selected sources by names and pass them the desired configuration.
|
// Lookup all the selected sources by names and pass them the desired configuration.
|
||||||
|
@ -69,6 +69,7 @@ type Config struct {
|
|||||||
RequestTimeout time.Duration
|
RequestTimeout time.Duration
|
||||||
DefaultTargets []string
|
DefaultTargets []string
|
||||||
OCPRouterName string
|
OCPRouterName string
|
||||||
|
UpdateEvents bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// ClientGenerator provides clients
|
// ClientGenerator provides clients
|
||||||
@ -270,8 +271,7 @@ func BuildWithConfig(ctx context.Context, source string, p ClientGenerator, cfg
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
startInformer := true
|
return NewCRDSource(crdClient, cfg.Namespace, cfg.CRDSourceKind, cfg.AnnotationFilter, cfg.LabelFilter, scheme, cfg.UpdateEvents)
|
||||||
return NewCRDSource(crdClient, cfg.Namespace, cfg.CRDSourceKind, cfg.AnnotationFilter, cfg.LabelFilter, scheme, startInformer)
|
|
||||||
case "skipper-routegroup":
|
case "skipper-routegroup":
|
||||||
apiServerURL := cfg.APIServerURL
|
apiServerURL := cfg.APIServerURL
|
||||||
tokenPath := ""
|
tokenPath := ""
|
||||||
|
Loading…
Reference in New Issue
Block a user