Skip to content

Commit

Permalink
Prepare cwnp state
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Jan 23, 2024
1 parent 91d952a commit 18bbe78
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/v1/clusterwidenetworkpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,23 @@ type PolicySpec struct {

type FQDNState map[string][]IPSet

type PolicyDeploymentState string

const (
PolicyDeploymentStateDeployed = PolicyDeploymentState("deployed")
PolicyDeploymentStateIgnored = PolicyDeploymentState("ignored")
)

// PolicyStatus defines the observed state for CWNP resource
type PolicyStatus struct {
// FQDNState stores mapping from FQDN rules to nftables sets used for a firewall rule.
// Key is either MatchName or MatchPattern
// +optional
FQDNState FQDNState `json:"fqdn_state,omitempty"`

State PolicyDeploymentState `json:"state"`

Message string `json:"message,omitempty"`
}

// IngressRule describes a particular set of traffic that is allowed to the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ spec:
description: FQDNState stores mapping from FQDN rules to nftables
sets used for a firewall rule. Key is either MatchName or MatchPattern
type: object
message:
type: string
state:
type: string
required:
- state
type: object
type: object
served: true
Expand Down

0 comments on commit 18bbe78

Please sign in to comment.