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

Fix build issue when using CIS hardened AMIs for base images #1964

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Added missing build target for v1.29; corrected issue with generate-v…
…ersion-info.sh when executed in hardened AMIs
dawidpichen authored and Dawid Pichen committed Jun 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 5d286d7675e73b11b4fe0c0fdd143f5de8f56e55
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ else ifeq ($(aws_region), us-gov-west-1)
endif

# default to the latest supported Kubernetes version
k8s=1.28
k8s=1.29

.PHONY: build
build: ## Build EKS Optimized AMI, default using AL2, use os_distro=al2023 for AL2023 AMI
@@ -121,6 +121,10 @@ k8s: validate ## Build default K8s version of EKS Optimized AMI
1.28: ## Build EKS Optimized AMI - K8s 1.28 - DEPRECATED: use the `k8s` variable instead
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.28)

.PHONY: 1.29
1.29: ## Build EKS Optimized AL2 AMI - K8s 1.28
$(MAKE) k8s $(shell hack/latest-binaries.sh 1.29)

.PHONY: lint-docs
lint-docs: ## Lint the docs
hack/lint-docs.sh
4 changes: 2 additions & 2 deletions templates/shared/provisioners/generate-version-info.sh
Original file line number Diff line number Diff line change
@@ -16,14 +16,14 @@ OUTPUT_FILE="$1"
sudo rpm --query --all --queryformat '\{"%{NAME}": "%{VERSION}-%{RELEASE}"\}\n' | jq --slurp --sort-keys 'add | {packages:(.)}' > "$OUTPUT_FILE"

# binaries
KUBELET_VERSION=$(kubelet --version | awk '{print $2}')
KUBELET_VERSION=$(sudo kubelet --version | awk '{print $2}')
if [ "$?" != 0 ]; then
echo "unable to get kubelet version"
exit 1
fi
echo $(jq ".binaries.kubelet = \"$KUBELET_VERSION\"" $OUTPUT_FILE) > $OUTPUT_FILE

CLI_VERSION=$(aws --version | awk '{print $1}' | cut -d '/' -f 2)
CLI_VERSION=$(sudo aws --version | awk '{print $1}' | cut -d '/' -f 2)
if [ "$?" != 0 ]; then
echo "unable to get aws cli version"
exit 1