Skip to content

Commit

Permalink
drop the DIST (ubi9) suffix in image tags
Browse files Browse the repository at this point in the history
Signed-off-by: Tariq Ibrahim <[email protected]>
  • Loading branch information
tariq1890 committed Sep 10, 2024
1 parent 4a7f9dc commit a4b6d42
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 61 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ jobs:
LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}-ubi9" >> $GITHUB_ENV
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
echo "VALIDATOR_VERSION=${COMMIT_SHORT_SHA}-ubi9" >> $GITHUB_ENV
echo "VALIDATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
echo "VALIDATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator/gpu-operator-validator" >> $GITHUB_ENV
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -289,9 +289,9 @@ jobs:
LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}-ubi9" >> $GITHUB_ENV
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
echo "VALIDATOR_VERSION=${COMMIT_SHORT_SHA}-ubi9" >> $GITHUB_ENV
echo "VALIDATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
echo "VALIDATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator/gpu-operator-validator" >> $GITHUB_ENV
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ build:gpu-operator-validator:
TF_VAR_additional_ingress_ip_ranges: '["216.228.112.0/26", "217.111.27.192/26"]'
# These should match the images generated by the deploy step.
# TODO: Should these use the staging release instead?
OPERATOR_VERSION: "${CI_COMMIT_SHORT_SHA}-${DIST}"
OPERATOR_VERSION: "${CI_COMMIT_SHORT_SHA}"
OPERATOR_IMAGE: "${CI_REGISTRY_IMAGE}"
VALIDATOR_VERSION: "${CI_COMMIT_SHORT_SHA}-${DIST}"
VALIDATOR_VERSION: "${CI_COMMIT_SHORT_SHA}"
VALIDATOR_IMAGE: "${CI_REGISTRY_IMAGE}/gpu-operator-validator"
GPU_PRODUCT_NAME: "Tesla-T4"
extends:
Expand Down
25 changes: 6 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,18 @@ include $(CURDIR)/versions.mk

MODULE := github.com/NVIDIA/gpu-operator
BUILDER_IMAGE ?= golang:$(GOLANG_VERSION)
DIST ?= ubi9

ifeq ($(IMAGE_NAME),)
REGISTRY ?= nvcr.io/nvidia/cloud-native
IMAGE_NAME := $(REGISTRY)/gpu-operator
endif

IMAGE_VERSION := $(VERSION)
IMAGE_TAG ?= $(IMAGE_VERSION)-$(DIST)
IMAGE_TAG ?= $(VERSION)
IMAGE = $(IMAGE_NAME):$(IMAGE_TAG)
BUILDIMAGE ?= $(IMAGE_NAME):$(IMAGE_TAG)-build

OUT_IMAGE_NAME ?= $(IMAGE_NAME)
OUT_IMAGE_VERSION ?= $(VERSION)
OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(DIST)
OUT_IMAGE_TAG = $(VERSION)
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)

# CHANNELS define the bundle channels used in the bundle.
Expand Down Expand Up @@ -78,9 +75,10 @@ all: gpu-operator
GOOS ?= linux
VERSION_PKG = github.com/NVIDIA/gpu-operator/internal/info

CLIENT_GEN = $(shell pwd)/bin/client-gen
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
KUSTOMIZE = $(shell pwd)/bin/kustomize
PWD = $(shell pwd)
CLIENT_GEN = $(PWD)/bin/client-gen
CONTROLLER_GEN = $(PWD)/bin/controller-gen
KUSTOMIZE = $(PWD)/bin/kustomize

# Build gpu-operator binary
gpu-operator:
Expand Down Expand Up @@ -280,17 +278,6 @@ $(ALL_TARGETS): %:
make -C $(SUBCOMPONENT) $(*)
else

# For the default push target we also push a short tag equal to the version.
# We skip this for the development release
DEVEL_RELEASE_IMAGE_VERSION ?= devel
ifneq ($(strip $(VERSION)),$(DEVEL_RELEASE_IMAGE_VERSION))
push-$(DEFAULT_PUSH_TARGET): push-short
endif

push-%: DIST = $(*)
push-short: DIST = $(DEFAULT_PUSH_TARGET)

build-%: DIST = $(*)
build-%: DOCKERFILE = $(CURDIR)/docker/Dockerfile

$(DISTRIBUTIONS): %: build-%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ metadata:
capabilities: Deep Insights
categories: AI/Machine Learning, OpenShift Optional
certified: "true"
containerImage: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest-ubi8
containerImage: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest
createdAt: "Thu Jul 27 13:57:56 PDT 2023"
description: Automate the management and monitoring of NVIDIA GPUs.
provider: NVIDIA
Expand All @@ -201,7 +201,7 @@ spec:
apiservicedefinitions: {}
relatedImages:
- name: gpu-operator-image
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest-ubi8
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest
- name: dcgm-exporter-image
image: nvcr.io/nvidia/k8s/dcgm-exporter@sha256:21f4c8b88716e8e6f732f9fb4c2efaef937c227491a8631c5e55036f80f39a4d
- name: dcgm-image
Expand All @@ -223,7 +223,7 @@ spec:
- name: init-container-image
image: nvcr.io/nvidia/cuda@sha256:9cb5831de5d058e0799c7bec24b5081293d7feff98ea793047deffd1a56b1889
- name: gpu-operator-validator-image
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator-validator:main-latest-ubi8
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator-validator:main-latest
- name: k8s-driver-manager-image
image: nvcr.io/nvidia/cloud-native/k8s-driver-manager@sha256:740abc3ff657545c10effd5354f09af525200ed9a1b7623f0c2e8c7bd9e4a4e2
- name: vfio-manager-image
Expand Down Expand Up @@ -818,7 +818,7 @@ spec:
- --leader-elect
- --leader-lease-renew-deadline
- "60s"
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest-ubi8
image: registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator:main-latest
command:
- gpu-operator
livenessProbe:
Expand Down Expand Up @@ -856,7 +856,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: "VALIDATOR_IMAGE"
value: "registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator-validator:main-latest-ubi8"
value: "registry.gitlab.com/nvidia/kubernetes/gpu-operator/staging/gpu-operator-validator:main-latest"
- name: "GFD_IMAGE"
value: "nvcr.io/nvidia/k8s-device-plugin@sha256:7ad2c9f71fe06f9f7745ac8635f46740fbdff4f11edd468addfab81afcdfa534"
- name: "CONTAINER_TOOLKIT_IMAGE"
Expand Down
5 changes: 0 additions & 5 deletions multi-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@ $(PUSH_TARGETS): push-%:
$(REGCTL) \
image copy \
$(IMAGE) $(OUT_IMAGE)

push-short:
$(REGCTL) \
image copy \
$(IMAGE) $(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)
5 changes: 0 additions & 5 deletions native-only.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,3 @@ $(PUSH_TARGETS): OUT_IMAGE ?= $(IMAGE_NAME):$(IMAGE_TAG)
$(PUSH_TARGETS): push-%:
$(DOCKER) tag "$(IMAGE_NAME):$(VERSION)-$(DEFAULT_PUSH_TARGET)" "$(OUT_IMAGE)"
$(DOCKER) push "$(OUT_IMAGE)"

push-short: OUT_IMAGE ?= $(IMAGE_NAME):$(VERSION)
push-short:
$(DOCKER) tag "$(IMAGE_NAME):$(VERSION)-$(DEFAULT_PUSH_TARGET)" "$(OUT_IMAGE)"
$(DOCKER) push "$(OUT_IMAGE)"
18 changes: 2 additions & 16 deletions validator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ endif

BUILD_DIR ?= ../

IMAGE_VERSION := $(VERSION)
IMAGE_TAG ?= $(IMAGE_VERSION)-$(DIST)
IMAGE_TAG ?= $(VERSION)
IMAGE = $(IMAGE_NAME):$(IMAGE_TAG)

OUT_IMAGE_NAME ?= $(IMAGE_NAME)
OUT_IMAGE_VERSION ?= $(VERSION)
OUT_IMAGE_TAG = $(OUT_IMAGE_VERSION)-$(DIST)
OUT_IMAGE_TAG = $(VERSION)
OUT_IMAGE = $(OUT_IMAGE_NAME):$(OUT_IMAGE_TAG)

##### Public rules #####
Expand All @@ -64,17 +62,6 @@ validator:
CGO_ENABLED=0 GOOS=$(GOOS) \
go build -ldflags "-s -w -X $(VERSION_PKG).gitCommit=$(GIT_COMMIT) -X $(VERSION_PKG).version=$(VERSION)" -o validator .

# For the default push target we also push a short tag equal to the version.
# We skip this for the development release
DEVEL_RELEASE_IMAGE_VERSION ?= devel
ifneq ($(strip $(VERSION)),$(DEVEL_RELEASE_IMAGE_VERSION))
push-$(DEFAULT_PUSH_TARGET): push-short
endif

push-%: DIST = $(*)
push-short: DIST = $(DEFAULT_PUSH_TARGET)

build-%: DIST = $(*)
build-%: DOCKERFILE = $(CURDIR)/Dockerfile

$(DISTRIBUTIONS): %: build-%:
Expand All @@ -97,4 +84,3 @@ $(BUILD_TARGETS): build-%:
docker-image: OUT_IMAGE ?= $(IMAGE_NAME):$(IMAGE_TAG)
docker-image: $(DEFAULT_PUSH_TARGET)
$(DOCKER) tag $(IMAGE_NAME):$(IMAGE_TAG) $(OUT_IMAGE)

5 changes: 0 additions & 5 deletions validator/multi-arch.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,3 @@ $(PUSH_TARGETS): push-%:
$(REGCTL) \
image copy \
$(IMAGE) $(OUT_IMAGE)

push-short:
$(REGCTL) \
image copy \
$(IMAGE) $(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)

0 comments on commit a4b6d42

Please sign in to comment.