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

Add support for plugin ordering #2657

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
110 changes: 110 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,46 @@ jobs:
name: coverage
path: coverage.enterprisepostgres.out

integration-tests-enterprise-postgres-nightly:
environment: "Configure ci"
runs-on: ubuntu-latest
needs: runnable
if: "needs.runnable.outputs.runnable == 'true'"
steps:

- name: setup golang
uses: actions/setup-go@v3
with:
go-version: '^1.18'

- name: cache go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-build-codegen-

- name: checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: run integration tests
run: make test.integration.enterprise.postgres
env:
KONG_LICENSE_DATA: ${{ secrets.KONG_LICENSE_DATA }}
TEST_KONG_IMAGE: "kong/kong-gateway-internal"
TEST_KONG_TAG: "master-nightly-alpine"
TEST_KONG_PULL_USERNAME: ${{ secrets.GHA_DOCKERHUB_PULL_USER }}
TEST_KONG_PULL_PASSWORD: ${{ secrets.GHA_KONG_ORG_DOCKERHUB_PUBLIC_TOKEN }}

- name: collect test coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage.enterprisepostgres.out

integration-tests-dbless:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -177,6 +217,41 @@ jobs:
name: coverage
path: coverage.dbless.out

# disabled pending changes to the kong/kong repo
#integration-tests-dbless-nightly:
# runs-on: ubuntu-latest
# steps:

# - name: setup golang
# uses: actions/setup-go@v3
# with:
# go-version: '^1.18'

# - name: cache go modules
# uses: actions/cache@v3
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-build-codegen-

# - name: checkout repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: run integration tests
# run: make test.integration.dbless
# env:
# TEST_KONG_IMAGE: "kong/kong"
# TEST_KONG_TAG: "latest"

# - name: collect test coverage
# uses: actions/upload-artifact@v3
# with:
# name: coverage
# path: coverage.dbless.out

integration-tests-postgres:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -208,6 +283,41 @@ jobs:
name: coverage
path: coverage.postgres.out

# disabled pending changes to the kong/kong repo
#integration-tests-postgres-nightly:
# runs-on: ubuntu-latest
# steps:

# - name: setup golang
# uses: actions/setup-go@v3
# with:
# go-version: '^1.18'

# - name: cache go modules
# uses: actions/cache@v3
# with:
# path: ~/go/pkg/mod
# key: ${{ runner.os }}-build-codegen-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-build-codegen-

# - name: checkout repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0

# - name: run integration tests
# run: make test.integration.postgres
# env:
# TEST_KONG_IMAGE: "kong/kong"
# TEST_KONG_TAG: "latest"

# - name: collect test coverage
# uses: actions/upload-artifact@v3
# with:
# name: coverage
# path: coverage.postgres.out

integration-tests-feature-gates:
runs-on: ubuntu-latest
steps:
rainest marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
[#2580](https://github.com/Kong/kubernetes-ingress-controller/pull/2580)
- Added information about service mesh deployment and distribution in telemetry data reported to Kong.
[#2642](https://github.com/Kong/kubernetes-ingress-controller/pull/2642)
- Added support for plugin ordering (requires Kong Enterprise 3.0 or higher).
[#2657](https://github.com/Kong/kubernetes-ingress-controller/pull/2657)

#### Fixed
- Fixed the problem that logs from reporter does not appear in the pod log.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down
20 changes: 20 additions & 0 deletions config/crd/bases/configuration.konghq.com_kongplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down
40 changes: 40 additions & 0 deletions deploy/single/all-in-one-dbless-k4k8s-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down Expand Up @@ -602,6 +622,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down
40 changes: 40 additions & 0 deletions deploy/single/all-in-one-dbless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down Expand Up @@ -602,6 +622,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down
40 changes: 40 additions & 0 deletions deploy/single/all-in-one-postgres-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down Expand Up @@ -602,6 +622,26 @@ spec:
type: string
metadata:
type: object
ordering:
description: Ordering overrides the normal plugin execution order
properties:
after:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
before:
additionalProperties:
items:
type: string
type: array
description: PluginOrderingPhase indicates which plugins in a phase
should affect the target plugin's order
type: object
type: object
plugin:
description: PluginName is the name of the plugin to which to apply the
config
Expand Down
Loading