Skip to content

Commit 8686d85

Browse files
author
Joseph Chen
committed
ANP global policies
1 parent a2ae649 commit 8686d85

File tree

13 files changed

+787
-48
lines changed

13 files changed

+787
-48
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Image URL to use all building/pushing image targets
3-
IMAGE ?= amazon/aws-network-policy-agent
3+
IMAGE ?= public.ecr.aws/q1l2n4k8/npa
44
VERSION ?= $(shell git describe --tags --always --dirty || echo "unknown")
55
IMAGE_NAME = $(IMAGE)$(IMAGE_ARCH_SUFFIX):$(VERSION)
66
GOLANG_VERSION ?= $(shell cat .go-version)

api/v1alpha1/policyendpoints_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ type Port struct {
4848

4949
// EndpointInfo defines the network endpoint information for the policy ingress/egress
5050
type EndpointInfo struct {
51+
// Action is the action to enforce on an IP/CIDR (Allow, Deny, Pass)
52+
Action string `json:"action"`
53+
5154
// CIDR is the network address(s) of the endpoint
5255
CIDR NetworkAddress `json:"cidr"`
5356

@@ -72,6 +75,15 @@ type PodEndpoint struct {
7275

7376
// PolicyEndpointSpec defines the desired state of PolicyEndpoint
7477
type PolicyEndpointSpec struct {
78+
// IsGlobal specifies whether the parent policy is an admin policy
79+
IsGlobal bool `json:"isGlobal"`
80+
81+
// Namespaces of the pod selector, will be empty for cluster wide
82+
Namespaces []string `json:"namespaces"`
83+
84+
// Priority of the policy, lower value is higher priority
85+
Priority int `json:"priority"`
86+
7587
// PodSelector is the podSelector from the policy resource
7688
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
7789

0 commit comments

Comments
 (0)