Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FirewallController ¶
type FirewallController struct {
// contains filtered or unexported fields
}
FirewallController watches for changes of the k8s entities services and networkpolicies and constructs nftable rules for them.
func NewFirewallController ¶
func NewFirewallController(client k8s.Interface, logger *zap.SugaredLogger) *FirewallController
NewFirewallController creates a new FirewallController
func (*FirewallController) FetchAndAssemble ¶
func (f *FirewallController) FetchAndAssemble() (*FirewallRules, error)
FetchAndAssemble fetches resources from k8s and assembles firewall rules for them
type FirewallResources ¶
type FirewallResources struct {
NetworkPolicyList *networkingv1.NetworkPolicyList
ServiceList *corev1.ServiceList
}
FirewallResources holds the k8s entities that serve as input for the generation of firewall rules.
type FirewallRules ¶
FirewallRules hold the nftable rules that are generated from k8s entities.
func (*FirewallRules) HasChanged ¶
func (r *FirewallRules) HasChanged(oldRules *FirewallRules) bool
HasChanged checks whether new firewall rules have changed in comparison to the last run
func (*FirewallRules) Render ¶
func (r *FirewallRules) Render() (string, error)
Render renders the firewall rules to a string
Click to show internal directories.
Click to hide internal directories.