controller

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationEgressCIDRS = "appuio.ch/egress-cidrs"
	LeaseLockName         = "machineset-egress-cidr-operator.appuio.ch"
	MachineNamespace      = "openshift-machine-api"
	MachinesetLabel       = "machine.openshift.io/cluster-api-machineset"
	RoleLabel             = "machine.openshift.io/cluster-api-machine-role"
)

Variables

This section is empty.

Functions

func ReconcileSubnet

func ReconcileSubnet(
	hs *v1.HostSubnet,
	cidrs *CIDRMap,
	getMachine MachineGetter,
	updateHostSubnet HostSubnetUpdater,
) string

Types

type CIDRMap

type CIDRMap struct {
	// contains filtered or unexported fields
}

func NewCIDRMap

func NewCIDRMap() *CIDRMap

func (*CIDRMap) Delete

func (m *CIDRMap) Delete(machineSetName string)

func (*CIDRMap) EqualCIRDs

func (m *CIDRMap) EqualCIRDs(machineSetName string, other []v1.HostSubnetEgressCIDR) bool

func (*CIDRMap) Equals

func (m *CIDRMap) Equals(machineSetName, v string) bool

Equals returns true if the splitted, sorted value of v is equal to the entry in the cache for `machineSetName`.

func (*CIDRMap) Exists

func (m *CIDRMap) Exists(machineSetName string) bool

func (*CIDRMap) Get

func (m *CIDRMap) Get(machineSetName string) []v1.HostSubnetEgressCIDR

func (*CIDRMap) Set

func (m *CIDRMap) Set(machineSetName, s string)

Set takes a list of (comma separated) values, splits and sorts them, and then inserts them into the cache for `machineSetName`.

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(config *rest.Config) *Controller

func (*Controller) AddHostSubnet

func (c *Controller) AddHostSubnet(hs *v1.HostSubnet)

func (*Controller) AddMachineSet

func (c *Controller) AddMachineSet(ms *v1beta1.MachineSet)

func (*Controller) DeleteHostSubnet

func (c *Controller) DeleteHostSubnet(hs *v1.HostSubnet)

func (*Controller) DeleteMachineSet

func (c *Controller) DeleteMachineSet(ms *v1beta1.MachineSet)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

func (*Controller) UpdateHostSubnet

func (c *Controller) UpdateHostSubnet(_, hs *v1.HostSubnet)

func (*Controller) UpdateMachineSet

func (c *Controller) UpdateMachineSet(_, ms *v1beta1.MachineSet)

type HostSubnetUpdater

type HostSubnetUpdater func(ctx context.Context, hostSubnet *v1.HostSubnet, opts metav1.UpdateOptions) (*v1.HostSubnet, error)

type MachineGetter

type MachineGetter func(name string) (*v1beta1.Machine, error)

Jump to

Keyboard shortcuts

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