Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: aws/aws-node-termination-handler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.10.0
Choose a base ref
...
head repository: aws/aws-node-termination-handler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Nov 6, 2020

  1. Copy the full SHA
    f00d2c6 View commit details
  2. Minor fixes (#280)

    * remove aemm from sqs tests
    
    * align helm install instructs
    brycahta authored Nov 6, 2020
    Copy the full SHA
    feb2a7f View commit details

Commits on Nov 10, 2020

  1. Copy the full SHA
    6e2744e View commit details

Commits on Nov 12, 2020

  1. Autom8 release (#283)

    * add automated-release targets
    
    * automate eks-charts pr
    brycahta authored Nov 12, 2020
    Copy the full SHA
    973124d View commit details

Commits on Nov 18, 2020

  1. Copy the full SHA
    0d8f612 View commit details
  2. Copy the full SHA
    592a428 View commit details
  3. Allow the NTHManagedAsg tag to be configurable (#287)

    * Make the tag to check for on a managed ASG configurable
    
    * Fix the arguments print that occurs at program boot
    
    * Fix broken tests from missing constant
    
    * ManagedAsgTag needs a definition
    
    * Add managedAsgTag support to the Helm chart
    blakestoddard authored Nov 18, 2020
    Copy the full SHA
    7cac3a3 View commit details

Commits on Nov 19, 2020

  1. Copy the full SHA
    1fc1b23 View commit details

Commits on Nov 23, 2020

  1. Update Chart version (#298)

    brycahta authored Nov 23, 2020
    Copy the full SHA
    2f0146b View commit details

Commits on Nov 24, 2020

  1. fix misspelled termination in readme.md (#303)

    staying relevant on this repo with this readme fix 👩‍💻
    mattrandallbecker authored Nov 24, 2020
    Copy the full SHA
    9ec8655 View commit details

Commits on Nov 27, 2020

  1. Fix volume name of daemonsets (#300)

    Sungyoon Jeong authored Nov 27, 2020
    Copy the full SHA
    c06b9f4 View commit details

Commits on Nov 30, 2020

  1. add github actions workflow file (#299)

    * add github actions workflow file
    
    * update gh actions
    bwagner5 authored Nov 30, 2020
    Copy the full SHA
    5c61df1 View commit details
  2. Update automated release (#302)

    * fix eks-charts sync copy
    
    * update eks-chart sync jobs
    
    * add chart version checks
    brycahta authored Nov 30, 2020
    Copy the full SHA
    be56185 View commit details

Commits on Dec 9, 2020

  1. Copy the full SHA
    f1b0eb2 View commit details
  2. Update README.md (#311)

    * bump version number
    * align verbiage on Queue Processor mode
    brycahta authored Dec 9, 2020
    Copy the full SHA
    363674f View commit details

Commits on Dec 10, 2020

  1. 🐛 fixing crashes on State-change events (#313)

    NTH crashes often from "EC2 Instance State-change Notification" events.
    
    The underlying issue was that an empty parsed NodeName derived from PrivateDnsName was forwarded unverified, creating cascading problems.
    
    This solves the root cause, that "EC2 Instance State-change Notification" can arrive at a time where the instance is in shutting-down, terminated or any other not-online situation where the PrivateDnsName metadata is empty!
    
    Instead of just ignoring these errors this implementation gets and decides based on the state of the instance message if it is an error to fail or to ignore.
    Therefor such messages are dropped in above situation because they are useless.
    universam1 authored Dec 10, 2020
    Copy the full SHA
    9f87a47 View commit details
  2. Copy the full SHA
    96fbc5d View commit details
  3. Copy the full SHA
    58d4532 View commit details

Commits on Dec 11, 2020

  1. Copy the full SHA
    7712fd8 View commit details
  2. Copy the full SHA
    2c80a00 View commit details

Commits on Dec 14, 2020

  1. Copy the full SHA
    5b977b0 View commit details
  2. Copy the full SHA
    7ec2ce5 View commit details

Commits on Dec 15, 2020

  1. should use dockerhub_token (#324)

    * should use dockerhub_token
    
    * Update Makefile
    bwagner5 authored Dec 15, 2020
    Copy the full SHA
    7f33a27 View commit details

Commits on Dec 16, 2020

  1. publish images to ecr public repo (#325)

    * publish images to ecr public repo
    
    * add ecr-public-login script
    bwagner5 authored Dec 16, 2020
    Copy the full SHA
    30eff87 View commit details

Commits on Dec 17, 2020

  1. 🥑🤖 v1.11.2 release prep (#326)

    * 🥑🤖 v1.11.2 release prep 🤖🥑
    
    * update chart version
    bwagner5 authored Dec 17, 2020
    Copy the full SHA
    8433cd9 View commit details
  2. Copy the full SHA
    fe69187 View commit details

Commits on Dec 18, 2020

  1. add script to draft release notes (#327)

    * add script to draft release notes
    
    * fix shellcheck warns
    bwagner5 authored Dec 18, 2020
    Copy the full SHA
    c02c16d View commit details
  2. Copy the full SHA
    01447cd View commit details
  3. Copy the full SHA
    a85c4fd View commit details

Commits on Dec 23, 2020

  1. Copy the full SHA
    1319288 View commit details

Commits on Dec 28, 2020

  1. multithreaded event processor (#317)

    This replaces the single process execution of events to parallel processing, solving the issue that happens when NTH is busy / blocked (retrying to evict) and eventually will miss to process events for other nodes going down the same time time.
    
    Example:
    3 nodes roll at a time because of batchSize or spot interruption.
    A deployment has a pdb limit of maxUnavailable of 1 - that will block NTH in a eviction retry loop and it will miss the third node eviction.
    
    The amount of workers are capped to prevent a memory runnaway
    universam1 authored Dec 28, 2020
    Copy the full SHA
    d8460d2 View commit details

Commits on Jan 4, 2021

  1. Bump versions (#334)

    brycahta authored Jan 4, 2021
    Copy the full SHA
    1a4bccd View commit details
  2. Copy the full SHA
    a116681 View commit details

Commits on Jan 5, 2021

  1. Copy the full SHA
    dd15f8e View commit details
  2. ran go mod tidy (#337)

    bwagner5 authored Jan 5, 2021
    Copy the full SHA
    a866c48 View commit details
  3. remove cla (#338)

    bwagner5 authored Jan 5, 2021
    Copy the full SHA
    3ee1742 View commit details
  4. Copy the full SHA
    a86b186 View commit details
  5. Update Chart.yaml (#341)

    brycahta authored Jan 5, 2021
    Copy the full SHA
    7f26c6c View commit details
  6. Update README.md (#342)

    One day this will be automated
    brycahta authored Jan 5, 2021
    Copy the full SHA
    2fc3b75 View commit details

Commits on Jan 7, 2021

  1. fix release prep for gh actions (#343)

    * fix release prep for gh actions
    
    * increment AEMM to latest ecr image
    brycahta authored Jan 7, 2021
    Copy the full SHA
    e7fab60 View commit details

Commits on Jan 12, 2021

  1. Copy the full SHA
    e0260bd View commit details

Commits on Jan 14, 2021

  1. Copy the full SHA
    8b6d843 View commit details
  2. Copy the full SHA
    23b97f4 View commit details

Commits on Feb 12, 2021

  1. Update stale.yml (#362)

    * Update stale.yml
    
    Suggested changes for stale bot to include issues with pull requests
    
    * Update stale.yml
    
    * Update stale.yml
    jillmon authored Feb 12, 2021
    Copy the full SHA
    8ce2b01 View commit details
  2. Copy the full SHA
    fbc3f70 View commit details

Commits on Feb 17, 2021

  1. Copy the full SHA
    1050b82 View commit details

Commits on Feb 18, 2021

  1. Update stale.yml

    jillmon authored Feb 18, 2021
    Copy the full SHA
    e14d45f View commit details
  2. Sqs deletion issue 360 (#364)

    * Refactor sqs message handling
    
    Process all messages received one at a time
    
    * Update tests for error handling
    
    The existing tests all assumed that errors should be returned from Monitor() if something fails.  Now those are logged and no event is generated.
    
    Refactor tests to remove go functions and use a channel with non-zero capacity to buffer generated events.
    
    * Return error if no messages can be processed
    
    If none of the messages received from SQS can be processed, return an error.  This will allow the NTH to detect repeated issues processing the queue.
    azenk authored Feb 18, 2021
    Copy the full SHA
    f718727 View commit details

Commits on Feb 19, 2021

  1. Copy the full SHA
    9d7d451 View commit details
  2. Update README.md (#370)

    bwagner5 authored Feb 19, 2021
    Copy the full SHA
    60494ab View commit details
Showing with 12,164 additions and 4,432 deletions.
  1. +29 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +17 −0 .github/ISSUE_TEMPLATE/feature_request.md
  3. +7 −2 .github/PULL_REQUEST_TEMPLATE.md
  4. +13 −0 .github/dependabot.yml
  5. +0 −60 .github/stale.yml
  6. +214 −0 .github/workflows/build-and-test.yaml
  7. +97 −0 .github/workflows/release.yaml
  8. +49 −0 .github/workflows/stale.yml
  9. +1 −0 .gitignore
  10. +0 −78 .travis.yml
  11. +23 −10 BUILD.md
  12. +4 −0 CODEOWNERS
  13. +0 −1 CONTRIBUTING.md
  14. +9 −8 Dockerfile
  15. +2 −2 Dockerfile.windows
  16. +133 −31 Makefile
  17. +408 −121 README.md
  18. +0 −901 THIRD_PARTY_LICENSES
  19. +108 −0 THIRD_PARTY_LICENSES.md
  20. +193 −98 cmd/node-termination-handler.go
  21. +1 −0 config/helm/aws-node-termination-handler/.helmignore
  22. +15 −12 config/helm/aws-node-termination-handler/Chart.yaml
  23. +161 −127 config/helm/aws-node-termination-handler/README.md
  24. +5 −0 config/helm/aws-node-termination-handler/example-values-imds-linux.yaml
  25. +5 −0 config/helm/aws-node-termination-handler/example-values-imds-windows.yaml
  26. +13 −0 config/helm/aws-node-termination-handler/example-values-queue.yaml
  27. +8 −3 config/helm/aws-node-termination-handler/templates/NOTES.txt
  28. +54 −34 config/helm/aws-node-termination-handler/templates/_helpers.tpl
  29. +14 −0 config/helm/aws-node-termination-handler/templates/clusterrole.yaml
  30. +9 −5 config/helm/aws-node-termination-handler/templates/clusterrolebinding.yaml
  31. +184 −164 config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml
  32. +180 −140 config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml
  33. +195 −139 config/helm/aws-node-termination-handler/templates/deployment.yaml
  34. +14 −0 config/helm/aws-node-termination-handler/templates/pdb.yaml
  35. +18 −14 config/helm/aws-node-termination-handler/templates/podmonitor.yaml
  36. +20 −7 config/helm/aws-node-termination-handler/templates/psp.yaml
  37. +18 −0 config/helm/aws-node-termination-handler/templates/service.yaml
  38. +5 −5 config/helm/aws-node-termination-handler/templates/serviceaccount.yaml
  39. +29 −0 config/helm/aws-node-termination-handler/templates/servicemonitor.yaml
  40. +0 −175 config/helm/aws-node-termination-handler/test.yaml
  41. +230 −102 config/helm/aws-node-termination-handler/values.yaml
  42. +1 −2 config/helm/localstack/templates/deployment.yaml
  43. +1 −1 config/helm/localstack/templates/psp.yaml
  44. +2 −2 config/helm/localstack/values.yaml
  45. +1 −1 config/helm/squid/templates/psp.yaml
  46. +1 −2 config/helm/webhook-test-proxy/templates/daemonset.yaml
  47. +1 −1 config/helm/webhook-test-proxy/templates/psp.yaml
  48. +1 −2 config/helm/webhook-test-proxy/templates/regular-pod-test.yaml
  49. +6 −6 docs/aemm_interruption_testing.md
  50. +85 −0 docs/cfn-template.yaml
  51. +81 −0 docs/kubernetes_events.md
  52. +105 −13 go.mod
  53. +302 −337 go.sum
  54. +222 −72 pkg/config/config.go
  55. +8 −8 pkg/config/config_internal_test.go
  56. +93 −64 pkg/config/config_test.go
  57. +98 −0 pkg/ec2helper/ec2helper.go
  58. +154 −0 pkg/ec2helper/ec2helper_test.go
  59. +75 −35 pkg/ec2metadata/ec2metadata.go
  60. +7 −4 pkg/ec2metadata/ec2metadata_internal_test.go
  61. +197 −33 pkg/ec2metadata/ec2metadata_test.go
  62. +155 −0 pkg/interruptionevent/asg/launch/handler.go
  63. +169 −0 pkg/interruptionevent/draincordon/handler.go
  64. +76 −0 pkg/interruptionevent/internal/common/handler.go
  65. +66 −9 pkg/interruptioneventstore/interruption-event-store.go
  66. +11 −11 pkg/interruptioneventstore/interruption-event-store_test.go
  67. +69 −0 pkg/logging/routing-integration_test.go
  68. +36 −0 pkg/logging/routing.go
  69. +100 −0 pkg/logging/routing_test.go
  70. +91 −0 pkg/logging/versioned.go
  71. +103 −0 pkg/monitor/asglifecycle/asg-lifecycle-monitor.go
  72. +99 −0 pkg/monitor/asglifecycle/asg-lifecycle-monitor_internal_test.go
  73. +125 −0 pkg/monitor/asglifecycle/asg-lifecycle-monitor_test.go
  74. +11 −9 pkg/monitor/rebalancerecommendation/rebalance-recommendation-monitor.go
  75. +4 −3 pkg/monitor/rebalancerecommendation/rebalance-recommendation-monitor_internal_test.go
  76. +6 −3 pkg/monitor/rebalancerecommendation/rebalance-recommendation-monitor_test.go
  77. +16 −12 pkg/monitor/scheduledevent/scheduled-event-monitor.go
  78. +25 −31 pkg/monitor/scheduledevent/scheduled-event-monitor_internal_test.go
  79. +21 −10 pkg/monitor/scheduledevent/scheduled-event-monitor_test.go
  80. +11 −9 pkg/monitor/spotitn/spot-itn-monitor.go
  81. +4 −3 pkg/monitor/spotitn/spot-itn-monitor_internal_test.go
  82. +8 −5 pkg/monitor/spotitn/spot-itn-monitor_test.go
  83. +218 −37 pkg/monitor/sqsevent/asg-lifecycle-event.go
  84. +19 −14 pkg/monitor/sqsevent/ec2-state-change-event.go
  85. +18 −14 pkg/monitor/sqsevent/rebalance-recommendation-event.go
  86. +126 −0 pkg/monitor/sqsevent/scheduled-change-event.go
  87. +19 −15 pkg/monitor/sqsevent/spot-itn-event.go
  88. +313 −100 pkg/monitor/sqsevent/sqs-monitor.go
  89. +143 −52 pkg/monitor/sqsevent/sqs-monitor_internal_test.go
  90. +638 −166 pkg/monitor/sqsevent/sqs-monitor_test.go
  91. +49 −0 pkg/monitor/sqsevent/sqs-retryer.go
  92. +116 −0 pkg/monitor/sqsevent/sqs-retryer_test.go
  93. +38 −12 pkg/monitor/types.go
  94. +1 −1 pkg/monitor/types_test.go
  95. +384 −76 pkg/node/node.go
  96. +58 −59 pkg/node/node_internal_test.go
  97. +322 −95 pkg/node/node_test.go
  98. +260 −0 pkg/observability/k8s-events.go
  99. +157 −45 pkg/observability/opentelemetry.go
  100. +338 −0 pkg/observability/opentelemetry_test.go
  101. +45 −0 pkg/observability/probes.go
  102. +30 −0 pkg/observability/probes_test.go
  103. +35 −6 pkg/test/aws-mocks.go
  104. +10 −0 pkg/test/helpers.go
  105. +2 −2 pkg/uptime/common.go
  106. +5 −4 pkg/uptime/common_test.go
  107. +23 −17 pkg/webhook/webhook.go
  108. +13 −9 pkg/webhook/webhook_test.go
  109. +4 −9 scripts/build-binaries
  110. +28 −18 scripts/build-docker-images
  111. +150 −0 scripts/create-local-tag-for-release
  112. +19 −0 scripts/ecr-public-login
  113. +5 −0 scripts/ecr-template-for-helm-chart.json
  114. +44 −25 scripts/generate-k8s-yaml
  115. +20 −0 scripts/helm-login
  116. +49 −0 scripts/install-amazon-ecr-credential-helper
  117. +341 −0 scripts/prepare-for-release
  118. +20 −3 scripts/push-docker-images
  119. +51 −0 scripts/push-helm-chart
  120. +75 −0 scripts/retag-docker-images
  121. +16 −0 scripts/sync-catalog-information-for-helm-chart
  122. +0 −31 scripts/sync-readme-to-dockerhub
  123. +32 −0 scripts/sync-readme-to-ecr-public
  124. +22 −9 scripts/upload-resources-to-github
  125. +125 −0 scripts/upload-resources-to-github-windows.ps1
  126. +5 −0 templates/third-party-licenses.tmpl
  127. +4 −4 test/README.md
  128. +509 −0 test/e2e/asg-launch-lifecycle-sqs-test
  129. +138 −0 test/e2e/asg-lifecycle-imds-test
  130. +228 −0 test/e2e/asg-lifecycle-sqs-heartbeat-test
  131. +16 −33 test/e2e/asg-lifecycle-sqs-test
  132. +10 −8 test/e2e/cordon-only-test
  133. +16 −32 test/e2e/ec2-state-change-sqs-test
  134. +125 −0 test/e2e/emit-events-test
  135. +11 −11 test/e2e/imds-v2-test
  136. +19 −18 test/e2e/maintenance-event-cancellation-test
  137. +11 −12 test/e2e/maintenance-event-dry-run-test
  138. +20 −19 test/e2e/maintenance-event-reboot-test
  139. +14 −13 test/e2e/maintenance-event-test
  140. +249 −0 test/e2e/prometheus-metrics-sqs-test
  141. +84 −83 test/e2e/prometheus-metrics-test
  142. +163 −0 test/e2e/rebalance-recommendation-drain-test
  143. +139 −0 test/e2e/rebalance-recommendation-dry-run-test
  144. +166 −0 test/e2e/rebalance-recommendation-sqs-node-not-found-test
  145. +25 −89 test/e2e/rebalance-recommendation-sqs-test
  146. +10 −11 test/e2e/rebalance-recommendation-test
  147. +214 −0 test/e2e/scheduled-change-event-sqs-test
  148. +11 −11 test/e2e/spot-interruption-dry-run-test
  149. +14 −31 test/e2e/spot-interruption-sqs-test
  150. +35 −17 test/e2e/spot-interruption-test
  151. +190 −0 test/e2e/spot-interruption-test-events-on
  152. +15 −14 test/e2e/spot-interruption-test-host-networking-off
  153. +24 −25 test/e2e/webhook-http-proxy-test
  154. +12 −12 test/e2e/webhook-secret-test
  155. +38 −31 test/e2e/webhook-test
  156. +5 −2 test/eks-cluster-test/cluster-spec.yaml
  157. +3 −3 test/eks-cluster-test/provision-cluster
  158. +5 −6 test/eks-cluster-test/run-test
  159. +0 −12 test/go-report-card-test/Dockerfile
  160. +0 −29 test/go-report-card-test/run-report-card-test.sh
  161. +0 −48 test/helm-sync-test/run-helm-sync-test
  162. +20 −22 test/helm/helm-lint
  163. +33 −0 test/helm/validate-chart-versions
  164. +3 −3 test/k8s-compatibility-test/run-k8s-compatibility-test.sh
  165. +27 −17 test/k8s-local-cluster-test/provision-cluster
  166. +32 −11 test/k8s-local-cluster-test/run-test
  167. +0 −9 test/license-test/Dockerfile
  168. +0 −13 test/license-test/gen-license-report.sh
  169. +0 −16 test/license-test/license-config.hcl
  170. +0 −12 test/license-test/run-license-test.sh
  171. +1 −1 test/readme-test/run-readme-spellcheck
  172. +2 −2 test/readme-test/spellcheck-Dockerfile
  173. +1 −1 test/shellcheck/run-shellcheck
  174. +2 −2 test/webhook-test-proxy/Dockerfile
  175. +2 −2 test/webhook-test-proxy/Dockerfile.windows
  176. 0 test/webhook-test-proxy/{THIRD_PARTY_LICENSES → THIRD_PARTY_LICENSES.md}
  177. +0 −1 test/webhook-test-proxy/cmd/webhook-test-proxy.go
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A concise description of what the bug is.

**Steps to reproduce**
A step-by-step description on how to reproduce the problem.

**Expected outcome**
A concise description of what you expected to happen.

**Application Logs**
The log output when experiencing the issue.


**Environment**

* NTH App Version:
* NTH Mode (IMDS/Queue processor):
* OS/Arch:
* Kubernetes version:
* Installation method:
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest a feature/enhancement for this project
title: ''
labels: enhancement
assignees: ''

---

**Describe the feature**
A concise description of the feature and desired behavior.

**Is the feature request related to a problem?**
A description of what the problem is. For example: I'm frustrated when [...]

**Describe alternatives you've considered**
A description of any alternative solutions or features you've considered.
9 changes: 7 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Issue #, if available:
**Issue #, if available:**

**Description of changes:**

**How you tested your changes:**
Environment (Linux / Windows):
Kubernetes Version:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "gomod"
allow:
- dependency-name: "github.com/aws/aws-sdk-go"
- dependency-name: "k8s.io/*"
dependency-type: "direct"
directory: "/"
schedule:
interval: "weekly"
day: "tuesday"
time: "09:00"
timezone: "America/Chicago"
60 changes: 0 additions & 60 deletions .github/stale.yml

This file was deleted.

214 changes: 214 additions & 0 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
name: Build and Test

on:
push:
branches:
- main
tags-ignore:
- "v*.*.*"
pull_request:
workflow_dispatch:
# Run M-F at 2pm CDT
schedule:
- cron: '0 19 * * 1-5'

env:
DEFAULT_GO_VERSION: ^1.22.0
GITHUB_USERNAME: ${{ secrets.EC2_BOT_GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.EC2_BOT_GITHUB_TOKEN }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

jobs:
fastTests:
name: Fast Test
runs-on: ubuntu-24.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: Unit Tests
run: make unit-test

- name: Lints
run: make spellcheck shellcheck helm-lint

- name: License Check
run: make license-test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Generate K8s YAML
run: make generate-k8s-yaml

golangci:
# this action needs to run in its own job per setup
name: Lint Eastwood
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}
cache: false

- name: Set up golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
skip-cache: true

buildLinux:
name: Build Linux Binaries
runs-on: ubuntu-24.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: Build Linux Binaries
run: make build-binaries

buildLinuxDocker:
name: Build Linux Docker Images
runs-on: ubuntu-24.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Build Linux Docker Images
run: make build-docker-images

buildWindows:
name: Build Windows Binaries
strategy:
matrix:
version: [2019, 2022]
runs-on: windows-${{matrix.version}}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: Build Windows Binaries
run: |
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
choco install make && choco install zip && make build-binaries-windows-${{matrix.version}}
buildWindowsDocker:
name: Build Windows Docker Images
strategy:
matrix:
version: [2019, 2022]
runs-on: windows-${{matrix.version}}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: Build Windows Docker Images
run: |
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
choco install make && make build-docker-images-windows-${{matrix.version}}
e2e:
name: E2E Tests
runs-on: ubuntu-24.04
strategy:
matrix:
k8sVersion: ["1.29", "1.30", "1.31", "1.32"]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Restore go mod cache
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
~/go/bin/
key: gocache

- name: E2E Tests
run: test/k8s-local-cluster-test/run-test -v ${{ matrix.k8sVersion }}
Loading