Skip to content

Commit 376fad8

Browse files
authored
[NPM Lite] Added DefaultDeny in PNI + MTPNC CRD's (#3265)
* 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
1 parent cc28a65 commit 376fad8

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

crd/multitenancy/api/v1alpha1/multitenantpodnetworkconfig.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ type MultitenantPodNetworkConfigStatus struct {
8585
// InterfaceInfos describes all of the network container goal state for this Pod
8686
// +kubebuilder:validation:Optional
8787
InterfaceInfos []InterfaceInfo `json:"interfaceInfos,omitempty"`
88+
// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
89+
// +kubebuilder:validation:Optional
90+
DefaultDenyACL bool `json:"defaultDenyACL"`
8891
}
8992

9093
func init() {

crd/multitenancy/api/v1alpha1/podnetworkinstance.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ type PodNetworkInstanceSpec struct {
5656
// optional for now in case orchestrator uses the deprecated fields
5757
// +kubebuilder:validation:Optional
5858
PodNetworkConfigs []PodNetworkConfig `json:"podNetworkConfigs"`
59+
// DefaultDenyACL bool indicates whether default deny policy will be present on the pods upon pod creation
60+
// +kubebuilder:default=false
61+
// +kubebuilder:validation:Optional
62+
DefaultDenyACL bool `json:"defaultDenyACL"`
5963
}
6064

6165
// PodNetworkInstanceStatus defines the observed state of PodNetworkInstance

crd/multitenancy/manifests/multitenancy.acn.azure.com_multitenantpodnetworkconfigs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ spec:
7272
description: MultitenantPodNetworkConfigStatus defines the observed state
7373
of PodNetworkConfig
7474
properties:
75+
defaultDenyACL:
76+
description: DefaultDenyACL bool indicates whether default deny policy
77+
will be present on the pods upon pod creation
78+
type: boolean
7579
gatewayIP:
7680
description: Deprecated - use InterfaceInfos
7781
type: string

crd/multitenancy/manifests/multitenancy.acn.azure.com_podnetworkinstances.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ spec:
5353
spec:
5454
description: PodNetworkInstanceSpec defines the desired state of PodNetworkInstance
5555
properties:
56+
defaultDenyACL:
57+
default: false
58+
description: DefaultDenyACL bool indicates whether default deny policy
59+
will be present on the pods upon pod creation
60+
type: boolean
5661
podIPReservationSize:
5762
default: 0
5863
description: Deprecated - use PodNetworks

0 commit comments

Comments
 (0)