Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TailscaleAdvertisementUpdater ¶
type TailscaleAdvertisementUpdater struct { URL string // contains filtered or unexported fields }
TailscaleAdvertisementUpdater keeps track of the routes which are advertised through the Tailscale client.
func New ¶
func New(namespaces []string, url string) (*TailscaleAdvertisementUpdater, error)
New creates a new updater with the given URL if a GET request to the root path returns StatusOK
func NewUnchecked ¶
func NewUnchecked(namespaces []string, url string, l logr.Logger) *TailscaleAdvertisementUpdater
NewUnchecked creates a new updater without validating the provided configuration. Primarily intended for tests
func (*TailscaleAdvertisementUpdater) AddRoute ¶
func (t *TailscaleAdvertisementUpdater) AddRoute(route string) error
AddRoute adds the provided route to the internal state and updates the advertised routes in the Tailscale client if necesseary.
func (*TailscaleAdvertisementUpdater) GetRoutes ¶
func (t *TailscaleAdvertisementUpdater) GetRoutes() map[string]struct{}
GetRoutes returns the currently registered routes
func (*TailscaleAdvertisementUpdater) SetupInformer ¶
func (t *TailscaleAdvertisementUpdater) SetupInformer(informerFactory informers.SharedInformerFactory) cache.SharedIndexInformer
SetupInformer creates a services informer on the given informer factory, and sets up a handler which updates the Tailscale route advertisements