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 ¶
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.
Click to show internal directories.
Click to hide internal directories.