edgeingress

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACP

type ACP struct {
	Name string `json:"name"`
}

ACP is an ACP used by the edge ingress.

type Certificate

type Certificate struct {
	Certificate []byte `json:"certificate"`
	PrivateKey  []byte `json:"privateKey"`
}

Certificate represents the certificate returned by the platform.

type CustomDomain added in v0.5.0

type CustomDomain struct {
	Name     string `json:"name"`
	Verified bool   `json:"verified"`
}

CustomDomain holds domain information.

type EdgeIngress

type EdgeIngress struct {
	WorkspaceID string `json:"workspaceId"`
	ClusterID   string `json:"clusterId"`
	Namespace   string `json:"namespace"`
	Name        string `json:"name"`

	Domain        string         `json:"domain"`
	CustomDomains []CustomDomain `json:"customDomains"`

	Version string  `json:"version"`
	Service Service `json:"service"`
	ACP     *ACP    `json:"acp,omitempty"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

EdgeIngress is an ingress exposed on the edge.

func (*EdgeIngress) Resource

func (e *EdgeIngress) Resource() (*hubv1alpha1.EdgeIngress, error)

Resource builds the v1alpha1 EdgeIngress resource.

type PlatformClient

type PlatformClient interface {
	GetEdgeIngresses(ctx context.Context) ([]EdgeIngress, error)
	GetWildcardCertificate(ctx context.Context) (Certificate, error)
	GetCertificateByDomains(ctx context.Context, domains []string) (Certificate, error)
}

PlatformClient for the EdgeIngress service.

type Service

type Service struct {
	Name string `json:"name"`
	Port int    `json:"port"`
}

Service is a service used by the edge ingress.

type Watcher

type Watcher struct {
	// contains filtered or unexported fields
}

Watcher watches hub EdgeIngresses and sync them with the cluster.

func NewWatcher

func NewWatcher(client PlatformClient, hubClientSet hubclientset.Interface, clientSet clientset.Interface, traefikClientSet v1alpha1.TraefikV1alpha1Interface, hubInformer hubinformer.SharedInformerFactory, config WatcherConfig) (*Watcher, error)

NewWatcher returns a new Watcher.

func (*Watcher) Run

func (w *Watcher) Run(ctx context.Context)

Run runs Watcher.

type WatcherConfig

type WatcherConfig struct {
	IngressClassName        string
	AgentNamespace          string
	TraefikTunnelEntryPoint string

	EdgeIngressSyncInterval time.Duration
	CertRetryInterval       time.Duration
	CertSyncInterval        time.Duration
}

WatcherConfig holds the watcher configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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