Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCP-2001: updated builder image and makefile #15

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG BUILDER_GOLANG_VERSION
# Build the manager binary
FROM --platform=linux/amd64 gcr.io/spectro-images-public/golang:1.19-alpine as builder
FROM --platform=linux/amd64 gcr.io/spectro-images-public/golang:${BUILDER_GOLANG_VERSION}-alpine as builder

ARG HELM=./bin/helm-linux-amd64
ARG HELM_CHART=./bin/vcluster-0.13.0.tgz
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

.DEFAULT_GOAL:=help

BUILDER_GOLANG_VERSION ?= 1.21
BUILD_DATE:=$(shell date +%Y%m%d)
IMG_NAME ?= cluster-api-virtual-controller
IMG_URL ?= gcr.io/spectro-dev-public/release/cluster-api-virtual
IMG_TAG ?= v0.1.3-spectro-20221213
# IMG_URL ?= gcr.io/spectro-images-public/release/cluster-api-virtual/
IMG_URL ?= gcr.io/spectro-common-dev/${USER}/cluster-api-virtual
IMG_TAG ?= v0.1.3-spectro-${BUILD_DATE}
IMG ?= $(IMG_URL)/$(IMG_NAME):$(IMG_TAG)
BUILD_ARGS = --build-arg CRYPTO_LIB=${FIPS_ENABLE} --build-arg BUILDER_GOLANG_VERSION=${BUILDER_GOLANG_VERSION}

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.23
Expand Down Expand Up @@ -87,7 +91,7 @@ run: manifests generate fmt vet ## Run a controller from your host.

.PHONY: docker-build
docker-build: binaries ## Build docker image with the manager.
docker build -t ${IMG} .
docker build ${BUILD_ARGS} -t ${IMG} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand Down