networkpolicy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "network-policies"

Name is the registry key for this scanner.

Variables

This section is empty.

Functions

func NewScanner

func NewScanner() scanner.Scanner

NewScanner returns a scanner that collects NetworkPolicy data from a cluster.

Types

type Data

type Data struct {
	// Count is the total number of network policies.
	Count int `json:"count"`
	// NamespacesWithPolicies is the number of namespaces that have at least one policy.
	NamespacesWithPolicies int `json:"namespaces_with_policies"`
	// NamespacesWithoutPolicies is the number of namespaces lacking any policy.
	NamespacesWithoutPolicies int `json:"namespaces_without_policies"`
	// Policies lists all network policies.
	Policies []PolicyInfo `json:"policies"`
}

Data holds network policy information for one cluster.

type PolicyInfo

type PolicyInfo struct {
	// Namespace is the namespace containing the policy.
	Namespace string `json:"namespace"`
	// Name is the policy name.
	Name string `json:"name"`
	// PolicyTypes lists the policy types (Ingress, Egress).
	PolicyTypes []string `json:"policy_types"`
	// IngressRuleCount is the number of ingress rules.
	IngressRuleCount int `json:"ingress_rule_count"`
	// EgressRuleCount is the number of egress rules.
	EgressRuleCount int `json:"egress_rule_count"`
}

PolicyInfo describes a single NetworkPolicy.

Jump to

Keyboard shortcuts

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