firewall

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package firewall contains the controller that manages the firewall configuration.

Index

Constants

View Source
const (
	// FirewallCategoryTargetKey is the key used by the firewallconfiguration controller to reconcile only resources related to a group.
	FirewallCategoryTargetKey = "networking.liqo.io/firewall-category"
	// FirewallSubCategoryTargetKey is the key used by the firewallconfiguration controller to reconcile only resources related to a subgroup.
	FirewallSubCategoryTargetKey = "networking.liqo.io/firewall-subcategory"
	// FirewallUniqueTargetKey is the key used by the firewallconfiguration controller to reconcile only resources related to a single component.
	FirewallUniqueTargetKey = "networking.liqo.io/firewall-unique"
)

Variables

This section is empty.

Functions

func FromChainToRulesArray

func FromChainToRulesArray(chain *firewallapi.Chain) (rules []firewallutils.Rule)

FromChainToRulesArray converts a chain to an array of rules.

func NewFirewallWatchEventHandler

func NewFirewallWatchEventHandler(cl client.Client, labelsSets []labels.Set) handler.EventHandler

NewFirewallWatchEventHandler creates a new EventHandler.

func NewFirewallWatchSource

func NewFirewallWatchSource(src <-chan event.GenericEvent, eh handler.EventHandler) source.Source

NewFirewallWatchSource creates a new Source for the Firewall watcher.

Types

type FirewallConfigurationReconciler

type FirewallConfigurationReconciler struct {
	PodName       string
	NftConnection *nftables.Conn
	client.Client
	Scheme         *runtime.Scheme
	EventsRecorder record.EventRecorder
	// Labels used to filter the reconciled resources.
	LabelsSets []labels.Set
	// EnableFinalizer is used to enable the finalizer on the reconciled resources.
	EnableFinalizer bool
}

FirewallConfigurationReconciler manage Configuration lifecycle.

func NewFirewallConfigurationReconcilerWithFinalizer

func NewFirewallConfigurationReconcilerWithFinalizer(cl client.Client, s *runtime.Scheme, podname string,
	er record.EventRecorder, labelsSets []labels.Set) (*FirewallConfigurationReconciler, error)

NewFirewallConfigurationReconcilerWithFinalizer returns a new FirewallConfigurationReconciler that uses finalizer.

func NewFirewallConfigurationReconcilerWithoutFinalizer

func NewFirewallConfigurationReconcilerWithoutFinalizer(cl client.Client, s *runtime.Scheme, podname string,
	er record.EventRecorder, labelsSets []labels.Set) (*FirewallConfigurationReconciler, error)

NewFirewallConfigurationReconcilerWithoutFinalizer returns a new FirewallConfigurationReconciler that doesn't use finalizer.

func (*FirewallConfigurationReconciler) Reconcile

Reconcile manage FirewallConfigurations, applying nftables configuration.

func (*FirewallConfigurationReconciler) SetupWithManager

func (r *FirewallConfigurationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, enableNftMonitor bool) error

SetupWithManager register the FirewallConfigurationReconciler to the manager.

func (*FirewallConfigurationReconciler) UpdateStatus

UpdateStatus updates the status of the given FirewallConfiguration.

Directories

Path Synopsis
Package utils contains utility functions for firewalls.
Package utils contains utility functions for firewalls.

Jump to

Keyboard shortcuts

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