control

package
v0.0.0-...-7949e55 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ACLEnabled       bool
	DefaultMode      string
	Namespace        string
	WatchNamespaces  []string
	IgnoreNamespaces []string
	MinTCPPort       int32
	MaxTCPPort       int32
	MinUDPPort       int32
	MaxUDPPort       int32
	// contains filtered or unexported fields
}

func (Config) Filter

func (cfg Config) Filter() *k8s.ResourceFilter

func (*Config) Table

func (c *Config) Table() *shadow.PortStateTable

type Handler

type Handler func(*topology.TopologySpec) error

type Shadow

type Shadow struct {
	client.Client
	Log logr.Logger
	// contains filtered or unexported fields
}

Shadow implements reconciler loop that manages services/shadow services

func New

func New(cfg *Config, c client.Client, lg logr.Logger) *Shadow

func (*Shadow) Init

func (r *Shadow) Init(ctx context.Context) error

Init initializes the shadowservice controller.

func (*Shadow) Reconcile

func (r *Shadow) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

func (*Shadow) SetupWithManager

func (r *Shadow) SetupWithManager(mgr ctrl.Manager) error

func (*Shadow) Sync

func (r *Shadow) Sync(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Sync synchronizes the given service and its shadow service. If the shadow service doesn't exist it will be created. If it exists it will be updated and if the service doesn't exist, the shadow service will be removed.

Jump to

Keyboard shortcuts

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