Skip to content

feat(kgo): add kubernetes-configuration crds subchart #414

feat(kgo): add kubernetes-configuration crds subchart

feat(kgo): add kubernetes-configuration crds subchart #414

Workflow file for this run

name: PR tests
concurrency:
# Run only for most recent commit in PRs but for all tags and commits on main
# Ref: https://docs.github.com/en/actions/using-jobs/using-concurrency
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
- release/kong-2.x
- release/kong-3.x
- prepare-kgo-chart
workflow_dispatch: {}
env:
# Specify this here because these tests rely on ktf to run kind for cluster creation.
KIND_VERSION: v0.23.0
jobs:
lint:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: third_party/go.mod
- name: Run linters
run: make lint
lint-test:
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
matrix:
chart-name:
- kong
- ingress
- gateway-operator
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/[email protected]
- name: Add Helm repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add kong https://charts.konghq.com
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (lint)
run: ct lint --target-branch main --check-version-increment=false
- name: setup testing environment (kind-cluster)
env:
KUBERNETES_VERSION: ${{ matrix.kubernetes-version }}
CHART_NAME: ${{ matrix.chart-name }}
run: ./scripts/test-env.sh
- name: Run chart-testing (install)
run: |
kubectl create ns kong-test
ct install --target-branch main --charts charts/${{ matrix.chart-name}} --namespace kong-test
# No need to delete the ns the cluster is scrapped after the job anyway.
integration-test:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
GATEWAY_API_VERSION: v1.0.0
strategy:
matrix:
kubernetes-version:
- "1.25.16"
- "1.26.15"
- "1.27.13"
- "1.28.9"
- "1.29.4"
- "1.30.0"
chart-name:
- kong
- ingress
- gateway-operator
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup helm
uses: azure/[email protected]
- name: setup testing environment (kind-cluster)
env:
KUBERNETES_VERSION: ${{ matrix.kubernetes-version }}
CHART_NAME: ${{ matrix.chart-name }}
run: ./scripts/test-env.sh
- name: run integration tests (integration)
env:
CHART_NAME: ${{ matrix.chart-name }}
run: ./scripts/test-run.sh
- name: run upgrade integration tests (integration-upgrade)
env:
CHART_NAME: ${{ matrix.chart-name }}
run: ./scripts/test-upgrade.sh
- name: cleanup integration tests (cleanup)
run: ./scripts/test-env.sh cleanup
oldversion-integration-test:
timeout-minutes: 30
runs-on: ubuntu-latest
env:
GATEWAY_API_VERSION: v0.8.1
strategy:
matrix:
kic-version:
- "2.10"
- "2.11"
kong-version:
- "3.3"
- "3.2"
chart-name:
- kong
- ingress
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup helm
uses: azure/[email protected]
- name: setup testing environment (kind-cluster)
env:
CHART_NAME: ${{ matrix.chart-name }}
run: ./scripts/test-env.sh
- name: run integration tests (integration)
env:
CHART_NAME: ${{ matrix.chart-name }}
KONG_VERSION: ${{ matrix.kong-version }}
KIC_VERSION: ${{ matrix.kic-version }}
run: ./scripts/test-run.sh
- name: cleanup integration tests (cleanup)
run: ./scripts/test-env.sh cleanup
golden-tests:
timeout-minutes: 30
runs-on: ubuntu-latest
name: golden-tests
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup helm
uses: azure/[email protected]
- name: build helm chart dependency
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add kong https://charts.konghq.com
helm dependency build charts/kong
helm dependency build charts/ingress
- name: run golden tests
run: make test.golden
# Workaround to allow checking the matrix tests as required tests without adding the individual cases
# Ref: https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
passed:
timeout-minutes: 30
runs-on: ubuntu-latest
needs:
- lint
- lint-test
- integration-test
- oldversion-integration-test
- golden-tests
if: always()
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: |
echo "Some jobs failed or were cancelled."
exit 1