Skip to content

Commit 2e1239a

Browse files
committed
Pull request kubernetes-sigs#1: DELIVERY-8202 pull upstream
Merge in DEL/aws-load-balancer-controller-fork from DELIVERY-8202_pull_upstream to main * commit '49805eac72ec533acdbc2580d6f57c68a9cad45c': update the default base image (kubernetes-sigs#3075) update recommended IAM policy template (kubernetes-sigs#3068) update to discovery.k8s.io/v1 (kubernetes-sigs#3072) validation ingress condition annotation in validation webhook (kubernetes-sigs#2735) Fix conciseLogger's incorrect call to variadic func (kubernetes-sigs#3066) Verify CRDs are up to date in merge check (kubernetes-sigs#3022) Refactor model builder test (kubernetes-sigs#3024)
2 parents cd94fdc + 49805ea commit 2e1239a

20 files changed

+2107
-3341
lines changed

.ko.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
defaultBaseImage: public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2022-07-27-1658910674.2
1+
defaultBaseImage: public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2023-02-22-1677092456.2
22
builds:
33
- env:
44
- CGO_ENABLED=0

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,17 @@ lint:
162162
echo "TODO"
163163

164164
.PHONY: quick-ci
165-
quick-ci: verify-versions verify-generate
165+
quick-ci: verify-versions verify-generate verify-crds
166166
echo "Done!"
167167

168168
.PHONY: verify-generate
169169
verify-generate:
170170
hack/verify-generate.sh
171171

172+
.PHONY: verify-crds
173+
verify-crds:
174+
hack/verify-crds.sh
175+
172176
.PHONY: verify-versions
173177
verify-versions:
174178
hack/verify-versions.sh

controllers/elbv2/eventhandlers/endpointslices.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/go-logr/logr"
77
"github.com/pkg/errors"
8-
discv1 "k8s.io/api/discovery/v1beta1"
8+
discv1 "k8s.io/api/discovery/v1"
99
"k8s.io/apimachinery/pkg/api/equality"
1010
"k8s.io/apimachinery/pkg/types"
1111
"k8s.io/client-go/util/workqueue"

controllers/elbv2/eventhandlers/endpointslices_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/golang/mock/gomock"
99
"github.com/google/go-cmp/cmp"
1010
"github.com/stretchr/testify/assert"
11-
discv1 "k8s.io/api/discovery/v1beta1"
11+
discv1 "k8s.io/api/discovery/v1"
1212
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1313
"k8s.io/apimachinery/pkg/types"
1414
"k8s.io/client-go/util/workqueue"

controllers/elbv2/targetgroupbinding_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/aws/aws-sdk-go/aws"
2525
"github.com/pkg/errors"
2626
corev1 "k8s.io/api/core/v1"
27-
discv1 "k8s.io/api/discovery/v1beta1"
27+
discv1 "k8s.io/api/discovery/v1"
2828
"k8s.io/client-go/tools/record"
2929
"k8s.io/client-go/util/workqueue"
3030
"sigs.k8s.io/aws-load-balancer-controller/controllers/elbv2/eventhandlers"

docs/install/iam_policy.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,28 @@
196196
}
197197
}
198198
},
199+
{
200+
"Effect": "Allow",
201+
"Action": [
202+
"elasticloadbalancing:AddTags"
203+
],
204+
"Resource": [
205+
"arn:aws:elasticloadbalancing:*:*:targetgroup/*/*",
206+
"arn:aws:elasticloadbalancing:*:*:loadbalancer/net/*/*",
207+
"arn:aws:elasticloadbalancing:*:*:loadbalancer/app/*/*"
208+
],
209+
"Condition": {
210+
"StringEquals": {
211+
"elasticloadbalancing:CreateAction": [
212+
"CreateTargetGroup",
213+
"CreateLoadBalancer"
214+
]
215+
},
216+
"Null": {
217+
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
218+
}
219+
}
220+
},
199221
{
200222
"Effect": "Allow",
201223
"Action": [

docs/install/iam_policy_cn.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,28 @@
177177
"arn:aws-cn:elasticloadbalancing:*:*:listener-rule/app/*/*/*"
178178
]
179179
},
180+
{
181+
"Effect": "Allow",
182+
"Action": [
183+
"elasticloadbalancing:AddTags"
184+
],
185+
"Resource": [
186+
"arn:aws-cn:elasticloadbalancing:*:*:targetgroup/*/*",
187+
"arn:aws-cn:elasticloadbalancing:*:*:loadbalancer/net/*/*",
188+
"arn:aws-cn:elasticloadbalancing:*:*:loadbalancer/app/*/*"
189+
],
190+
"Condition": {
191+
"StringEquals": {
192+
"elasticloadbalancing:CreateAction": [
193+
"CreateTargetGroup",
194+
"CreateLoadBalancer"
195+
]
196+
},
197+
"Null": {
198+
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
199+
}
200+
}
201+
},
180202
{
181203
"Effect": "Allow",
182204
"Action": [

docs/install/iam_policy_us-gov.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,28 @@
177177
"arn:aws-us-gov:elasticloadbalancing:*:*:listener-rule/app/*/*/*"
178178
]
179179
},
180+
{
181+
"Effect": "Allow",
182+
"Action": [
183+
"elasticloadbalancing:AddTags"
184+
],
185+
"Resource": [
186+
"arn:aws-us-gov:elasticloadbalancing:*:*:targetgroup/*/*",
187+
"arn:aws-us-gov:elasticloadbalancing:*:*:loadbalancer/net/*/*",
188+
"arn:aws-us-gov:elasticloadbalancing:*:*:loadbalancer/app/*/*"
189+
],
190+
"Condition": {
191+
"StringEquals": {
192+
"elasticloadbalancing:CreateAction": [
193+
"CreateTargetGroup",
194+
"CreateLoadBalancer"
195+
]
196+
},
197+
"Null": {
198+
"aws:RequestTag/elbv2.k8s.aws/cluster": "false"
199+
}
200+
}
201+
},
180202
{
181203
"Effect": "Allow",
182204
"Action": [

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.19
44

55
require (
66
github.com/aws/aws-sdk-go v1.44.184
7+
github.com/evanphx/json-patch v5.6.0+incompatible
78
github.com/gavv/httpexpect/v2 v2.9.0
89
github.com/go-logr/logr v1.2.3
910
github.com/golang/mock v1.6.0
@@ -23,6 +24,7 @@ require (
2324
k8s.io/cli-runtime v0.26.1
2425
k8s.io/client-go v0.26.1
2526
sigs.k8s.io/controller-runtime v0.14.1
27+
sigs.k8s.io/yaml v1.3.0
2628
)
2729

2830
require (
@@ -50,7 +52,6 @@ require (
5052
github.com/docker/go-metrics v0.0.1 // indirect
5153
github.com/docker/go-units v0.4.0 // indirect
5254
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
53-
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
5455
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
5556
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
5657
github.com/fatih/color v1.7.0 // indirect
@@ -160,5 +161,4 @@ require (
160161
sigs.k8s.io/kustomize/api v0.12.1 // indirect
161162
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
162163
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
163-
sigs.k8s.io/yaml v1.3.0 // indirect
164164
)

hack/verify-crds.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright 2023 The Kubernetes Authors.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -o errexit
18+
set -o nounset
19+
set -o pipefail
20+
21+
make crds
22+
23+
changed_files=$(git status --porcelain --untracked-files=no || true)
24+
if [ -n "${changed_files}" ]; then
25+
echo "Detected that CRD generation is needed; run 'make crds'"
26+
echo "changed files:"
27+
printf "%s\n" "${changed_files}"
28+
echo "git diff:"
29+
git --no-pager diff
30+
echo "To fix: run 'make crds'"
31+
exit 1
32+
fi

0 commit comments

Comments
 (0)