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

change the amiName pattern to use minor version #307

Merged
merged 1 commit into from
Jul 31, 2019
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
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
PACKER_BINARY ?= packer
PACKER_VARIABLES := binary_bucket_name kubernetes_version kubernetes_build_date docker_version cni_version cni_plugin_version source_ami_id arch instance_type
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

K8S_VERSION_PARTS := $(subst ., ,$(kubernetes_version))
K8S_VERSION_MINOR := $(word 1,${K8S_VERSION_PARTS}).$(word 2,${K8S_VERSION_PARTS})

ami_name ?= amazon-eks-node-$(K8S_VERSION_MINOR)-v$(shell date +'%Y%m%d')
arch ?= x86_64
ifeq ($(arch), arm64)
instance_type ?= a1.large
else
instance_type ?= m4.large
endif

AWS_DEFAULT_REGION ?= us-west-2

T_RED := \e[0;31m
T_GREEN := \e[0;32m
T_YELLOW := \e[0;33m
Expand Down
2 changes: 1 addition & 1 deletion eks-worker-al2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"variables": {
"aws_region": "us-west-2",
"ami_name": "amazon-eks-node-{{user `kubernetes_version`}}-v{{isotime `20060102`}}",
"ami_name": null,
"creator": "{{env `USER`}}",
"encrypted": "false",
"kms_key_id": "",
Expand Down