diff --git a/Makefile b/Makefile index e2f5f75b2..edc36a766 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ PACKER_BINARY ?= packer -PACKER_VARIABLES := ami_name binary_bucket_name kubernetes_version kubernetes_build_date docker_version cni_version cni_plugin_version source_ami_id arch instance_type -AWS_DEFAULT_REGION ?= us-west-2 +PACKER_VARIABLES := aws_region ami_name binary_bucket_name binary_bucket_region kubernetes_version kubernetes_build_date docker_version cni_version cni_plugin_version source_ami_id source_ami_owners arch instance_type K8S_VERSION_PARTS := $(subst ., ,$(kubernetes_version)) K8S_VERSION_MINOR := $(word 1,${K8S_VERSION_PARTS}).$(word 2,${K8S_VERSION_PARTS}) +aws_region ?= $(AWS_DEFAULT_REGION) +binary_bucket_region ?= $(AWS_DEFAULT_REGION) ami_name ?= amazon-eks-node-$(K8S_VERSION_MINOR)-v$(shell date +'%Y%m%d') arch ?= x86_64 ifeq ($(arch), arm64) @@ -13,6 +14,10 @@ else instance_type ?= m4.large endif +ifeq ($(aws_region), cn-northwest-1) +source_ami_owners ?= 141808717104 +endif + T_RED := \e[0;31m T_GREEN := \e[0;32m T_YELLOW := \e[0;33m