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

Old versions of k8s remove from testing #511

Merged
merged 18 commits into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
if: ${{ !contains(github.ref, 'refs/tags/') }}
strategy:
matrix:
k8sVersion: ["1.16", "1.17", "1.18", "1.19", "1.20", "1.21"]
k8sVersion: ["1.17", "1.18", "1.19", "1.20", "1.21", "1.22"]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>
<a href="https://github.com/kubernetes/kubernetes/releases">
<img src="https://img.shields.io/badge/Kubernetes-%3E%3D%201.16-brightgreen" alt="kubernetes">
<img src="https://img.shields.io/badge/Kubernetes-%3E%3D%201.17-brightgreen" alt="kubernetes">
</a>
<a href="https://golang.org/doc/go1.16">
<img src="https://img.shields.io/github/go-mod/go-version/aws/aws-node-termination-handler?color=blueviolet" alt="go-version">
Expand Down
6 changes: 3 additions & 3 deletions config/helm/aws-node-termination-handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AWS Node Termination Handler Helm chart for Kubernetes. For more information on

## Prerequisites

* Kubernetes >= 1.11
* Kubernetes >= 1.14

## Installing the Chart

Expand Down Expand Up @@ -142,8 +142,8 @@ Parameter | Description | Default
`serviceAccount.annotations` | Specifies the annotations for ServiceAccount | `{}`
`securityContext.runAsUserID` | User ID to run the container | `1000`
`securityContext.runAsGroupID` | Group ID to run the container | `1000`
`nodeSelectorTermsOs` | Operating System Node Selector Key | >=1.14: `kubernetes.io/os`, <1.14: `beta.kubernetes.io/os`
`nodeSelectorTermsArch` | CPU Architecture Node Selector Key | >=1.14: `kubernetes.io/arch`, <1.14: `beta.kubernetes.io/arch`
`nodeSelectorTermsOs` | Operating System Node Selector Key | `kubernetes.io/os`
`nodeSelectorTermsArch` | CPU Architecture Node Selector Key | `kubernetes.io/arch`
`targetNodeOs` | Space separated list of node OS's to target, e.g. "linux", "windows", "linux windows". Note: Windows support is experimental. | `"linux"`
`updateStrategy` | Update strategy for the all DaemonSets (Linux and Windows) | `type=RollingUpdate,rollingUpdate.maxUnavailable=1`
`linuxUpdateStrategy` | Update strategy for the Linux DaemonSet | `type=RollingUpdate,rollingUpdate.maxUnavailable=1`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,9 @@ Create the name of the service account to use

{{/*
Get the default node selector term prefix.

In 1.14 "beta.kubernetes.io" was deprecated and is scheduled for removal in 1.18.
See https://v1-14.docs.kubernetes.io/docs/setup/release/notes/#deprecations
*/}}
{{- define "aws-node-termination-handler.defaultNodeSelectorTermsPrefix" -}}
{{- $k8sVersion := printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" -}}
{{- semverCompare "<1.14" $k8sVersion | ternary "beta.kubernetes.io" "kubernetes.io" -}}
kubernetes.io
{{- end -}}

{{/*
Expand Down
3 changes: 1 addition & 2 deletions config/helm/localstack/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- $k8sVersion := printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" -}}
{{- $osSelector := (semverCompare "<1.14" $k8sVersion | ternary "beta.kubernetes.io/os" "kubernetes.io/os") -}}
{{- $osSelector := printf "kubernetes.io/os" -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
3 changes: 1 addition & 2 deletions config/helm/webhook-test-proxy/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{- if .Values.webhookTestProxy.create -}}
{{- $isWindows := (contains "windows" .Values.targetNodeOs) -}}
{{- $k8sVersion := printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" -}}
{{- $osSelector := (semverCompare "<1.14" $k8sVersion | ternary "beta.kubernetes.io/os" "kubernetes.io/os") -}}
{{- $osSelector := printf "kubernetes.io/os" -}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{- if .Values.regularPodTest.create -}}
{{- $isWindows := (contains "windows" .Values.targetNodeOs) -}}
{{- $k8sVersion := printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor | replace "+" "" -}}
{{- $osSelector := (semverCompare "<1.14" $k8sVersion | ternary "beta.kubernetes.io/os" "kubernetes.io/os") -}}
{{- $osSelector := printf "kubernetes.io/os" -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
4 changes: 2 additions & 2 deletions test/k8s-compatibility-test/run-k8s-compatibility-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
set -euo pipefail

SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
versions=("1.21" "1.20" "1.19" "1.18" "1.17" "1.16")
versions=("1.22" "1.21" "1.20" "1.19" "1.18" "1.17")
E_CODE=0
AFTER_FIRST_RUN_ARGS=""
PASS_THRU_ARGS=""

USAGE=$(cat << 'EOM'
Usage: run-k8s-compatability-test [-h]
Executes the spot termination integration test for each version of kubernetes (k8s 1.16 - 1.21 supported)
Executes the spot termination integration test for each version of kubernetes (k8s 1.17 - 1.22 supported)

Examples:
# run test with direct download of go modules
Expand Down
4 changes: 2 additions & 2 deletions test/k8s-local-cluster-test/provision-cluster
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ CLUSTER_NAME_BASE=$(uuidgen | cut -d'-' -f1 | tr '[:upper:]' '[:lower:]')
OVERRIDE_PATH=0
KIND_CONFIG_FILE=$SCRIPTPATH/kind-three-node-cluster.yaml

# shellcheck disable=SC2034
K8_1_22="kindest/node:v1.22.1@sha256:7f539328bebb0483e4a91ae48fcd067619cd9fa28f4bf3b3d624858e30571a8e"
# shellcheck disable=SC2034
K8_1_21="kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6"
# shellcheck disable=SC2034
Expand All @@ -18,8 +20,6 @@ K8_1_19="kindest/node:v1.19.11@sha256:07db187ae84b4b7de440a73886f008cf903fcf5764
K8_1_18="kindest/node:v1.18.19@sha256:7af1492e19b3192a79f606e43c35fb741e520d195f96399284515f077b3b622c"
# shellcheck disable=SC2034
K8_1_17="kindest/node:v1.17.17@sha256:66f1d0d91a88b8a001811e2f1054af60eef3b669a9a74f9b6db871f2f1eeed00"
# shellcheck disable=SC2034
K8_1_16="kindest/node:v1.16.15@sha256:83067ed51bf2a3395b24687094e283a7c7c865ccc12a8b1d7aa673ba0c5e8861"

K8_VERSION="$K8_1_20"
KUBECTL_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
Expand Down
4 changes: 2 additions & 2 deletions test/k8s-local-cluster-test/run-test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ NODE_TERMINATION_HANDLER_DOCKER_IMG=""
DEFAULT_WEBHOOK_DOCKER_IMG="webhook-test-proxy:customtest"
WEBHOOK_DOCKER_IMG=""
OVERRIDE_PATH=0
K8S_VERSION="1.16"
K8S_VERSION="1.20"
AEMM_URL="amazon-ec2-metadata-mock-service.default.svc.cluster.local"
AEMM_VERSION="1.8.1"
AEMM_DL_URL="https://github.com/aws/amazon-ec2-metadata-mock/releases/download/v$AEMM_VERSION/amazon-ec2-metadata-mock-$AEMM_VERSION.tgz"
Expand Down Expand Up @@ -136,7 +136,7 @@ USAGE=$(cat << 'EOM'
-n Node Termination Handler Docker Image
-d use GOPROXY=direct to bypass proxy.golang.org
-o Override path w/ your own kubectl and kind binaries
-v Kubernetes Version (Default: 1.20) [1.16, 1.17, 1.18, 1.19, 1.20, and 1.21]
-v Kubernetes Version (Default: 1.20) [1.17, 1.18, 1.19, 1.20, 1.21, and 1.22]
-w Webhook Docker Image

EOM
Expand Down