Documentation ¶
Index ¶
- func CreateApiserverClient(apiserverHost string, kubeConfig string) (*kubernetes.Clientset, error)
- func FilterByNodeLabel(nodes []*corev1.Node, nodeLabels map[string]string) []*corev1.Node
- func GenerateHashName(clusterID, namespace, resourceName, resourceType string) string
- func GenerateLBName(clusterID, namespace, resourceName, resourceType string) string
- func GeneratePolicyName(clusterID, namespace, resourceName, resourceType string, mode bool, ...) string
- func GeneratePoolName(clusterID, namespace, resourceName, resourceType, serviceName string, port int) string
- func GetIngress(ingressLister nwlisters.IngressLister, key string) (*nwv1.Ingress, error)
- func GetIntFromServiceAnnotation(service *corev1.Service, annotationKey string, defaultSetting int) int
- func GetListProviderID(pnodes []*corev1.Node) []string
- func GetNodeMembersAddr(nodeObjs []*corev1.Node) []string
- func GetService(serviceLister corelisters.ServiceLister, key string) (*corev1.Service, error)
- func GetServiceNodePort(serviceLister corelisters.ServiceLister, name string, ...) (int, int, error)
- func GetStringFromServiceAnnotation(pService *corev1.Service, annotationKey string, defaultSetting string) string
- func HashString(str string) string
- func IsPoolProtocolValid(pPool *lObjects.Pool, pPort corev1.ServicePort, pPoolName string) bool
- func ListNodeWithPredicate(nodeLister corelisters.NodeLister, nodeLabels map[string]string) ([]*corev1.Node, error)
- func ListServiceWithPredicate(serviceLister corelisters.ServiceLister) ([]*corev1.Service, error)
- func ListWorkerNodes(pNodes []*corev1.Node, pOnlyReadyNode bool) []*corev1.Node
- func MapIDExpander(old, cur *IngressInspect)
- func MergeStringArray(current, remove, add []string) ([]string, bool)
- func MinInt(a, b int) int
- func NodeNames(nodes []*corev1.Node) []string
- func NodeSlicesEqual(x, y []*corev1.Node) bool
- func ParseBoolAnnotation(s, annotation string, defaultValue bool) bool
- func ParseIntAnnotation(s, annotation string, defaultValue int) int
- func ParseListenerProtocol(pPort corev1.ServicePort) lListenerV2.CreateOptsListenerProtocolOpt
- func ParseLoadBalancerScheme(pInternal bool) lLoadBalancerV2.CreateOptsSchemeOpt
- func ParseMonitorHealthCheckMethod(pMethod string) *lPoolV2.CreateOptsHealthCheckMethodOpt
- func ParseMonitorHttpVersion(pVersion string) *lPoolV2.CreateOptsHealthCheckHttpVersionOpt
- func ParseMonitorProtocol(pPoolProtocol corev1.Protocol, pMonitorProtocol string) lPoolV2.CreateOptsHealthCheckProtocolOpt
- func ParsePoolAlgorithm(pOpt string) lPoolV2.CreateOptsAlgorithmOpt
- func ParsePoolProtocol(pPoolProtocol string) lPoolV2.CreateOptsProtocolOpt
- func ParseStringListAnnotation(s, annotation string) []string
- func ParseStringMapAnnotation(s, annotation string) map[string]string
- func PatchService(ctx context.Context, client clientset.Interface, cur, mod *corev1.Service) error
- func StringListToString(s []string) string
- func TrimString(str string, length int) string
- func ValidateName(newName string) string
- type CertificateExpander
- type IngressInspect
- type ListenerExpander
- type MyDuration
- type PolicyExpander
- type PoolExpander
- type ResourceDependant
- type SecGroupRuleExpander
- type StringKeyLock
- type UpdateTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateApiserverClient ¶
func CreateApiserverClient(apiserverHost string, kubeConfig string) (*kubernetes.Clientset, error)
create k8s client from config file
func FilterByNodeLabel ¶ added in v0.2.6
FilterByNodeLabel filters the given list of nodes by the given node labels.
func GenerateHashName ¶
func GenerateLBName ¶
func GeneratePolicyName ¶
func GeneratePoolName ¶
func GetIngress ¶
func GetListProviderID ¶
func GetNodeMembersAddr ¶
func GetService ¶
func GetService(serviceLister corelisters.ServiceLister, key string) (*corev1.Service, error)
func GetServiceNodePort ¶
func GetServiceNodePort(serviceLister corelisters.ServiceLister, name string, serviceBackend *nwv1.IngressServiceBackend) (int, int, error)
func HashString ¶
HashString hash a string to a string have 10 char
func IsPoolProtocolValid ¶
func ListNodeWithPredicate ¶
func ListNodeWithPredicate(nodeLister corelisters.NodeLister, nodeLabels map[string]string) ([]*corev1.Node, error)
func ListServiceWithPredicate ¶
func ListServiceWithPredicate(serviceLister corelisters.ServiceLister) ([]*corev1.Service, error)
func ListWorkerNodes ¶
func MapIDExpander ¶
func MapIDExpander(old, cur *IngressInspect)
func MergeStringArray ¶
func NodeSlicesEqual ¶
NodeSlicesEqual check if two nodes equals to each other.
func ParseBoolAnnotation ¶
func ParseIntAnnotation ¶
func ParseListenerProtocol ¶
func ParseListenerProtocol(pPort corev1.ServicePort) lListenerV2.CreateOptsListenerProtocolOpt
func ParseLoadBalancerScheme ¶
func ParseLoadBalancerScheme(pInternal bool) lLoadBalancerV2.CreateOptsSchemeOpt
func ParseMonitorHealthCheckMethod ¶
func ParseMonitorHealthCheckMethod(pMethod string) *lPoolV2.CreateOptsHealthCheckMethodOpt
func ParseMonitorHttpVersion ¶
func ParseMonitorHttpVersion(pVersion string) *lPoolV2.CreateOptsHealthCheckHttpVersionOpt
func ParseMonitorProtocol ¶
func ParseMonitorProtocol( pPoolProtocol corev1.Protocol, pMonitorProtocol string) lPoolV2.CreateOptsHealthCheckProtocolOpt
func ParsePoolAlgorithm ¶
func ParsePoolAlgorithm(pOpt string) lPoolV2.CreateOptsAlgorithmOpt
func ParsePoolProtocol ¶
func ParsePoolProtocol(pPoolProtocol string) lPoolV2.CreateOptsProtocolOpt
func PatchService ¶
PatchService makes patch request to the Service object.
func StringListToString ¶
func TrimString ¶
func ValidateName ¶
Types ¶
type CertificateExpander ¶
type IngressInspect ¶
type IngressInspect struct { DefaultPool *PoolExpander Name string Namespace string LbOptions *loadbalancer.CreateOpts // create options for lb SubnetCIDR string SubnetID string // nodes may have different subnets, so we need to store the subnet id of LB NetworkID string // nodes may have different subnets, so we need to store the subnet id of LB PolicyExpander []*PolicyExpander PoolExpander []*PoolExpander ListenerExpander []*ListenerExpander InstanceIDs []string SecGroupRuleExpander []*SecGroupRuleExpander }
func (*IngressInspect) AddSecgroupRule ¶
func (ing *IngressInspect) AddSecgroupRule(port int, protocol secgroup_rule.CreateOptsProtocolOpt)
func (*IngressInspect) Print ¶
func (ing *IngressInspect) Print()
type ListenerExpander ¶
type ListenerExpander struct { UUID string DefaultPoolName string // use for L4 only listener.CreateOpts }
type MyDuration ¶
type PolicyExpander ¶
type PoolExpander ¶
type PoolExpander struct { UUID string pool.CreateOpts }
type ResourceDependant ¶ added in v0.2.9
type ResourceDependant interface { SetService(service *corev1.Service, isAddEndpoint bool) SetIngress(ingress *networkv1.Ingress, isAddEndpoint bool) GetServiceNeedReconcile(kind, namespace, resource string) []reconcile.Request GetIngressNeedReconcile(kind, namespace, resource string) []reconcile.Request ClearService(namespace, name string) ClearIngress(namespace, name string) }
func NewResourceDependant ¶ added in v0.2.9
func NewResourceDependant() ResourceDependant
type SecGroupRuleExpander ¶
type SecGroupRuleExpander struct { UUID string secgroup_rule.CreateOpts }
type StringKeyLock ¶
type StringKeyLock struct {
// contains filtered or unexported fields
}
func NewStringKeyLock ¶
func NewStringKeyLock() *StringKeyLock
func (*StringKeyLock) Lock ¶
func (l *StringKeyLock) Lock(key string)
func (*StringKeyLock) Unlock ¶
func (l *StringKeyLock) Unlock(key string)
type UpdateTracker ¶
type UpdateTracker struct {
// contains filtered or unexported fields
}
func NewUpdateTracker ¶
func NewUpdateTracker() *UpdateTracker
func (*UpdateTracker) AddUpdateTracker ¶
func (c *UpdateTracker) AddUpdateTracker(lbID, ingressName, updateAt string)
func (*UpdateTracker) GetReapplyIngress ¶
func (c *UpdateTracker) GetReapplyIngress(lbs []*objects.LoadBalancer) []string
func (*UpdateTracker) RemoveUpdateTracker ¶
func (c *UpdateTracker) RemoveUpdateTracker(lbID, ingressName string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.