Skip to content

Commit 885b675

Browse files
authoredDec 7, 2023
Revert label commit and update golang to v1.21.5 (#60)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. Ensure you have added the unit tests for your changes. 2. Ensure you have included output of manual testing done in the Testing section. 3. Ensure number of lines of code for new or existing methods are within the reasonable limit. 4. Ensure your change works on existing clusters after upgrade. --> **What type of PR is this?** <!-- Add one of the following: bug cleanup documentation feature --> bug **Which issue does this PR fix**: #59 **What does this PR do / Why do we need it**: We revert a label improvement which can cause PE creation failure when using long name for its network policy. **If an issue # is not available please add steps to reproduce and the controller logs**: **Testing done on this change**: <!-- output of manual testing/integration tests results and also attach logs showing the fix being resolved --> **Automation added to e2e**: <!-- List the e2e tests you added as part of this PR. If no, create an issue with enhancement/testing label --> **Will this PR introduce any new dependencies?**: <!-- e.g. new K8s API --> **Will this break upgrades or downgrades. Has updating a running cluster been tested?**: **Does this PR introduce any user-facing change?**: <!-- If yes, a release note update is required: Enter your extended release note in the block below. If the PR requires additional actions from users switching to the new release, include the string "action required". --> ```release-note ``` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
2 parents cb8d2f8 + a42434f commit 885b675

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed
 

‎.github/workflows/pr-tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
uses: actions/checkout@v3
7272
- uses: actions/setup-go@v4
7373
with:
74-
go-version: '1.21.4'
74+
go-version: '1.21.5'
7575
cache-dependency-path: "**/go.sum"
7676
- name: Install `govulncheck`
7777
run: go install golang.org/x/vuln/cmd/govulncheck@latest

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ $(MOCKGEN): $(LOCALBIN)
173173
test -s $(MOCKGEN) || GOBIN=$(LOCALBIN) go install github.com/golang/mock/mockgen@v1.6.0
174174

175175
GOARCH=amd64
176-
BUILD_IMAGE=public.ecr.aws/docker/library/golang:1.21.4
176+
BUILD_IMAGE=public.ecr.aws/docker/library/golang:1.21.5
177177
BASE_IMAGE=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:latest.2
178178
GO_RUNNER_IMAGE=public.ecr.aws/eks-distro/kubernetes/go-runner:v0.15.0-eks-1-27-3
179179
.PHONY: docker-buildx

‎pkg/policyendpoints/manager.go

-7
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ import (
2323
"github.com/aws/amazon-network-policy-controller-k8s/pkg/resolvers"
2424
)
2525

26-
const (
27-
LabelKeyToParentPolicyName = "networking.k8s.io/parent-network-policy-name"
28-
)
29-
3026
type PolicyEndpointsManager interface {
3127
Reconcile(ctx context.Context, policy *networking.NetworkPolicy) error
3228
Cleanup(ctx context.Context, policy *networking.NetworkPolicy) error
@@ -193,9 +189,6 @@ func (m *policyEndpointsManager) newPolicyEndpoint(policy *networking.NetworkPol
193189
Controller: &isController,
194190
},
195191
},
196-
Labels: map[string]string{
197-
LabelKeyToParentPolicyName: policy.Name,
198-
},
199192
},
200193
Spec: policyinfo.PolicyEndpointSpec{
201194
PodSelector: &policy.Spec.PodSelector,

0 commit comments

Comments
 (0)
Failed to load comments.