Skip to content

Commit 531fb92

Browse files
committed
chore: update build distro and go version
1 parent f67e83b commit 531fb92

File tree

8 files changed

+42
-29
lines changed

8 files changed

+42
-29
lines changed

.github/workflows/agent-ci.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ env:
3636
REGISTRY: ghcr.io
3737
IMAGE_NAME: ${{ github.repository }}
3838
PYTHON_VERSION: 3.13
39+
DEBIAN_VERSION: trixie
3940
jobs:
4041
fetch-distroless-versions:
4142
name: Fetch Latest Distroless Versions
@@ -172,9 +173,11 @@ jobs:
172173
echo "🏷️ Tags: ${TAGS}"
173174
export REGISTRY=${REGISTRY@L}
174175
export BUILD_ARGS="--push"
175-
export DISTROLESS_VERSION=${{ needs.fetch-distroless-versions.outputs.distroless-version }}
176-
export PYTHON_VERSION=${{ env.PYTHON_VERSION }}
177-
make docker-build-only agent_version=${AGENT_VERSION}
176+
make docker-build-only \
177+
agent_version=${AGENT_VERSION} \
178+
DISTROLESS_VERSION=${{ needs.fetch-distroless-versions.outputs.distroless-version }} \
179+
PYTHON_VERSION=${{ env.PYTHON_VERSION }} \
180+
DEBIAN_VERSION=${{ env.DEBIAN_VERSION }}
178181
cat metadata.json
179182
echo "digest=$(cat metadata.json | jq -r .\"containerimage.digest\")" >> $GITHUB_OUTPUT
180183
cat $GITHUB_OUTPUT
@@ -204,7 +207,7 @@ jobs:
204207
- name: Set up Go
205208
uses: actions/setup-go@v5
206209
with:
207-
go-version: '1.25.5'
210+
go-version: '1.25.6'
208211
cache-dependency-path: operator/go.sum
209212

210213
- name: Log in to the Container registry
@@ -226,8 +229,8 @@ jobs:
226229
id: cached-binaries
227230
uses: actions/cache/restore@v4
228231
with:
229-
key: 1.25.5-${{ runner.os }}-${{ runner.arch }}-bin-${{ hashFiles('operator/deps.mk') }}
230-
restore-keys: 1.25.5-${{ runner.os }}-${{ runner.arch }}-bin-
232+
key: 1.25.6-${{ runner.os }}-${{ runner.arch }}-bin-${{ hashFiles('operator/deps.mk') }}
233+
restore-keys: 1.25.6-${{ runner.os }}-${{ runner.arch }}-bin-
231234
path: |
232235
${{ github.workspace }}/operator/bin
233236
~/.cache/go-build
@@ -242,7 +245,7 @@ jobs:
242245
if: steps.cached-binaries.outputs.cache-hit != 'true'
243246
uses: actions/cache/save@v4
244247
with:
245-
key: 1.25.5-${{ runner.os }}-${{ runner.arch }}-bin-${{ hashFiles('operator/deps.mk') }}
248+
key: 1.25.6-${{ runner.os }}-${{ runner.arch }}-bin-${{ hashFiles('operator/deps.mk') }}
246249
path: |
247250
${{ github.workspace }}/operator/bin
248251
~/.cache/go-build

.github/workflows/cli-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
- cli/*
2424

2525
env:
26-
GO_VERSION: 1.25.5
26+
GO_VERSION: 1.25.6
2727

2828
jobs:
2929
release:

.github/workflows/operator-ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ on:
4141
env:
4242
REGISTRY: ghcr.io
4343
IMAGE_NAME: ${{ github.repository }}
44-
GO_VERSION: 1.25.5
44+
GO_VERSION: 1.25.6
45+
DEBIAN_VERSION: trixie
4546
PLATFORMS: linux/amd64,linux/arm64
4647

4748
jobs:
@@ -289,6 +290,7 @@ jobs:
289290
--build-arg GIT_SHA=${GIT_SHA} \
290291
--build-arg VERSION=${VERSION} \
291292
--build-arg GO_VERSION=${{ env.GO_VERSION }} \
293+
--build-arg DEBIAN_VERSION=${{ env.DEBIAN_VERSION }} \
292294
--build-arg DISTROLESS_VERSION=${{ needs.fetch-distroless-versions.outputs.go-version }} \
293295
--push \
294296
--platform ${{ matrix.platform }} \

agent/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ VENV := ./venv/bin/
1616
REGISTRY ?= ghcr.io
1717
AGENT_IMAGE ?= nvidia/skyhook/agent
1818
DOCKER_CMD ?= docker
19+
PYTHON_VERSION ?= 3.13
20+
DEBIAN_VERSION ?= trixie
21+
DISTROLESS_VERSION ?= 4.0.1
1922

2023
.PHONY: all
2124
all: venv test
@@ -65,6 +68,7 @@ docker-build-only:
6568
--build-arg GIT_SHA=$(GIT_SHA) \
6669
--build-arg DISTROLESS_VERSION=$(DISTROLESS_VERSION) \
6770
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
71+
--build-arg DEBIAN_VERSION=$(DEBIAN_VERSION) \
6872
--platform linux/amd64,linux/arm64 $(ACTUAL_TAGS) --metadata-file=metadata.json -f ../containers/agent.Dockerfile .
6973

7074
##@ Vendor

containers/agent.Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
# limitations under the License.
1616

1717
ARG PYTHON_VERSION
18+
ARG DEBIAN_VERSION
19+
ARG DISTROLESS_VERSION
1820

19-
FROM python:${PYTHON_VERSION}-bookworm AS builder
21+
FROM python:${PYTHON_VERSION}-${DEBIAN_VERSION} AS builder
2022

2123
ARG AGENT_VERSION
2224

@@ -38,15 +40,12 @@ RUN make build build_version=${AGENT_VERSION}
3840
# Install the wheel in the builder stage
3941
RUN python3 -m venv venv && ./venv/bin/pip install /code/skyhook-agent/dist/skyhook_agent*.whl
4042

41-
ARG DISTROLESS_VERSION \
42-
PYTHON_VERSION
43-
4443
FROM nvcr.io/nvidia/distroless/python:${PYTHON_VERSION}-v${DISTROLESS_VERSION}
4544

46-
ARG AGENT_VERSION \
47-
GIT_SHA \
48-
DISTROLESS_VERSION \
49-
PYTHON_VERSION
45+
ARG PYTHON_VERSION
46+
ARG DISTROLESS_VERSION
47+
ARG AGENT_VERSION
48+
ARG GIT_SHA
5049

5150
## https://github.com/opencontainers/image-spec/blob/main/annotations.md
5251
LABEL org.opencontainers.image.base.name="nvcr.io/nvidia/distroless/python:${PYTHON_VERSION}-v${DISTROLESS_VERSION}" \

containers/operator.Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@
1616

1717
# Build the manager binary
1818
ARG GO_VERSION
19+
ARG DEBIAN_VERSION
20+
ARG DISTROLESS_VERSION
1921

20-
FROM golang:${GO_VERSION}-bookworm as builder
22+
FROM golang:${GO_VERSION}-${DEBIAN_VERSION} as builder
2123

22-
ARG TARGETOS \
23-
TARGETARCH \
24-
VERSION \
25-
GIT_SHA \
26-
GO_VERSION
24+
ARG TARGETOS
25+
ARG TARGETARCH
26+
ARG VERSION
27+
ARG GIT_SHA
28+
ARG GO_VERSION
2729

2830
WORKDIR /workspace
2931

@@ -39,15 +41,14 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -mod=ven
3941
-X github.com/NVIDIA/skyhook/operator/internal/version.VERSION=${VERSION}" \
4042
-a -o manager cmd/manager/main.go
4143

42-
ARG DISTROLESS_VERSION
4344
# Use distroless as minimal base image to package the manager binary
4445
# Refer to https://github.com/GoogleContainerTools/distroless/tree/main/base for more
4546
FROM nvcr.io/nvidia/distroless/go:v${DISTROLESS_VERSION}
4647

48+
ARG DISTROLESS_VERSION
49+
ARG GO_VERSION
4750
ARG VERSION
48-
GIT_SHA \
49-
GO_VERSION \
50-
DISTROLESS_VERSION
51+
ARG GIT_SHA
5152

5253
## https://github.com/opencontainers/image-spec/blob/main/annotations.md
5354
LABEL org.opencontainers.image.base.name="nvcr.io/nvidia/distroless/go:v${DISTROLESS_VERSION}" \

operator/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ include deps.mk
1616

1717
## Version of the operator
1818
VERSION ?= $(GIT_TAG_LAST)
19-
GO_VERSION ?= 1.25.5
19+
GO_VERSION ?= 1.25.6
20+
DEBIAN_VERSION ?= trixie
21+
DISTROLESS_VERSION ?= 4.0.1
2022

2123
# Image URL to use all building/pushing image
2224
## TODO: update this to the correct image location
@@ -418,6 +420,8 @@ docker-build: ## Build docker image with the manager.
418420
--build-arg VERSION=$(VERSION) \
419421
--build-arg GIT_SHA=$(GIT_SHA) \
420422
--build-arg GO_VERSION=$(GO_VERSION) \
423+
--build-arg DEBIAN_VERSION=$(DEBIAN_VERSION) \
424+
--build-arg DISTROLESS_VERSION=$(DISTROLESS_VERSION) \
421425
-t $(IMG):testing .
422426

423427
##@ Deployment

operator/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/NVIDIA/skyhook/operator
22

3-
go 1.25.5
3+
go 1.25.6
44

55
require (
66
github.com/go-logr/logr v1.4.3

0 commit comments

Comments
 (0)