gateway

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package gateway contains the gateway controllers and utilities.

Index

Constants

View Source
const (
	// GatewayComponentKey is the key used to label the gateway pod.
	GatewayComponentKey = consts.NetworkingComponentKey

	// GatewayComponentGateway is the key used to label the gateway pod.
	GatewayComponentGateway = "gateway"

	// RouteCategoryGwTargetValue is the value used by the routeconfiguration controller to reconcile only resources related to a gateway.
	RouteCategoryGwTargetValue = "gateway"

	// RouteSubCategoryFabricTargetValue is the value used by the routeconfiguration controller to reconcile only resources related to a gateway.
	RouteSubCategoryFabricTargetValue = "fabric"
	// RouteSubCategoryFabricNodeTargetValue is the value used by the routeconfiguration controller
	// to reconcile only resources related to a gateway on anode.
	RouteSubCategoryFabricNodeTargetValue = "fabric-node"

	// FirewallCategoryGwTargetValue is the value used by the firewallconfiguration controller to reconcile only resources related to a gateway.
	FirewallCategoryGwTargetValue = "gateway"

	// FirewallSubCategoryFabricTargetValue is the value used by the firewallconfiguration controller to reconcile only resources related to a gateway.
	FirewallSubCategoryFabricTargetValue = "fabric"
)

Variables

RequiredFlags contains the list of the mandatory flags.

Functions

func ForgeActiveGatewayPodLabels

func ForgeActiveGatewayPodLabels() map[string]string

ForgeActiveGatewayPodLabels returns the labels for the gateway pod.

func ForgeFirewallInternalTargetLabels

func ForgeFirewallInternalTargetLabels() map[string]string

ForgeFirewallInternalTargetLabels returns the labels used by the firewallconfiguration controller to reconcile only resources related to a gateway.

func ForgeRouteExternalTargetLabels

func ForgeRouteExternalTargetLabels(remoteID string) map[string]string

ForgeRouteExternalTargetLabels returns the labels used by the routeconfiguration controller to reconcile only resources related to a single gateway and external-network.

func ForgeRouteInternalTargetLabels

func ForgeRouteInternalTargetLabels() map[string]string

ForgeRouteInternalTargetLabels returns the labels used by the routeconfiguration controller to reconcile only resources related to internal-network.

func ForgeRouteInternalTargetLabelsByNode

func ForgeRouteInternalTargetLabelsByNode(nodeName string) map[string]string

ForgeRouteInternalTargetLabelsByNode returns the labels used by the routeconfiguration controller to reconcile only resources related to internal-network and a single node.

func InitFlags

func InitFlags(flagset *pflag.FlagSet, opts *Options)

InitFlags initializes the flags for the gateway.

func MarkFlagsRequired

func MarkFlagsRequired(cmd *cobra.Command) error

MarkFlagsRequired marks the flags as required.

func SetOwnerReferenceWithMode

func SetOwnerReferenceWithMode(opts *Options, obj metav1.Object, scheme *runtime.Scheme) error

SetOwnerReferenceWithMode sets the owner reference of the object according to the mode.

Types

type FlagName

type FlagName string

FlagName is the type for the name of the flags.

const (
	// FlagNameName is the name of the Gateway resource.
	FlagNameName FlagName = "name"
	// FlagNameNamespace is the namespace Gateway resource.
	FlagNameNamespace FlagName = "namespace"
	// FlagNameRemoteClusterID is the clusterID of the remote cluster.
	FlagNameRemoteClusterID FlagName = "remote-cluster-id"
	// FlagNameNodeName is the name of the node.
	FlagNameNodeName FlagName = "node-name"
	// FlagNamePodName is the name of the pod.
	FlagNamePodName FlagName = "pod-name"
	// FlagContainerName is the name of the container.
	FlagContainerName FlagName = "container-name"

	// FlagNameGatewayUID is the UID of the Gateway resource.
	FlagNameGatewayUID FlagName = "gateway-uid"

	// FlagNameMode is the mode in which the gateway is configured.
	FlagNameMode FlagName = "mode"

	// FlagConcurrentContainersNames is the names of the containers that the gateway container must wait for.
	FlagConcurrentContainersNames FlagName = "concurrent-containers-names"

	// FlagNameLeaderElection is the flag to enable leader election.
	FlagNameLeaderElection FlagName = "leader-election"
	// FlagNameLeaderElectionLeaseDuration is the lease duration for the leader election.
	FlagNameLeaderElectionLeaseDuration FlagName = "leader-election-lease-duration"
	// FlagNameLeaderElectionRenewDeadline is the renew deadline for the leader election.
	FlagNameLeaderElectionRenewDeadline FlagName = "leader-election-renew-deadline"
	// FlagNameLeaderElectionRetryPeriod is the retry period for the leader election.
	FlagNameLeaderElectionRetryPeriod FlagName = "leader-election-retry-period"

	// FlagNameMetricsAddress is the address for the metrics endpoint.
	FlagNameMetricsAddress FlagName = "metrics-address"
	// FlagNameProbeAddr is the address for the health probe endpoint.
	FlagNameProbeAddr FlagName = "health-probe-bind-address"

	// FlagNameDisableKernelVersionCheck is the flag to enable the kernel version check.
	FlagNameDisableKernelVersionCheck FlagName = "disable-kernel-version-check"
	// FlagNameMinimumKernelVersion is the minimum kernel version required by Liqo.
	FlagNameMinimumKernelVersion FlagName = "minimum-kernel-version"
)

func (FlagName) String

func (fn FlagName) String() string

type Mode

type Mode string

Mode is the mode in which the gateway is configured.

const (
	// ModeServer is the mode when the gateway is configured as a server.
	ModeServer Mode = "server"
	// ModeClient is the mode when the gateway is configured as a client.
	ModeClient Mode = "client"
)

func (*Mode) Set

func (m *Mode) Set(value string) error

Set sets the value of the mode.

func (Mode) String

func (m Mode) String() string

String returns the string representation of the mode.

func (*Mode) Type

func (m *Mode) Type() string

Type returns the type of the mode.

type Options

type Options struct {
	Name            string
	Namespace       string
	RemoteClusterID string
	NodeName        string
	PodName         string
	ContainerName   string

	GatewayUID string

	Mode Mode

	ConcurrentContainersNames []string

	LeaderElection              bool
	LeaderElectionLeaseDuration time.Duration
	LeaderElectionRenewDeadline time.Duration
	LeaderElectionRetryPeriod   time.Duration

	MetricsAddress string
	ProbeAddr      string

	DisableKernelVersionCheck bool
	MinimumKernelVersion      kernelversion.KernelVersion
}

Options contains the options for the wireguard interface.

func NewOptions

func NewOptions() *Options

NewOptions returns a new Options struct.

Directories

Path Synopsis
Package concurrent contains the logic to manage same gateway replicas.
Package concurrent contains the logic to manage same gateway replicas.
Package connection menages the connection resource.
Package connection menages the connection resource.
conncheck
Package conncheck checks if a connection is alive.
Package conncheck checks if a connection is alive.
Package fabric implements the connection between gateways and the internal network.
Package fabric implements the connection between gateways and the internal network.
geneve
Package geneve provides a fabric gateway implementation for the Geneve protocol.
Package geneve provides a fabric gateway implementation for the Geneve protocol.
Package forge contains the utilities to forge gateway resources.
Package forge contains the utilities to forge gateway resources.
Package tunnel contains the implementation of the tunneling system used by the Liqo Gateway.
Package tunnel contains the implementation of the tunneling system used by the Liqo Gateway.
wireguard
Package wireguard contains the implementation of the wireguard tunnel.
Package wireguard contains the implementation of the wireguard tunnel.

Jump to

Keyboard shortcuts

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