Skip to content

Commit e91b771

Browse files
committed
update to patch cves and merge dockerfile and makefile from master
1 parent c6c4c80 commit e91b771

File tree

5 files changed

+113
-107
lines changed

5 files changed

+113
-107
lines changed

Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
ARG BASE_IMAGE
22
ARG BUILD_IMAGE
3+
ARG GORUNNER_VERSION=public.ecr.aws/eks-distro/kubernetes/go-runner:v0.18.0-eks-1-34-latest
34
ARG ARCH
45
# Build the controller binary
5-
FROM $BUILD_IMAGE as builder
6+
FROM $BUILD_IMAGE AS builder
67

78
WORKDIR /workspace
89
ENV GOPROXY direct
@@ -32,10 +33,13 @@ RUN GIT_VERSION=$(git describe --tags --always) && \
3233
CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build \
3334
-ldflags="-X ${VERSION_PKG}.GitVersion=${GIT_VERSION} -X ${VERSION_PKG}.GitCommit=${GIT_COMMIT} -X ${VERSION_PKG}.BuildDate=${BUILD_DATE}" -a -o controller main.go
3435

36+
37+
FROM $GORUNNER_VERSION AS go-runner
38+
3539
FROM $BASE_IMAGE
3640

3741
WORKDIR /
38-
COPY --from=public.ecr.aws/eks-distro/kubernetes/go-runner:v0.18.0-eks-1-32-11 /go-runner /usr/local/bin/go-runner
42+
COPY --from=go-runner /go-runner /usr/local/bin/go-runner
3943
COPY --from=builder /workspace/controller .
4044

41-
ENTRYPOINT ["/controller"]
45+
ENTRYPOINT ["/controller"]

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ IMAGE ?= $(REPO):$(VERSION)
1414
BASE_IMAGE ?= public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:latest.2
1515
GOLANG_VERSION ?= $(shell cat .go-version)
1616
BUILD_IMAGE ?= public.ecr.aws/docker/library/golang:$(GOLANG_VERSION)
17+
GORUNNER_VERSION ?= public.ecr.aws/eks-distro/kubernetes/go-runner:v0.18.0-eks-1-34-latest
1718
GOARCH ?= amd64
1819
PLATFORM ?= linux/amd64
1920
USER_ROLE_ARN ?= arn:aws:iam::$(AWS_ACCOUNT):role/VPCResourceControllerRole
@@ -77,16 +78,16 @@ delete: ## Delete controller from ~/.kube/config
7778

7879
# Build the docker image with buildx
7980
docker-buildx: check-env test
80-
docker buildx build --platform=$(PLATFORM) -t $(IMAGE)-$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg $(GOARCH) --load .
81+
docker buildx build --platform=$(PLATFORM) -t $(IMAGE)-$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg GORUNNER_VERSION=$(GORUNNER_VERSION) --build-arg $(GOARCH) --load .
8182

8283
# Build the docker image
8384
docker-build: check-env test
84-
docker build --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg ARCH=$(GOARCH) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) . -t ${IMAGE}
85+
docker build --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg ARCH=$(GOARCH) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg GORUNNER_VERSION=$(GORUNNER_VERSION) . -t ${IMAGE}
8586

8687

8788
# Build the docker image with buildx and no tests
8889
docker-buildx-no-test:
89-
docker buildx build --platform=$(PLATFORM) -t $(IMAGE)_$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg $(GOARCH) --load .
90+
docker buildx build --platform=$(PLATFORM) -t $(IMAGE)_$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg GORUNNER_VERSION=$(GORUNNER_VERSION) --build-arg $(GOARCH) --load .
9091

9192
# Push the docker image
9293
docker-push: check-env
@@ -113,4 +114,4 @@ build-test-binaries:
113114

114115
apply-dependencies:
115116
bash ${MAKEFILE_PATH}/scripts/test/install-cert-manager.sh
116-
kubectl set env daemonset aws-node -n kube-system ENABLE_POD_ENI=true
117+
kubectl set env daemonset aws-node -n kube-system ENABLE_POD_ENI=true

go.mod

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
module github.com/aws/amazon-vpc-resource-controller-k8s
22

3-
go 1.24
3+
go 1.24.6
44

55
require (
6-
github.com/aws/amazon-vpc-cni-k8s v1.19.2
6+
github.com/aws/amazon-vpc-cni-k8s v1.19.4
77
github.com/aws/aws-sdk-go v1.55.6
8-
github.com/aws/aws-sdk-go-v2 v1.36.3
9-
github.com/aws/aws-sdk-go-v2/config v1.29.9
10-
github.com/aws/aws-sdk-go-v2/credentials v1.17.62
11-
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30
8+
github.com/aws/aws-sdk-go-v2 v1.37.1
9+
github.com/aws/aws-sdk-go-v2/config v1.30.2
10+
github.com/aws/aws-sdk-go-v2/credentials v1.18.2
11+
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.1
1212
github.com/aws/aws-sdk-go-v2/service/autoscaling v1.52.1
1313
github.com/aws/aws-sdk-go-v2/service/ec2 v1.207.1
14-
github.com/aws/aws-sdk-go-v2/service/sts v1.33.17
15-
github.com/aws/smithy-go v1.22.2
14+
github.com/aws/aws-sdk-go-v2/service/sts v1.35.1
15+
github.com/aws/smithy-go v1.22.5
1616
github.com/go-logr/logr v1.4.2
1717
github.com/go-logr/zapr v1.3.0
1818
github.com/golang/mock v1.6.0
@@ -26,30 +26,31 @@ require (
2626
github.com/stretchr/testify v1.10.0
2727
go.uber.org/zap v1.27.0
2828
golang.org/x/time v0.11.0
29-
gomodules.xyz/jsonpatch/v2 v2.4.0
30-
k8s.io/api v0.32.3
31-
k8s.io/apimachinery v0.32.3
32-
k8s.io/client-go v0.32.3
29+
gomodules.xyz/jsonpatch/v2 v2.5.0
30+
k8s.io/api v0.33.0
31+
k8s.io/apimachinery v0.33.0
32+
k8s.io/client-go v0.33.0
3333
sigs.k8s.io/controller-runtime v0.20.4
3434
)
3535

3636
require (
37-
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.34 // indirect
38-
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 // indirect
37+
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.1 // indirect
38+
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.1 // indirect
3939
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
40-
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 // indirect
41-
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 // indirect
42-
github.com/aws/aws-sdk-go-v2/service/sso v1.25.1 // indirect
43-
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.29.1 // indirect
40+
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect
41+
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.1 // indirect
42+
github.com/aws/aws-sdk-go-v2/service/sso v1.26.1 // indirect
43+
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.1 // indirect
4444
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
4545
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
4646
github.com/google/btree v1.1.3 // indirect
47-
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
48-
github.com/gorilla/websocket v1.5.0 // indirect
47+
github.com/google/gnostic-models v0.6.9 // indirect
48+
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
4949
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
5050
github.com/x448/float16 v0.8.4 // indirect
51-
golang.org/x/sync v0.12.0 // indirect
51+
golang.org/x/sync v0.13.0 // indirect
5252
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
53+
sigs.k8s.io/randfill v1.0.0 // indirect
5354
)
5455

5556
require (
@@ -63,9 +64,7 @@ require (
6364
github.com/go-openapi/jsonreference v0.20.2 // indirect
6465
github.com/go-openapi/swag v0.23.0 // indirect
6566
github.com/gogo/protobuf v1.3.2 // indirect
66-
github.com/golang/protobuf v1.5.4 // indirect
6767
github.com/google/go-cmp v0.7.0
68-
github.com/google/gofuzz v1.2.0 // indirect
6968
github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect
7069
github.com/josharian/intern v1.0.0 // indirect
7170
github.com/json-iterator/go v1.1.12 // indirect
@@ -76,24 +75,24 @@ require (
7675
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7776
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7877
github.com/prometheus/procfs v0.15.1 // indirect
79-
github.com/samber/lo v1.49.1
78+
github.com/samber/lo v1.51.0
8079
github.com/spf13/pflag v1.0.6 // indirect
8180
go.uber.org/multierr v1.11.0 // indirect
8281
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
83-
golang.org/x/net v0.38.0 // indirect
84-
golang.org/x/oauth2 v0.27.0 // indirect
85-
golang.org/x/sys v0.31.0 // indirect
86-
golang.org/x/term v0.30.0 // indirect
87-
golang.org/x/text v0.23.0 // indirect
88-
golang.org/x/tools v0.30.0 // indirect
82+
golang.org/x/net v0.39.0 // indirect
83+
golang.org/x/oauth2 v0.29.0 // indirect
84+
golang.org/x/sys v0.32.0 // indirect
85+
golang.org/x/term v0.31.0 // indirect
86+
golang.org/x/text v0.24.0 // indirect
87+
golang.org/x/tools v0.32.0 // indirect
8988
google.golang.org/protobuf v1.36.5 // indirect
9089
gopkg.in/inf.v0 v0.9.1 // indirect
9190
gopkg.in/yaml.v3 v3.0.1 // indirect
92-
k8s.io/apiextensions-apiserver v0.32.1 // indirect
91+
k8s.io/apiextensions-apiserver v0.32.2 // indirect
9392
k8s.io/klog/v2 v2.130.1 // indirect
94-
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
93+
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
9594
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
9695
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
97-
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
96+
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
9897
sigs.k8s.io/yaml v1.4.0 // indirect
9998
)

0 commit comments

Comments
 (0)