fabric

package
v0.11.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package fabric contains the logic to manage internal network fabric on each node.

Index

Constants

View Source
const (
	// FirewallCategoryTargetValue is the value used by the firewallconfiguration controller
	// to reconcile only resources related to netwok fabric.
	FirewallCategoryTargetValue = "fabric"
	// FirewallSubCategoryTargetAllNodesValue is the value used by the firewallconfiguration controller
	// to reconcile only resources related to netwok fabric on all nodes.
	FirewallSubCategoryTargetAllNodesValue = "all-nodes"
	// FirewallSubCategoryTargetSingleNodeValue is the value used by the firewallconfiguration controller
	// to reconcile only resources related to netwok fabric on a specific node.
	FirewallSubCategoryTargetSingleNodeValue = "single-node"
	// RouteCategoryTargetValue is the value used by the routecontroller to reconcile only resources related to network fabric.
	RouteCategoryTargetValue = "fabric"
)

Variables

View Source
var RequiredFlags = []FlagName{
	FlagNodeNameName,
}

RequiredFlags contains the list of the mandatory flags.

Functions

func ForgeFirewallTargetLabels

func ForgeFirewallTargetLabels() map[string]string

ForgeFirewallTargetLabels returns the labels used by the firewallconfiguration controller to reconcile only resources related to network fabric.

func ForgeFirewallTargetLabelsSingleNode

func ForgeFirewallTargetLabelsSingleNode(nodeName string) map[string]string

ForgeFirewallTargetLabelsSingleNode returns the labels used by the firewallconfiguration controller to reconcile only resources related to network fabric on a specific node.

func ForgeRouteTargetLabels

func ForgeRouteTargetLabels() map[string]string

ForgeRouteTargetLabels returns the labels used by the routecontroller to reconcile only resources related to network fabric.

func InitFlags

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

InitFlags initializes the flags for the wireguard tunnel.

func MarkFlagsRequired

func MarkFlagsRequired(cmd *cobra.Command) error

MarkFlagsRequired marks the flags as required.

Types

type FlagName

type FlagName string

FlagName is the type for the name of the flags.

const (
	// FlagNodeNameName is the name of the node where the pod is scheduled.
	FlagNodeNameName FlagName = "nodename"

	// 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"

	// FlagEnableARP is the flag to enable ARP.
	FlagEnableARP FlagName = "enable-arp"
)

func (FlagName) String

func (fn FlagName) String() string

type InternalFabricReconciler

type InternalFabricReconciler struct {
	client.Client
	Scheme         *runtime.Scheme
	EventsRecorder record.EventRecorder
	Options        *Options
}

InternalFabricReconciler manage internalfabric.

func NewInternalFabricReconciler

func NewInternalFabricReconciler(cl client.Client, s *runtime.Scheme,
	er record.EventRecorder, opts *Options) (*InternalFabricReconciler, error)

NewInternalFabricReconciler returns a new InternalFabricReconciler.

func (*InternalFabricReconciler) Reconcile

Reconcile manage InternalFabrics.

func (*InternalFabricReconciler) SetupWithManager

func (r *InternalFabricReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager register the InternalFabricReconciler to the manager.

type Options

type Options struct {
	NodeName string
	PodName  string

	MetricsAddress string
	ProbeAddr      string

	EnableARP bool
}

Options contains the options for the wireguard interface.

func NewOptions

func NewOptions() *Options

NewOptions returns a new Options struct.

Directories

Path Synopsis
Package sourcedetector contains the logic to detect the source IP used by nodes to contact pods.
Package sourcedetector contains the logic to detect the source IP used by nodes to contact pods.

Jump to

Keyboard shortcuts

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