Skip to content

Commit

Permalink
use eks base image
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal committed Nov 16, 2023
1 parent 2b97ad0 commit 15a3fe2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ HELM_OPTS ?= --set serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn=${K
SYSTEM_NAMESPACE ?= karpenter
KARPENTER_VERSION ?= $(shell git tag --sort=committerdate | tail -1)
KO_DOCKER_REPO ?= ${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/dev
KO_DEFAULTBASEIMAGE ?= public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base
GETTING_STARTED_SCRIPT_DIR = website/content/en/preview/getting-started/getting-started-with-karpenter/scripts

# Common Directories
Expand Down Expand Up @@ -144,7 +145,7 @@ setup: ## Sets up the IAM roles needed prior to deploying the karpenter-controll
CLUSTER_NAME=${CLUSTER_NAME} ./$(GETTING_STARTED_SCRIPT_DIR)/add-roles.sh $(KARPENTER_VERSION)

image: ## Build the Karpenter controller images using ko build
$(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KO_DOCKER_REPO)" ko build --bare github.com/aws/karpenter/cmd/controller))
$(eval CONTROLLER_IMG=$(shell $(WITH_GOFLAGS) KO_DOCKER_REPO="$(KO_DOCKER_REPO)" KO_DEFAULTBASEIMAGE=${KO_DEFAULTBASEIMAGE} ko build --bare github.com/aws/karpenter/cmd/controller))
$(eval IMG_REPOSITORY=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 1))
$(eval IMG_TAG=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 1 | cut -d ":" -f 2 -s))
$(eval IMG_DIGEST=$(shell echo $(CONTROLLER_IMG) | cut -d "@" -f 2))
Expand Down
3 changes: 2 additions & 1 deletion hack/release/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config(){

CURRENT_MAJOR_VERSION="0"
RELEASE_PLATFORM="--platform=linux/amd64,linux/arm64"
BASE_IMAGE="public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base"

MAIN_GITHUB_ACCOUNT="aws"
RELEASE_TYPE_STABLE="stable"
Expand Down Expand Up @@ -72,7 +73,7 @@ buildImages() {
RELEASE_REPO=$1
# Set the SOURCE_DATE_EPOCH and KO_DATA_DATE_EPOCH values for reproducable builds with timestamps
# https://ko.build/advanced/faq/
CONTROLLER_IMG=$(GOFLAGS=${GOFLAGS} SOURCE_DATE_EPOCH=$(git log -1 --format='%ct') KO_DATA_DATE_EPOCH=$(git log -1 --format='%ct') KO_DOCKER_REPO=${RELEASE_REPO} ko publish -B -t "${RELEASE_VERSION}" "${RELEASE_PLATFORM}" ./cmd/controller)
CONTROLLER_IMG=$(GOFLAGS=${GOFLAGS} SOURCE_DATE_EPOCH=$(git log -1 --format='%ct') KO_DATA_DATE_EPOCH=$(git log -1 --format='%ct') KO_DOCKER_REPO=${RELEASE_REPO} KO_DEFAULTBASEIMAGE=${BASE_IMAGE} ko publish -B -t "${RELEASE_VERSION}" "${RELEASE_PLATFORM}" ./cmd/controller)
HELM_CHART_VERSION=$(helmChartVersion "$RELEASE_VERSION")
IMG_REPOSITORY=$(echo "$CONTROLLER_IMG" | cut -d "@" -f 1 | cut -d ":" -f 1)
IMG_TAG=$(echo "$CONTROLLER_IMG" | cut -d "@" -f 1 | cut -d ":" -f 2 -s)
Expand Down

0 comments on commit 15a3fe2

Please sign in to comment.