Documentation ¶
Index ¶
- Constants
- func GetNPLSInformer(clientset clientset.Interface, resync time.Duration, ...) (informers.SharedInformerFactory, v1alpha.NodePoolLabelSetInformer)
- func GetNodeInformer(clientset kubernetes.Interface, resync time.Duration, ...) (informers.SharedInformerFactory, corev1.NodeInformer)
- type Config
- type Controller
- type Event
Constants ¶
View Source
const ( UpdateEvent eventType = "Update" DeleteEvent eventType = "Delete" AddEvent eventType = "Add" )
View Source
const (
NPLSResourceType = "npls"
)
View Source
const (
NodeResourceType = "node"
)
Variables ¶
This section is empty.
Functions ¶
func GetNPLSInformer ¶
func GetNPLSInformer(clientset clientset.Interface, resync time.Duration, queue workqueue.RateLimitingInterface) (informers.SharedInformerFactory, v1alpha.NodePoolLabelSetInformer)
GetNPLSInformer creates and gives back a shared NPLS informer and its factory
func GetNodeInformer ¶
func GetNodeInformer(clientset kubernetes.Interface, resync time.Duration, queue workqueue.RateLimitingInterface) (informers.SharedInformerFactory, corev1.NodeInformer)
GetNodeInformer creates and gives back a shared Node informer and its factory
Types ¶
type Config ¶
type Config struct { // Namespace is where the labeler looks for NPLS resources Namespace string `mapstructure:"namespace"` // NodepoolNameLabels contains label names which are used in order // to try to determine the nodepool name the node is part of NodepoolNameLabels []string `mapstructure:"nodepoolNameLabels"` }
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages node pool labels
func New ¶
func New(config Config, k8sConfig *rest.Config, labeler *labeler.Labeler, logger log.Logger, errorHandler emperror.Handler) (*Controller, error)
New gives back an initialized Controller
func (*Controller) Start ¶
func (c *Controller) Start() error
Start initializes the informers and starts observing them
Click to show internal directories.
Click to hide internal directories.