Skip to content

Commit

Permalink
use k8s 1.24 in ci [1.12] (#7581)
Browse files Browse the repository at this point in the history
* use 1.24 in ci

* update kubectl image
  • Loading branch information
jenshu authored Dec 21, 2022
1 parent 9b4dafd commit 9940753
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/regression-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ jobs:
with:
# We rely on the `deploy-to-kind-cluster` script to create a kind cluster
skipClusterCreation: true
version: v0.11.1
version: v0.17.0
- uses: azure/setup-kubectl@v1
if: needs.prepare_env.outputs.should-pass-regression-tests != 'true'
id: kubectl
with:
version: 'v1.22.4'
version: 'v1.24.7'
- uses: azure/setup-helm@v1
if: needs.prepare_env.outputs.should-pass-regression-tests != 'true'
with:
Expand All @@ -131,7 +131,7 @@ jobs:
KUBE2E_TESTS: ${{ matrix.kube-e2e-test-type }}
USE_XDS_RELAY: ${{ matrix.xds-relay }}
CLUSTER_NAME: 'kind'
CLUSTER_NODE_VERSION: 'v1.22.4@sha256:ca3587e6e545a96c07bf82e2c46503d9ef86fc704f44c17577fca7bcabf5f978'
CLUSTER_NODE_VERSION: 'v1.24.7@sha256:5c015142d9b60a0f6c45573f809957076514e38ec973565e2b2fe828b91597f5'
VERSION: '0.0.0-kind1'
run: |
./ci/deploy-to-kind-cluster.sh
Expand Down
3 changes: 3 additions & 0 deletions changelog/v1.12.38/k8s-1.24.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog:
- type: NON_USER_FACING
description: update CI to use k8s 1.24
18 changes: 3 additions & 15 deletions ci/deploy-to-kind-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# The name of the kind cluster to deploy to
CLUSTER_NAME="${CLUSTER_NAME:-kind}"
# The version of the Node Docker image to use for booting the cluster
CLUSTER_NODE_VERSION="${CLUSTER_NODE_VERSION:-v1.22.4}"
CLUSTER_NODE_VERSION="${CLUSTER_NODE_VERSION:-v1.24.7}"
# The version used to tag images
VERSION="${VERSION:-0.0.0-kind1}"
# Automatically (lazily) determine OS type
Expand Down Expand Up @@ -91,27 +91,15 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta2
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
metadata:
name: config
apiServer:
extraArgs:
"feature-gates": "EphemeralContainers=true"
scheduler:
extraArgs:
"feature-gates": "EphemeralContainers=true"
controllerManager:
extraArgs:
"feature-gates": "EphemeralContainers=true"
- |
apiVersion: kubeadm.k8s.io/v1beta2
apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration
metadata:
name: config
nodeRegistration:
kubeletExtraArgs:
"feature-gates": "EphemeralContainers=true"
$ARM_EXTENSION
EOF

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Kind is ideal for getting started with Gloo Edge on your personal workstation.
We advise customizing kind cluster creation slightly to make it easier to access your services from your host workstation. Since services deployed in kind are inside a Docker container, you cannot easily access them. It is more convenient if you expose ports from inside the container to your host machine.

```bash
cat <<EOF | kind create cluster --name kind --image kindest/node:v1.22.4 --config=-
cat <<EOF | kind create cluster --name kind --image kindest/node:v1.24.7 --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
Expand All @@ -128,7 +128,7 @@ Note that Kind's docker container will be publishing ports 31500 (for http) and

```
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.18.2) 🖼
✓ Ensuring node image (kindest/node:v1.24.7) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
Expand Down
2 changes: 1 addition & 1 deletion hack/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function cleanup {
}

function start {
kind create cluster --name=$CLUSTER_NAME --wait=2m --image=kindest/node:v1.22.4
kind create cluster --name=$CLUSTER_NAME --wait=2m --image=kindest/node:v1.24.7
}

function kind-env {
Expand Down
2 changes: 1 addition & 1 deletion jobs/kubectl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bitnami/kubectl:1.22.12 as kubectl
FROM bitnami/kubectl:1.24.7 as kubectl

FROM alpine:3.15.6

Expand Down
4 changes: 2 additions & 2 deletions projects/gloo/cli/pkg/cmd/demo/federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ if [ "$4" == "" ]; then
exit 1
fi
kind create cluster --name "$1" --image kindest/node:v1.22.4
kind create cluster --name "$1" --image kindest/node:v1.24.7
# Add locality labels to remote kind cluster for discovery
(cat <<EOF | kind create cluster --name "$2" --image kindest/node:v1.22.4 --config=-
(cat <<EOF | kind create cluster --name "$2" --image kindest/node:v1.24.7 --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
Expand Down
4 changes: 2 additions & 2 deletions test/kube2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ It accepts a number of environment variables, to control the creation of a kind
| Name | Default | Description |
| --- | --- | --- |
| CLUSTER_NAME | kind | The name of the cluster that will be generated |
| CLUSTER_NODE_VERSION | v1.22.4 | The version of the [Node Docker image](https://hub.docker.com/r/kindest/node/) to use for booting the cluster |
| CLUSTER_NODE_VERSION | v1.24.7 | The version of the [Node Docker image](https://hub.docker.com/r/kindest/node/) to use for booting the cluster |
| VERSION | 0.0.0-kind1 | The version used to tag Gloo images that are deployed to the cluster |
| KUBE2E_TESTS | gateway | Name of the test suite to be run. Options: `'gateway', 'gloo', 'ingress', 'helm', 'gloomtls', 'glooctl'` |

Example:
```bash
CLUSTER_NAME=solo-test-cluster CLUSTER_NODE_VERSION=v1.22.4 VERSION=v1.0.0-solo-test ci/deploy-to-kind-cluster.sh
CLUSTER_NAME=solo-test-cluster CLUSTER_NODE_VERSION=v1.24.7 VERSION=v1.0.0-solo-test ci/deploy-to-kind-cluster.sh
```

#### (Option B) - Manually Run Make Targets
Expand Down

0 comments on commit 9940753

Please sign in to comment.