Documentation
¶
Overview ¶
Package firewall contains the controller that manages the firewall configuration.
Index ¶
- Constants
- func FromChainToRulesArray(chain *firewallapi.Chain) (rules []firewallutils.Rule)
- func NewFirewallWatchEventHandler(cl client.Client, labelsSets []labels.Set) handler.EventHandler
- func NewFirewallWatchSource(src <-chan event.GenericEvent, eh handler.EventHandler) source.Source
- type FirewallConfigurationReconciler
- func NewFirewallConfigurationReconcilerWithFinalizer(cl client.Client, s *runtime.Scheme, podname string, er record.EventRecorder, ...) (*FirewallConfigurationReconciler, error)
- func NewFirewallConfigurationReconcilerWithoutFinalizer(cl client.Client, s *runtime.Scheme, podname string, er record.EventRecorder, ...) (*FirewallConfigurationReconciler, error)
- func (r *FirewallConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *FirewallConfigurationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, enableNftMonitor bool) error
- func (r *FirewallConfigurationReconciler) UpdateStatus(ctx context.Context, er record.EventRecorder, ...) error
Constants ¶
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 ¶
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 ¶
func (r *FirewallConfigurationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *FirewallConfigurationReconciler) UpdateStatus(ctx context.Context, er record.EventRecorder, fwcfg *networkingv1beta1.FirewallConfiguration, podname string, err error) error
UpdateStatus updates the status of the given FirewallConfiguration.