sync

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

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

SyncL7LB add or update L7 Load Balancer in portal

func (*SyncManager) SyncStatus added in v1.0.2

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL