Documentation ¶
Index ¶
- Constants
- type SyncManager
- func (s *SyncManager) CleanupLBs(ingressClass string) error
- func (s *SyncManager) SyncL7LB(lb *serverscom.L7LoadBalancerCreateInput) (*serverscom.L7LoadBalancer, error)
- func (s *SyncManager) SyncStatus(ctx context.Context, lb *serverscom.L7LoadBalancer) (*serverscom.L7LoadBalancer, error)
- func (s *SyncManager) SyncTLS(ingress *networkv1.Ingress, certManagerPrefix string) (map[string]string, error)
- type Syncer
Constants ¶
View Source
const (
LBPollInterval = 5 * time.Second
)
View Source
const (
TLS_ANNOTATION_PREFIX = "servers.com/certificate-"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncManager ¶
type SyncManager struct {
// contains filtered or unexported fields
}
SyncManager represents a sync manager
func New ¶
func New(tlsManager tls.TLSManagerInterface, lbManager loadbalancer.LBManagerInterface, store store.Storer, clock clockwork.Clock) *SyncManager
New creates a new sync manager
func (*SyncManager) CleanupLBs ¶
func (s *SyncManager) CleanupLBs(ingressClass string) error
CleanupLBs deletes Load Balancers that do not have corresponding SC Ingress in portal
func (*SyncManager) SyncL7LB ¶
func (s *SyncManager) SyncL7LB(lb *serverscom.L7LoadBalancerCreateInput) (*serverscom.L7LoadBalancer, error)
SyncL7LB add or update L7 Load Balancer in portal
func (*SyncManager) SyncStatus ¶ added in v1.0.2
func (s *SyncManager) SyncStatus(ctx context.Context, lb *serverscom.L7LoadBalancer) (*serverscom.L7LoadBalancer, error)
func (*SyncManager) SyncTLS ¶
func (s *SyncManager) SyncTLS(ingress *networkv1.Ingress, certManagerPrefix string) (map[string]string, error)
SyncTLS syncs ingress tls certs stored in secrets to portal. If secret name starts with certManagerPrefix-<certID> we looking for cert from API Due to secret name don't support upperCase for such cases we additionally checks annotations with TLS_ANNOTATION_PREFIX which overrides ingress tls certs for matching hosts. Returns map of hosts to portal cert id
type Syncer ¶
type Syncer interface { SyncTLS(ingress *networkv1.Ingress, certManagerPrefix string) (map[string]string, error) SyncL7LB(lb *serverscom.L7LoadBalancerCreateInput) (*serverscom.L7LoadBalancer, error) CleanupLBs(ingressClass string) error SyncStatus(ctx context.Context, lb *serverscom.L7LoadBalancer) (*serverscom.L7LoadBalancer, error) }
Syncer describes a sync interface
Click to show internal directories.
Click to hide internal directories.