Documentation ¶
Index ¶
- func NetAttachDefNotInUse(nad *netv1.NetworkAttachmentDefinition, pods []*v1.Pod) error
- func PrimaryNetAttachDefNotExist(nads []*netv1.NetworkAttachmentDefinition) error
- type Controller
- func (c *Controller) ReconcileNamespace(key string) error
- func (c *Controller) ReconcileNetAttachDef(key string) error
- func (c *Controller) Run() error
- func (c *Controller) Shutdown()
- func (c *Controller) UpdateSubsystemCondition(networkName string, fieldManager string, condition *metav1.Condition, ...) error
- type RenderNetAttachDefManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NetAttachDefNotInUse ¶
func NetAttachDefNotInUse(nad *netv1.NetworkAttachmentDefinition, pods []*v1.Pod) error
NetAttachDefNotInUse checks no pod is attached to given NAD. Pod considered not attached to network in case its OVN pod annotation doesn't specify the given NAD key.
func PrimaryNetAttachDefNotExist ¶
func PrimaryNetAttachDefNotExist(nads []*netv1.NetworkAttachmentDefinition) error
PrimaryNetAttachDefNotExist checks no OVN-K primary network NAD exist in the given slice.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New( nadClient netv1clientset.Interface, nadInfomer netv1infomer.NetworkAttachmentDefinitionInformer, udnClient userdefinednetworkclientset.Interface, udnInformer userdefinednetworkinformer.UserDefinedNetworkInformer, cudnInformer userdefinednetworkinformer.ClusterUserDefinedNetworkInformer, renderNadFn RenderNetAttachDefManifest, podInformer corev1informer.PodInformer, namespaceInformer corev1informer.NamespaceInformer, eventRecorder record.EventRecorder, ) *Controller
func (*Controller) ReconcileNamespace ¶
func (c *Controller) ReconcileNamespace(key string) error
ReconcileNamespace enqueue relevant Cluster UDN CR requests following namespace events.
func (*Controller) ReconcileNetAttachDef ¶
func (c *Controller) ReconcileNetAttachDef(key string) error
ReconcileNetAttachDef enqueue NAD requests following NAD events.
func (*Controller) Run ¶
func (c *Controller) Run() error
func (*Controller) Shutdown ¶
func (c *Controller) Shutdown()
func (*Controller) UpdateSubsystemCondition ¶
func (c *Controller) UpdateSubsystemCondition( networkName string, fieldManager string, condition *metav1.Condition, events ...*util.EventDetails, ) error
UpdateSubsystemCondition may be used by other controllers handling UDN/NAD/network setup to report conditions that may affect UDN functionality. FieldManager should be unique for every subsystem. If given network is not managed by a UDN, no condition will be reported and no error will be returned. Events may be used to report additional information about the condition to avoid overloading the condition message. When condition should not change, but new events should be reported, pass condition = nil.