Skip to content

Commit 9a71fe0

Browse files
initial build for aws-node-termination-handler (#57980)
testing is not an option here since the project constantly queries AWS Metadata Service and it keeps failing like this: ```bash 2025/06/30 12:02:52 WARN panic: There was a problem checking for spot ITNs: Unable to parse metadata response: Unable to get a response from IMDS: Get "http://169.254.169.254/latest/meta-data/spot/instance-action": dial tcp 169.254.169.254:80: connect: network is unreachable ``` Signed-off-by: Batuhan Apaydin <batuhan.apaydin@chainguard.dev>
1 parent d54d365 commit 9a71fe0

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

aws-node-termination-handler.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
package:
2+
name: aws-node-termination-handler
3+
version: "1.25.1"
4+
epoch: 0
5+
description: Gracefully handle EC2 instance shutdown within Kubernetes
6+
copyright:
7+
- license: Apache-2.0
8+
9+
pipeline:
10+
- uses: git-checkout
11+
with:
12+
expected-commit: 5641359c91288d0589c3c188309ce2771eb93838
13+
repository: https://github.com/aws/aws-node-termination-handler
14+
tag: v${{package.version}}
15+
16+
- uses: go/bump
17+
with:
18+
deps: |-
19+
golang.org/x/crypto@v0.35.0
20+
golang.org/x/oauth2@v0.27.0
21+
golang.org/x/net@v0.38.0
22+
23+
- uses: go/build
24+
with:
25+
ldflags: -X github.com/google/ko/pkg/commands.Version=${{package.version}}
26+
output: node-termination-handler
27+
packages: ./cmd/node-termination-handler.go
28+
tags: nthlinux
29+
30+
subpackages:
31+
- name: ${{package.name}}-compat
32+
description: Compatibility package for the ${{package.name}}
33+
pipeline:
34+
- runs: |
35+
mkdir -p ${{targets.contextdir}}/
36+
ln -sf /usr/bin/node-termination-handler ${{targets.contextdir}}/node-termination-handler
37+
test:
38+
pipeline:
39+
- runs: test "$(readlink /node-termination-handler)" = "/usr/bin/node-termination-handler"
40+
41+
update:
42+
enabled: true
43+
github:
44+
identifier: aws/aws-node-termination-handler
45+
strip-prefix: v
46+
47+
test:
48+
pipeline:
49+
- runs: |
50+
# The project queries the metadata service: https://github.com/aws/aws-node-termination-handler/blob/main/pkg/ec2metadata/ec2metadata.go#L356
51+
# so the tests will fail if the metadata service is not available like:
52+
# so testing is not an option here since the project constantly queries AWS Metadata Service and it keeps failing like this:
53+
# Get "http://169.254.169.254/latest/meta-data/spot/instance-action": dial tcp 169.254.169.254:80: connect: network is unreachable
54+
node-termination-handler -h

0 commit comments

Comments
 (0)