Documentation ¶
Index ¶
- Constants
- func EnsureVIP(kube kubernetes.Interface, ipamclient ipamclientset.Interface, ...) (ok bool, needsUpdate bool, newservice *corev1.Service, err error)
- func IpAddressCreatedOrUpdated(serviceQueue workqueue.RateLimitingInterface, address *ipamv1.IpAddress)
- func IpAddressDeleted(kubernetes kubernetes.Interface, serviceLister corelisterv1.ServiceLister, ...) error
- func LogEventAndFail(kube kubernetes.Interface, o metav1.Object, message string) error
- func MakeEvent(kube kubernetes.Interface, o metav1.Object, message string, warn bool) error
- func RequestAddress(kube kubernetes.Interface, ipamclient ipamclientset.Interface, ...) error
- func SimIPAM(ipamclient ipamclientset.Interface) error
- func StoreVIP(vip string, kube kubernetes.Interface, service *corev1.Service) *corev1.Service
Constants ¶
const ( // If set to any value, a VIP will be configured. AnnNxReqVIP = "nexinto.com/req-vip" // This will be set to the VIP. If set, the Loadbalancer was configured successfully. AnnNxVIP = "nexinto.com/vip" // This will be the VIP chosen for the service. AnnNxAssignedVIP = "nexinto.com/assigned-vip" // Set this to explicitly choose a VIP provider. AnnNxVIPProvider = "nexinto.com/vip-provider" // The active provider for this VIP. AnnNxVIPActiveProvider = "nexinto.com/vip-active-provider" )
Variables ¶
This section is empty.
Functions ¶
func EnsureVIP ¶
func EnsureVIP(kube kubernetes.Interface, ipamclient ipamclientset.Interface, addressLister ipamlisterv1.IpAddressLister, service *corev1.Service, controllerName string, requireAnnotation bool) (ok bool, needsUpdate bool, newservice *corev1.Service, err error)
Checks if the service is annotated with a valid VIP, if not, work towards that. Return value ok is true if the service / its annotation is valid and the caller can continue and use the VIP; if it is false, the caller must stop processing and retry later. If there is no error and it is ok to continue, use the returned "newservice" to query the VIP or to make changes to the Service, not your original service because the original came from the cache and should not be modified. If 'needsUpdate' is true, then the service copy was modified and needs to be updated by the caller.
func IpAddressCreatedOrUpdated ¶
func IpAddressCreatedOrUpdated(serviceQueue workqueue.RateLimitingInterface, address *ipamv1.IpAddress)
If an IP address object changes and a Service is an owner, wake up that Service.
func IpAddressDeleted ¶
func IpAddressDeleted(kubernetes kubernetes.Interface, serviceLister corelisterv1.ServiceLister, address *ipamv1.IpAddress) error
If an IP address is deleted and a Service is the owner and it still exists, remove the VIP annotation and wake up the service so the service can retry requesting loadbalancing.
func LogEventAndFail ¶
Create a Warning Event for the object and also return it as an error.
func RequestAddress ¶
func RequestAddress(kube kubernetes.Interface, ipamclient ipamclientset.Interface, service *corev1.Service) error
Create a new IpAddress Object for a Service.
func SimIPAM ¶
func SimIPAM(ipamclient ipamclientset.Interface) error
Simulates the behaviour of the ipam controller.
Types ¶
This section is empty.