Skip to content

Commit

Permalink
Upgrade default version of kind and kubectl
Browse files Browse the repository at this point in the history
  • Loading branch information
essobedo committed Feb 8, 2023
1 parent 4fedef2 commit 426f2bc
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Test

on:
pull_request:
branches:
- main
push:
branches:
- main
Expand Down Expand Up @@ -31,8 +33,8 @@ jobs:
strategy:
matrix:
version:
- v0.11.1
- v0.10.0
- v0.17.0
- v0.16.0
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -54,8 +56,8 @@ jobs:
strategy:
matrix:
version:
- v0.11.1
- v0.10.0
- v0.17.0
- v0.16.0
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -86,7 +88,7 @@ jobs:
strategy:
matrix:
version:
- v0.11.1
- v0.17.0
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -132,8 +134,8 @@ jobs:
strategy:
matrix:
knative_version:
- v0.24.0
- v1.0.0
- v1.9.0
- v1.8.1
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ For more information, reference the GitHub Help Documentation for [Creating a wo

For more information on inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input)

- `version`: The KinD version to use (default: `v0.11.1`)
- `version`: The KinD version to use (default: `v0.17.0`)
- `config`: The path to the KinD config file
- `node_image`: The Docker image for the cluster nodes
- `cluster_name`: The name of the cluster to create (default: `kind`)
- `wait`: The duration to wait for the control plane to become ready (default: `60s`)
- `log_level`: The log level for KinD
- `registry`: Configures an insecure registry on `kind-registry:5000` to be used with KinD (default: `true`)
- `kubectl_version`: The kubectl version to use (default: `v1.21.1`)
- `kubectl_version`: The kubectl version to use (default: `v1.26.1`)
- `knative_serving`: The version of Knative Serving to install on the Kind cluster (not installed by default - example: `v1.0.0`)
- `knative_kourier`: The version of Knative Net Kourier to install on the Kind cluster (not installed by default - example: `v1.0.0`)
- `knative_eventing`: The version of Knative Eventing to install on the Kind cluster (not installed by default - example: `v1.0.0`)
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branding:
icon: cloud
inputs:
version:
description: "The KinD version to use (default: v0.11.1)"
description: "The KinD version to use (default: v0.17.0)"
config:
description: "The path to the KinD config file"
node_image:
Expand All @@ -20,7 +20,7 @@ inputs:
registry:
description: "Configures an insecure registry on kind-registry:5000 to be used with KinD (default: true)"
kubectl_version:
description: "The version of kubectl to use (default: v1.20.0)"
description: "The version of kubectl to use (default: v1.26.1)"
knative_serving:
description: "The version of Knative Serving to install on the Kind cluster (not installed by default - example: v1.0.0)"
knative_kourier:
Expand Down
4 changes: 2 additions & 2 deletions kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ set -o errexit
set -o nounset
set -o pipefail

DEFAULT_KIND_VERSION=v0.11.1
DEFAULT_KIND_VERSION=v0.17.0
DEFAULT_CLUSTER_NAME=kind
DEFAULT_KUBECTL_VERSION=v1.21.1
DEFAULT_KUBECTL_VERSION=v1.26.1

show_help() {
cat << EOF
Expand Down
12 changes: 7 additions & 5 deletions knative.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ parse_command_line() {

install_prerequisites() {
echo "Installing yq for patching Knative resources..."
sudo pip install yq
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq
chmod +x /usr/local/bin/yq
yq --version
}

install_serving() {
Expand All @@ -118,7 +120,7 @@ install_serving() {
kubectl apply --filename $base/serving-crds.yaml
echo "Waiting for resources to be initialized..."
sleep 5
curl -L -s $base/serving-core.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | yq 'del(.metadata.annotations."knative.dev/example-checksum")' -y | kubectl apply -f -
curl -L -s $base/serving-core.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' | yq 'del(.metadata.annotations."knative.dev/example-checksum")' | kubectl apply -f -
echo "Waiting for resources to be initialized..."
sleep 60
kubectl get pod -n knative-serving
Expand Down Expand Up @@ -151,17 +153,17 @@ install_eventing() {
kubectl apply --filename $base/eventing-crds.yaml
echo "Waiting for resources to be initialized..."
sleep 5
curl -L -s $base/eventing-core.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | yq 'del(.metadata.annotations."knative.dev/example-checksum")' -y | kubectl apply -f -
curl -L -s $base/eventing-core.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' | yq 'del(.metadata.annotations."knative.dev/example-checksum")' | kubectl apply -f -
# Eventing channels
set +e
curl -L -s $base/in-memory-channel.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | yq 'del(.metadata.annotations."knative.dev/example-checksum")' -y | kubectl apply -f -
curl -L -s $base/in-memory-channel.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' | yq 'del(.metadata.annotations."knative.dev/example-checksum")' | kubectl apply -f -
if [ $? -ne 0 ]; then
set -e
curl -L -s $base/in-memory-channel.yaml | kubectl apply -f -
fi
set -e
# Eventing broker
curl -L -s $base/mt-channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' -y | yq 'del(.metadata.annotations."knative.dev/example-checksum")' -y | kubectl apply -f -
curl -L -s $base/mt-channel-broker.yaml | yq 'del(.spec.template.spec.containers[]?.resources)' | yq 'del(.metadata.annotations."knative.dev/example-checksum")' | kubectl apply -f -
echo "Waiting for resources to be initialized..."
sleep 30
kubectl get pod -n knative-eventing
Expand Down

0 comments on commit 426f2bc

Please sign in to comment.