Documentation ¶
Index ¶
- Constants
- type LoadbalancerProvider
- type NoopLoadbalancerProvider
- func (NoopLoadbalancerProvider) EnsureLoadBalancer(context.Context, *vmopv1.VirtualMachineService) error
- func (NoopLoadbalancerProvider) GetServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (NoopLoadbalancerProvider) GetServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (NoopLoadbalancerProvider) GetToBeRemovedServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (NoopLoadbalancerProvider) GetToBeRemovedServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- type NsxtLoadbalancerProvider
- func (nl *NsxtLoadbalancerProvider) EnsureLoadBalancer(ctx context.Context, vmService *vmopv1.VirtualMachineService) error
- func (nl *NsxtLoadbalancerProvider) GetServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (nl *NsxtLoadbalancerProvider) GetServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (nl *NsxtLoadbalancerProvider) GetToBeRemovedServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
- func (nl *NsxtLoadbalancerProvider) GetToBeRemovedServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
Constants ¶
const ( NSXTLoadBalancer = "nsx-t-lb" SimpleLoadBalancer = "simple-lb" ServiceLoadBalancerHealthCheckNodePortTagKey = "ncp/healthCheckNodePort" NSXTServiceProxy = "nsx-t" // LabelServiceProxyName indicates that an alternative service proxy will implement // this Service. Copied from kubernetes pkg/proxy/apis/well_known_labels.go to avoid // k8s dependency. LabelServiceProxyName = "service.kubernetes.io/service-proxy-name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadbalancerProvider ¶
type LoadbalancerProvider interface { EnsureLoadBalancer(ctx context.Context, vmService *vmopv1.VirtualMachineService) error // GetServiceLabels returns the labels, if any, to place on a Service. // This is applicable when VirtualMachineService is translated to a // Service and we would like to apply the provider specific labels // on the corresponding Service. GetServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error) // GetToBeRemovedServiceLabels returns the labels, if any, to be // removed from a Service. // This is applicable when VirtualMachineService is translated to a // Service and we would like to remove the provider specific labels // from the corresponding Service // This is needed because other operators(net operator) might have added // labels to the Service so to correctly sync the addition/removal of // labels on the Service object without touching the existing ones, // we need to have clearly defined ownership GetToBeRemovedServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error) // GetServiceAnnotations returns the annotations, if any, to place on a Service. // This is applicable when VirtualMachineService is translated to a // Service and we would like to apply the provider specific annotations // on the corresponding Service. GetServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error) // GetToBeRemovedServiceAnnotations returns the annotations, if any, to be // removed from a Service. // This is applicable when VirtualMachineService is translated to a // Service and we would like to remove the provider specific annotations // from the corresponding Service // This is needed because other operators(net operator) might have added // annotations to the Service so to correctly sync the addition/removal of // annotations on the Service object without touching the existing ones, // we need to have clearly defined ownership GetToBeRemovedServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error) }
LoadbalancerProvider sets up Loadbalancer for different type of Loadbalancer.
func GetLoadbalancerProviderByType ¶
func GetLoadbalancerProviderByType(mgr manager.Manager, providerType string) (LoadbalancerProvider, error)
type NoopLoadbalancerProvider ¶
type NoopLoadbalancerProvider struct{}
func (NoopLoadbalancerProvider) EnsureLoadBalancer ¶
func (NoopLoadbalancerProvider) EnsureLoadBalancer(context.Context, *vmopv1.VirtualMachineService) error
func (NoopLoadbalancerProvider) GetServiceAnnotations ¶
func (NoopLoadbalancerProvider) GetServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
func (NoopLoadbalancerProvider) GetServiceLabels ¶
func (NoopLoadbalancerProvider) GetServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
func (NoopLoadbalancerProvider) GetToBeRemovedServiceAnnotations ¶
func (NoopLoadbalancerProvider) GetToBeRemovedServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
func (NoopLoadbalancerProvider) GetToBeRemovedServiceLabels ¶
func (NoopLoadbalancerProvider) GetToBeRemovedServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
type NsxtLoadbalancerProvider ¶
type NsxtLoadbalancerProvider struct { }
func NsxtLoadBalancerProvider ¶
func NsxtLoadBalancerProvider() *NsxtLoadbalancerProvider
NsxtLoadBalancerProvider returns a nsxLoadbalancerProvider instance.
func (*NsxtLoadbalancerProvider) EnsureLoadBalancer ¶
func (nl *NsxtLoadbalancerProvider) EnsureLoadBalancer(ctx context.Context, vmService *vmopv1.VirtualMachineService) error
func (*NsxtLoadbalancerProvider) GetServiceAnnotations ¶
func (nl *NsxtLoadbalancerProvider) GetServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
GetServiceAnnotations provides the intended NSX-T specific annotations on Service. The responsibility is left to the caller to actually set them.
func (*NsxtLoadbalancerProvider) GetServiceLabels ¶
func (nl *NsxtLoadbalancerProvider) GetServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
GetServiceLabels provides the intended NSX-T specific labels on Service. The responsibility is left to the caller to actually set them.
func (*NsxtLoadbalancerProvider) GetToBeRemovedServiceAnnotations ¶
func (nl *NsxtLoadbalancerProvider) GetToBeRemovedServiceAnnotations(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
GetToBeRemovedServiceAnnotations provides the to be removed NSX-T specific annotations on Service. The responsibility is left to the caller to actually clear them.
func (*NsxtLoadbalancerProvider) GetToBeRemovedServiceLabels ¶
func (nl *NsxtLoadbalancerProvider) GetToBeRemovedServiceLabels(ctx context.Context, vmService *vmopv1.VirtualMachineService) (map[string]string, error)
GetToBeRemovedServiceLabels provides the to be removed NSX-T specific labels on Service. The responsibility is left to the caller to actually clear them.