Skip to content

Commit b228903

Browse files
authored
chore: remove AL2 support (#2645)
AL2 support has been EOL for several months, remove it from the repo.
1 parent 0ab8428 commit b228903

File tree

93 files changed

+14
-5261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+14
-5261
lines changed

.github/actions/bot/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ class CICommand {
202202
// a map of file path prefixes to OS distros that are associated with the file paths
203203
// a value of "*" implies multiple OS distros are associated with the path, and we should just rely on the workflow's default
204204
osDistroPathPrefixHints = {
205-
"templates/al2/": "al2",
206205
"templates/al2023/": "al2023",
207206
"templates/shared/": "*",
208207
"nodeadm/": "al2023",

Makefile

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@ K8S_VERSION_MINOR := $(word 1,${K8S_VERSION_PARTS}).$(word 2,${K8S_VERSION_PARTS
1515
AMI_VARIANT ?= amazon-eks
1616
AMI_VERSION ?= v$(shell date '+%Y%m%d')
1717
aws_region ?= us-west-2
18-
os_distro ?= al2
1918
arch ?= x86_64
2019

20+
BUILD_TARGETS := build k8s validate
21+
22+
ifneq ($(filter $(BUILD_TARGETS),$(MAKECMDGOALS)),)
23+
ifndef os_distro
24+
$(error os_distro is required (e.g., os_distro=al2023))
25+
endif
26+
ifndef k8s
27+
$(error k8s is required (e.g., k8s=1.35))
28+
endif
29+
endif
30+
2131
ifeq ($(os_distro), al2023)
2232
AMI_VARIANT := $(AMI_VARIANT)-al2023
2333
endif
@@ -33,11 +43,6 @@ endif
3343

3444
ifdef enable_accelerator
3545
AMI_VARIANT := $(AMI_VARIANT)-$(enable_accelerator)
36-
37-
ifeq ($(os_distro), al2)
38-
enable_efa ?= true
39-
launch_block_device_mappings_volume_size ?= 10
40-
endif
4146
endif
4247

4348
ami_name ?= $(AMI_VARIANT)-node-$(K8S_VERSION_MINOR)-$(AMI_VERSION)
@@ -48,11 +53,8 @@ else ifneq ($(filter $(aws_region),us-gov-west-1 us-gov-east-1),)
4853
source_ami_owners ?= 045324592363
4954
endif
5055

51-
# default to the latest supported Kubernetes version
52-
k8s=1.28
53-
5456
.PHONY: build
55-
build: ## Build EKS Optimized AMI, default using AL2, use os_distro=al2023 for AL2023 AMI
57+
build: ## Build EKS Optimized AMI (requires os_distro=al2023)
5658
$(MAKE) k8s $(shell hack/latest-binaries.sh $(k8s) $(aws_region))
5759

5860
.PHONY: fmt
@@ -69,10 +71,6 @@ lint-code: ## Check the source files for syntax and format issues
6971
hack/shellcheck --format gcc --severity warning
7072
hack/lint-space-errors.sh
7173

72-
.PHONY: test
73-
test: ## run the test-harness
74-
templates/test/test-harness.sh
75-
7674
PACKER_BINARY ?= packer
7775
PACKER_TEMPLATE_DIR ?= templates/$(os_distro)
7876
PACKER_TEMPLATE_FILE ?= $(PACKER_TEMPLATE_DIR)/template.json
@@ -107,33 +105,6 @@ k8s: validate ## Build default K8s version of EKS Optimized AMI
107105
@echo "Building AMI [os_distro=$(os_distro) kubernetes_version=$(kubernetes_version) arch=$(arch) $(if $(enable_accelerator),enable_accelerator=$(enable_accelerator))]"
108106
$(PACKER_BINARY) build -timestamp-ui -color=false $(PACKER_ARGS) $(PACKER_TEMPLATE_FILE)
109107

110-
# DEPRECATION NOTICE: `make` targets for each Kubernetes minor version will not be added after 1.28
111-
# Use the `k8s` variable to specify a minor version instead
112-
113-
.PHONY: 1.23
114-
1.23: ## Build EKS Optimized AMI - K8s 1.23 - DEPRECATED: use the `k8s` variable instead
115-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.23 $(aws_region))
116-
117-
.PHONY: 1.24
118-
1.24: ## Build EKS Optimized AMI - K8s 1.24 - DEPRECATED: use the `k8s` variable instead
119-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.24 $(aws_region))
120-
121-
.PHONY: 1.25
122-
1.25: ## Build EKS Optimized AMI - K8s 1.25 - DEPRECATED: use the `k8s` variable instead
123-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.25 $(aws_region))
124-
125-
.PHONY: 1.26
126-
1.26: ## Build EKS Optimized AMI - K8s 1.26 - DEPRECATED: use the `k8s` variable instead
127-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.26 $(aws_region))
128-
129-
.PHONY: 1.27
130-
1.27: ## Build EKS Optimized AMI - K8s 1.27 - DEPRECATED: use the `k8s` variable instead
131-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.27 $(aws_region))
132-
133-
.PHONY: 1.28
134-
1.28: ## Build EKS Optimized AMI - K8s 1.28 - DEPRECATED: use the `k8s` variable instead
135-
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.28 $(aws_region))
136-
137108
.PHONY: lint-docs
138109
lint-docs: ## Lint the docs
139110
hack/lint-docs.sh

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ invoking Packer directly. You can initiate the build process by running the
3535
following command in the root of this repository:
3636

3737
```bash
38-
# build an AMI with the latest Kubernetes version and the default OS distro
39-
make
40-
41-
# build an AMI with a specific Kubernetes version and the default OS distro
42-
make k8s=1.29
43-
44-
# build an AMI with a specific Kubernetes version and a specific OS distro
38+
# build an AMI with a specific Kubernetes version
4539
make k8s=1.29 os_distro=al2023
4640

4741
# check default value and options in help doc

hack/generate-template-variable-doc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def update_doc(doc: str, template_path: str) -> str:
5151
new_doc = re.sub(table_pattern, "\n".join([boundary, *new_table_lines, boundary]), doc)
5252
return new_doc
5353

54-
for template in ['al2', 'al2023']:
54+
for template in ['al2023']:
5555
doc_file_name = f'../doc/usage/{template}.md'
5656
with open(doc_file_name) as doc_file:
5757
doc = doc_file.read()

templates/al2/provisioners/cleanup-additional-repos.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

templates/al2/provisioners/enable-fips.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

templates/al2/provisioners/install-additional-repos.sh

Lines changed: 0 additions & 36 deletions
This file was deleted.

templates/al2/provisioners/install-efa.sh

Lines changed: 0 additions & 52 deletions
This file was deleted.

templates/al2/provisioners/install-neuron-driver.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)