Skip to content

Commit

Permalink
[NPM Lite] Added DefaultDeny in PNI + MTPNC CRD's (#3265)
Browse files Browse the repository at this point in the history
* updated mtpnc crd and pni crd by adding default deny acl bool field

* updated pni crd

* updated mtpnc crd

* updated bool to boolean in crd

* updated schema/lowercased default dent

* fixing crd pipeline error

* tset

* revert

* resolved nits from pr

* resolved crg gen failing issue
  • Loading branch information
rejain456 authored Jan 6, 2025
1 parent cc28a65 commit 376fad8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ type MultitenantPodNetworkConfigStatus struct {
// InterfaceInfos describes all of the network container goal state for this Pod
// +kubebuilder:validation:Optional
InterfaceInfos []InterfaceInfo `json:"interfaceInfos,omitempty"`
// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
// +kubebuilder:validation:Optional
DefaultDenyACL bool `json:"defaultDenyACL"`
}

func init() {
Expand Down
4 changes: 4 additions & 0 deletions crd/multitenancy/api/v1alpha1/podnetworkinstance.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ type PodNetworkInstanceSpec struct {
// optional for now in case orchestrator uses the deprecated fields
// +kubebuilder:validation:Optional
PodNetworkConfigs []PodNetworkConfig `json:"podNetworkConfigs"`
// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
// +kubebuilder:default=false
// +kubebuilder:validation:Optional
DefaultDenyACL bool `json:"defaultDenyACL"`
}

// PodNetworkInstanceStatus defines the observed state of PodNetworkInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ spec:
description: MultitenantPodNetworkConfigStatus defines the observed state
of PodNetworkConfig
properties:
defaultDenyACL:
description: DefaultDenyACL bool indicates whether default deny policy
will be present on the pods upon pod creation
type: boolean
gatewayIP:
description: Deprecated - use InterfaceInfos
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ spec:
spec:
description: PodNetworkInstanceSpec defines the desired state of PodNetworkInstance
properties:
defaultDenyACL:
default: false
description: DefaultDenyACL bool indicates whether default deny policy
will be present on the pods upon pod creation
type: boolean
podIPReservationSize:
default: 0
description: Deprecated - use PodNetworks
Expand Down

0 comments on commit 376fad8

Please sign in to comment.