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

New command "deck file kong2kic" Kong configuration file to Kong Ingress Controller manifests. #1019

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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
file/kong_json_schema.json linguist-generated=true
1 change: 1 addition & 0 deletions .github/workflows/integration-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- 'kong/kong-gateway:3.0'
- 'kong/kong-gateway:3.1'
- 'kong/kong-gateway:3.2'
- 'kong/kong-gateway:3.3'
- 'kong/kong-gateway-dev:latest'
env:
KONG_ANONYMOUS_REPORTS: "off"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- 'kong:3.0'
- 'kong:3.1'
- 'kong:3.2'
- 'kong:3.3'
- 'kong/kong:master-alpine'
env:
KONG_ANONYMOUS_REPORTS: "off"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4.4.0
uses: docker/metadata-action@v4.6.0
with:
images: kong/deck
tags: ${{ env.TAGS_STANDARD }}${{ env.TAGS_SUPPLEMENTAL }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@v3.6.0
- name: Verify Codegen
run: make verify-codegen
- name: Run tests with Coverage
Expand All @@ -26,6 +26,7 @@ jobs:
uses: codecov/codecov-action@v3
with:
name: codecov-deck
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Build
run: make build
39 changes: 39 additions & 0 deletions .github/workflows/validate-kong-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Validate Kong Gateway Release
concurrency:
group: ${{ github.workflow }}
on:
workflow_dispatch:
inputs:
kong_image:
description: 'Kong Gateway Docker Image'
required: true
default: 'kong/kong-gateway-dev:latest'
branch:
description: 'decK Branch'
required: true
default: 'main'
jobs:
integration:
name: "${{ inputs.kong_image }} against ${{ inputs.branch }}"
env:
KONG_ANONYMOUS_REPORTS: "off"
KONG_IMAGE: ${{ inputs.kong_image }}
KONG_LICENSE_DATA: ${{ secrets.KONG_LICENSE_DATA }}
runs-on: ubuntu-latest
steps:
- name: Execution Information
run: |
echo "Kong Gateway Image = ${{ inputs.kong_image }}"
echo "decK Branch = ${{ inputs.branch }}"
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '^1.20'
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- name: Setup Kong
run: make setup-kong-ee
- name: Run integration tests
run: make test-integration
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ _testmain.go
deck
dist/
docs/cli-docs/
.idea/deck.iml
.idea/misc.xml
.gitignore
.idea/vcs.xml
.gitignore
.idea/modules.xml
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}
109 changes: 109 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Table of Contents

- [v1.26.1](#v1261)
- [v1.26.0](#v1260)
- [v1.25.0](#v1250)
- [v1.24.0](#v1240)
- [v1.23.0](#v1230)
- [v1.22.1](#v1221)
- [v1.22.0](#v1220)
- [v1.21.0](#v1210)
Expand Down Expand Up @@ -59,6 +64,105 @@
- [v0.2.0](#v020)
- [v0.1.0](#v010)

## [v1.26.1]

> Release date: 2023/09/07

### Fixes

- Raise an error if state files have different Runtime Groups
[#1014](https://github.com/Kong/deck/pull/1014)
- Correct consumers validation when `custom_id` is used
[#1012](https://github.com/Kong/deck/pull/1012)
- Remove hardcoded default value for Routes' `strip_path` field. Defaults are pulled via
API anyway.
[#999](https://github.com/Kong/deck/pull/999)

## [v1.26.0]

> Release date: 2023/08/09

### Added

- Added support for scoping plugins to Consumer Groups for both Kong Gateway and Konnect.
[#963](https://github.com/Kong/deck/pull/963)
[#959](https://github.com/Kong/deck/pull/959)

### Fixes

- Remove fallback mechanism formely used to authenticate with either "old" or "new" Konnect.
[#995](https://github.com/Kong/deck/pull/995)

## [v1.25.0]

> Release date: 2023/07/28

### Added

- Added a new command `file render` to render a final decK file. This will result in a file representing
the state as it would be synced online.
[#963](https://github.com/Kong/deck/pull/963)
- Added a new flag `--format` to `file convert` to enable JSON output.
[#963](https://github.com/Kong/deck/pull/963)

### Fixes

- Use same interface to pull Consumer Groups with Kong Gateway and Konnect.
This will help solving the issue of using tags with Consumer Groups when running against Konnect.
[#984](https://github.com/Kong/deck/pull/984)
- Fix Consumers handling when a consumer's `custom_id` is equal to the `username` of another consumer.
[#986](https://github.com/Kong/deck/pull/986)
- Avoid misleading diffs when configuration file has empty tags.
[#985](https://github.com/Kong/deck/pull/985)

## [v1.24.0]

> Release date: 2023/07/24

### Added

- Add a new flag (`--json-output`) to enable JSON output when using `sync` and `diff` commands
[#798](https://github.com/Kong/deck/pull/798)
- Improved error logs coming from files validation against Kong's schemas.
[#976](https://github.com/Kong/deck/pull/976)
- Added a new command `file openapi2kong` that will generate a deck file from an OpenAPI
3.0 spec. This is the replacement for the similar `inso` functionality.
The functionality is imported from the [go-apiops library](https://github.com/Kong/go-apiops).
[#939](https://github.com/Kong/deck/pull/939)
- Added a new command `file merge` that will merge multiple deck files. The files will not be
validated, which allows for working with incomplete or even invalid files in a pipeline.
The functionality is imported from the [go-apiops library](https://github.com/Kong/go-apiops).
[#939](https://github.com/Kong/deck/pull/939)
- Added a new command `file patch` for applying patches on top of a decK file. The patches can be
provided on the commandline, or via patch files. The deck file will not be
validated, which allows for working with incomplete or even invalid files in a pipeline.
The functionality is imported from the [go-apiops library](https://github.com/Kong/go-apiops).
[#939](https://github.com/Kong/deck/pull/939)
- Added a new commands `file add-tags/list-tags/remove-tags` to manage tags in a decK file. The deck file will not be
validated, which allows for working with incomplete or even invalid files in a pipeline.
The functionality is imported from the [go-apiops library](https://github.com/Kong/go-apiops).
[#939](https://github.com/Kong/deck/pull/939)
- Added a new command `file add-plugins` for adding plugins to a decK file. The plugins can be
provided on the commandline, or via config files. The deck file will not be
validated, which allows for working with incomplete or even invalid files in a pipeline.
The functionality is imported from the [go-apiops library](https://github.com/Kong/go-apiops).
[#939](https://github.com/Kong/deck/pull/939)

### Fixes

- Fix Certificates & SNIs handling when running against Konnect.
[#978](https://github.com/Kong/deck/pull/978)


## [v1.23.0]

> Release date: 2023/07/03

### Add

- Honor HTTPS_PROXY and HTTP_PROXY proxy environment variables
[#952](https://github.com/Kong/deck/pull/952)

## [v1.22.1]

> Release date: 2023/06/22
Expand Down Expand Up @@ -1254,6 +1358,11 @@ No breaking changes have been introduced in this release.

Debut release of decK

[v1.26.1]: https://github.com/kong/deck/compare/v1.26.0...v1.26.1
[v1.26.0]: https://github.com/kong/deck/compare/v1.25.0...v1.26.0
[v1.25.0]: https://github.com/kong/deck/compare/v1.24.0...v1.25.0
[v1.24.0]: https://github.com/kong/deck/compare/v1.23.0...v1.24.0
[v1.23.0]: https://github.com/kong/deck/compare/v1.22.1...v1.23.0
[v1.22.1]: https://github.com/kong/deck/compare/v1.22.0...v1.22.1
[v1.22.0]: https://github.com/kong/deck/compare/v1.21.0...v1.22.0
[v1.21.0]: https://github.com/kong/deck/compare/v1.20.0...v1.21.0
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20.5 AS build
FROM golang:1.21.0 AS build
WORKDIR /deck
COPY go.mod ./
COPY go.sum ./
Expand All @@ -9,7 +9,7 @@ ARG TAG
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o deck \
-ldflags "-s -w -X github.com/kong/deck/cmd.VERSION=$TAG -X github.com/kong/deck/cmd.COMMIT=$COMMIT"

FROM alpine:3.18.2
FROM alpine:3.18.3
RUN adduser --disabled-password --gecos "" deckuser
RUN apk --no-cache add ca-certificates jq
USER deckuser
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test-all: lint test

.PHONY: test
test:
go test -race ./...
go test -race -count=1 ./...

.PHONY: lint
lint:
Expand Down Expand Up @@ -47,6 +47,6 @@ setup-kong-ee:

.PHONY: test-integration
test-integration:
go test -v -tags=integration \
go test -v -count=1 -tags=integration \
-race \
./tests/integration/...
Loading