controller

package
v0.0.0-...-e561cac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const WICDController = "WICD"

WICDController is the name of the WICD controller in logs and other outputs

Variables

This section is empty.

Functions

func GetAssociatedNode

func GetAssociatedNode(c client.Client, addrs []net.Addr) (*core.Node, error)

GetAssociatedNode uses the given client to find the name of the node associated with the VM this is running on

func LocalInterfaceAddresses

func LocalInterfaceAddresses() ([]net.Addr, error)

LocalInterfaceAddresses returns a slice of all addresses associated with local network interfaces

func NewDirectClient

func NewDirectClient(cfg *rest.Config) (client.Client, error)

NewDirectClient creates and returns an authenticated client that reads directly from the API server. It also returns the config and scheme used to created the client.

func RunController

func RunController(ctx context.Context, watchNamespace, kubeconfig, caBundle string) error

RunController is the entry point of WICD's controller functionality

Types

type Options

type Options struct {
	Config *rest.Config
	Client client.Client
	Mgr    manager.Manager
	// contains filtered or unexported fields
}

Options contains a list of options available when creating a new ServiceController

type ServiceController

type ServiceController struct {
	manager.Manager
	// contains filtered or unexported fields
}

func NewServiceController

func NewServiceController(ctx context.Context, nodeName, watchNamespace string, options Options) (*ServiceController, error)

NewServiceController returns a pointer to a ServiceController object

func (*ServiceController) Bootstrap

func (sc *ServiceController) Bootstrap(desiredVersion string) error

Bootstrap starts all Windows services marked as necessary for node bootstrapping as defined in the given data

func (*ServiceController) Reconcile

func (sc *ServiceController) Reconcile(_ context.Context, req ctrl.Request) (result ctrl.Result, reconcileErr error)

Reconcile fulfills the Reconciler interface

func (*ServiceController) SetupWithManager

func (sc *ServiceController) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL