Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support_banp #403

Merged
merged 11 commits into from
Sep 9, 2024
Merged
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"banp",
"connlist",
"netpol",
"netpols",
Expand Down
1 change: 1 addition & 0 deletions docs/connlist_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Resource manifests considered for a connectivity analysis:
- workload resources (such as Kubernetes Pod / Deployment)
- Kubernetes NetworkPolicy
- Kubernetes AdminNetworkPolicy
- Kubernetes BaselineAdminNetworkPolicy
- Kubernetes Ingress
- Openshift Route

Expand Down
13 changes: 9 additions & 4 deletions pkg/internal/netpolerrors/netpol_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,21 @@ const (
UnmarshalErr = "cannot unmarshal array into Go value of type unstructured.detector"
UnableToDecodeErr = "unable to decode"

// errors constants from adminNetworkPolicy
// errors constants from adminNetworkPolicy and baselineAdminNetworkPolicy
SubjectErrTitle = "invalid Subject:"
SubjectFieldsErr = "Exactly one field must be set"
oneFieldSetErr = "exactly one field must be set"
OneFieldSetRulePeerErr = oneFieldSetErr + " in a rule peer"
OneFieldSetSubjectErr = oneFieldSetErr + " in a subject"
UnknownRuleActionErr = "unrecognized action"
ANPPortsError = "exactly one field must be set in an AdminNetworkPolicyPort"
ANPIngressRulePeersErr = "From field must be defined and contain at least one item"
ANPEgressRulePeersErr = "To field must be defined and contain at least one item"
ANPIngressRulePeersErr = "from field must be defined and contain at least one item"
ANPEgressRulePeersErr = "to field must be defined and contain at least one item"
ANPMissingNameErr = "missing name for an AdminNetworkPolicy object"
ExposureAnalysisDisabledWithANPs = "exposure analysis is disabled when there are admin-network-policies in the input resources"

BANPAlreadyExists = "only one baseline admin network policy may be provided in input resources; one already exists"
BANPNameAssertion = "only one baseline admin network policy with metadata.name=default can be created in the cluster"

UnknownCommandErr = "unknown command"

NilRepresentativePodSelectorsErr = "representative pod might not be generated if it does not have any representative selector"
Expand Down
Loading