Skip to content

Commit

Permalink
Merge branch 'main' into feat/konnect_validate
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashansa-K authored Sep 27, 2024
2 parents dc80a8d + cd165de commit e07f7b0
Show file tree
Hide file tree
Showing 99 changed files with 4,047 additions and 430 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
17 changes: 3 additions & 14 deletions .github/workflows/integration-enterprise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,11 @@ jobs:
strategy:
matrix:
kong_image:
- 'kong/kong-gateway:1.5.0.11'
- 'kong/kong-gateway:2.1.4.6'
- 'kong/kong-gateway:2.2.1.3'
- 'kong/kong-gateway:2.3.3.4'
- 'kong/kong-gateway:2.4.1.3'
- 'kong/kong-gateway:2.5.1.2'
- 'kong/kong-gateway:2.6.0.2'
- 'kong/kong-gateway:2.7'
- 'kong/kong-gateway:2.8'
- 'kong/kong-gateway:3.0'
- 'kong/kong-gateway:3.1'
- 'kong/kong-gateway:3.2'
- 'kong/kong-gateway:3.3'
- 'kong/kong-gateway:3.4'
- 'kong/kong-gateway:3.5'
- 'kong/kong-gateway:3.6'
- 'kong/kong-gateway:3.7'
- 'kong/kong-gateway-dev:latest'
env:
KONG_ANONYMOUS_REPORTS: "off"
Expand All @@ -46,7 +35,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -55,7 +44,6 @@ jobs:
- uses: Kong/kong-license@master
id: license
with:
password: ${{ secrets.PULP_PASSWORD }}
op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Setup Kong
env:
Expand All @@ -65,3 +53,4 @@ jobs:
env:
KONG_LICENSE_DATA: ${{ steps.license.outputs.license }}
run: make test-integration
continue-on-error: ${{ matrix.kong_image == 'kong/kong-gateway-dev:latest' }}
2 changes: 1 addition & 1 deletion .github/workflows/integration-konnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod
- name: Run integration tests
run: make test-integration
18 changes: 3 additions & 15 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,11 @@ jobs:
strategy:
matrix:
kong_image:
- 'kong:1.4.3'
- 'kong:1.5.1'
- 'kong:2.0.5'
- 'kong:2.1.4'
- 'kong:2.2.2'
- 'kong:2.3.3'
- 'kong:2.4.1'
- 'kong:2.5.1'
- 'kong:2.6.0'
- 'kong:2.7'
- 'kong:2.8'
- 'kong:3.0'
- 'kong:3.1'
- 'kong:3.2'
- 'kong:3.3'
- 'kong:3.4'
- 'kong:3.5'
- 'kong:3.6'
- 'kong:3.7'
- 'kong/kong:master'
env:
KONG_ANONYMOUS_REPORTS: "off"
Expand All @@ -47,8 +34,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod
- name: Setup Kong
run: make setup-kong
- name: Run integration tests
run: make test-integration
continue-on-error: ${{ matrix.kong_image == 'kong/kong:master' }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
Expand Down
29 changes: 22 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ jobs:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.20'
- name: Setup golangci-lint
uses: golangci/[email protected]
go-version-file: go.mod
- name: Run tests with Coverage
run: make coverage
- name: Upload Code Coverage
Expand All @@ -33,5 +29,24 @@ jobs:
name: codecov-deck
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

lint:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: golangci/[email protected]

build:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: make build
3 changes: 1 addition & 2 deletions .github/workflows/validate-kong-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '^1.20'
go-version-file: go.mod
- uses: Kong/kong-license@master
id: license
with:
password: ${{ secrets.PULP_PASSWORD }}
op-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
- name: Setup Kong
env:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ docs/cli-docs/

# generated test 'actuals'
kong2kic/testdata/**/*-actual.*
kong2tf/testdata/**/*-actual.*
kong2tf/terraform
6 changes: 4 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ linters:
- dogsled
- durationcheck
- exhaustive
- exportloopref
- copyloopvar
- gci
- goconst
- gofmt
Expand All @@ -19,7 +19,9 @@ linters:
- govet
- importas
- lll
- megacheck
- gosimple
- staticcheck
- unused
- misspell
- nakedret
- nilerr
Expand Down
108 changes: 108 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Table of Contents

- [v1.40.3](#v1403)
- [v1.40.2](#v1402)
- [v1.40.1](#v1401)
- [v1.40.0](#v1400)
- [v1.39.6](#v1396)
- [v1.39.5](#v1395)
- [v1.39.4](#v1394)
- [v1.39.3](#v1393)
- [v1.39.2](#v1392)
- [v1.39.1](#v1391)
- [v1.39.0](#v1390)
- [v1.38.1](#v1381)
Expand Down Expand Up @@ -87,6 +96,96 @@
- [v0.2.0](#v020)
- [v0.1.0](#v010)

## [v1.40.3]
> Release date: 2024/09/26
### Fixes
- Fixed the behaviour of --konnect-addr flag in case default Konnect URL is used with it.
Earlier, using the default URL with the said flag ran the command against the gateway.
[#1398](https://github.com/Kong/deck/pull/1398)
- Bumped up go-apiops to `v0.1.38` and replaced yaml/v3 package with [Kong's own fork](https://github.com/Kong/yaml). This change allows deck commands to process OAS files with path lengths > 128 characters which was a limitation from the original yaml library.[#1405](https://github.com/Kong/deck/pull/1405) [go-apiops #208](https://github.com/Kong/go-apiops/pull/208) [Kong/yaml #1](https://github.com/Kong/yaml/pull/1)

## [v1.40.2]
> Release date: 2024/09/19
### Added
- Add support for default lookup services. [#1367](https://github.com/Kong/deck/pull/1367)
[go-database-reconciler #130](https://github.com/Kong/go-database-reconciler/pull/130)

## [v1.40.1]
> Release date: 2024/09/12
### Fixes
- Fixed the issue in `deck file kong2tf` command where users were facing a panic error with using jwt plugins when passing an empty list to cookie_names field. [#1399](https://github.com/Kong/deck/pull/1399)
- Bumped up go-apiops library. The updated lib has a fix for `deck file openapi2kong` command where parameters.required field was coming as null, if not passed by user. [#1400](https://github.com/Kong/deck/pull/1400) [go-apiops #205](https://github.com/Kong/go-apiops/pull/205)
- Bumped up go-kong library. The updated lib prevents unset plugin's configuration "record" fields to be filled with empty tables: {}
for deck files. Since, deck doesn't fill defaults anymore, this fix ensures that deck doesn't pass empty record fields while syncing plugin configurations.
[#1401](https://github.com/Kong/deck/pull/1401) [go-kong #467](https://github.com/Kong/go-kong/pull/467)

## [v1.40.0]
> Release date: 2024/09/10
### Added
- Added a new `file kong2tf` command to convert a deck file to Terraform configuration [#1391](https://github.com/Kong/deck/pull/1391), along with two command line flags:
- `--generate-imports-for-control-plane-id`: If this is provided, import blocks will be added to Terraform to adopt existing resources.
- `--ignore-credential-changes`: If this is provided, any credentials will be ignored until they are destroyed and recreated.

### Fixes

- Fixed the issue that was preventing a consumer to be in more than one consumer-groups [#1394](https://github.com/Kong/deck/pull/1394)
[go-database-reconciler #140](https://github.com/Kong/go-database-reconciler/pull/140)
- Fields marked as auto in schema are filled with nil in the config sent to the Control Plane. In case a field is marked as auto and is a required field, deck would throw an error if the user doesn't fill it in the declarative configuration file.
[#1394](https://github.com/Kong/deck/pull/1394) [go-database-reconciler #139](https://github.com/Kong/go-database-reconciler/pull/139)
- Defaults are no longer filled by deck. They will only be used for computing a diff, but not sent to the Control Plane.
[#1394](https://github.com/Kong/deck/pull/1394) [go-database-reconciler #133](https://github.com/Kong/go-database-reconciler/pull/133)


## [v1.39.6]
> Release date: 2024/08/22
### Fixes

- Fixed the issue where plugins scoped to consumer-groups were shown as global by deck. [#1380](https://github.com/Kong/deck/pull/1380)
[go-database-reconciler #134](https://github.com/Kong/go-database-reconciler/pull/134)

## [v1.39.5]
> Release date: 2024/08/22
### Fixes

- Fixed `deck file openapi2kong` command where parameter schema wasn't getting generated properly. [#1355](https://github.com/Kong/deck/pull/1355) [go-apiops #186](https://github.com/Kong/go-apiops/pull/186)

## [v1.39.4]
> Release date: 2024/08/01
### Fixes

- Correct --no-color flag behaviour in non-tty environments
The changes retain the default behaviour of showing colors in tty and no colors in non-tty if no flag is passed. However, on passing the --no-color=false, non-tty environments can also get colored output.[#1339](https://github.com/Kong/deck/pull/1339)
- Add validation on `deck file patch` to avoid confusing behaviour. The command intends to patch input files either via selector-value flags or command arguments. The change ensures that at least one of these is present, but not both at the same time.[#1342](https://github.com/Kong/deck/pull/1342)
- Fix rendering for expression routes, keeping kong gateway version in consideration. [go-database-reconciler #118](https://github.com/Kong/go-database-reconciler/pull/118) [#1351](https://github.com/Kong/deck/pull/1351)

## [v1.39.3]
> Release date: 2024/07/16
### Chores

- Fixes [#1228](https://github.com/Kong/deck/issues/1282) by updating the golang version from 1.21 to 1.22, thus removing the inconsistency between decK releases' version and the one used in the project.
[#1336](https://github.com/Kong/deck/pull/1336)

## [v1.39.2]

> Release date: 2024/07/04
### Fixes

- Correct IPv6 targets comparison to avoid misleading diffs and failing syncs.
[#1333](https://github.com/Kong/deck/pull/1333)
[go-database-reconciler #109](https://github.com/Kong/go-database-reconciler/pull/109)
- Make lookups for consumer-group's consumers more performant.
[#1333](https://github.com/Kong/deck/pull/1333)
[go-database-reconciler #102](https://github.com/Kong/go-database-reconciler/pull/102)

## [v1.39.1]

> Release date: 2024/06/28
Expand Down Expand Up @@ -1723,6 +1822,15 @@ No breaking changes have been introduced in this release.

Debut release of decK

[v1.40.3]: https://github.com/Kong/deck/compare/v1.40.2...v1.40.3
[v1.40.2]: https://github.com/Kong/deck/compare/v1.40.1...v1.40.2
[v1.40.1]: https://github.com/Kong/deck/compare/v1.40.0...v1.40.1
[v1.40.0]: https://github.com/Kong/deck/compare/v1.39.6...v1.40.0
[v1.39.6]: https://github.com/Kong/deck/compare/v1.39.5...v1.39.6
[v1.39.5]: https://github.com/Kong/deck/compare/v1.39.4...v1.39.5
[v1.39.4]: https://github.com/Kong/deck/compare/v1.39.3...v1.39.4
[v1.39.3]: https://github.com/Kong/deck/compare/v1.39.2...v1.39.3
[v1.39.2]: https://github.com/kong/deck/compare/v1.39.1...v1.39.2
[v1.39.1]: https://github.com/kong/deck/compare/v1.39.0...v1.39.1
[v1.39.0]: https://github.com/kong/deck/compare/v1.38.1...v1.39.0
[v1.38.1]: https://github.com/kong/deck/compare/v1.38.0...v1.38.1
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.22.4 AS build
FROM golang:1.23.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 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.20.1
FROM alpine:3.20.2
RUN adduser --disabled-password --gecos "" deckuser
RUN apk --no-cache add ca-certificates jq
USER deckuser
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ the GitHub [release page](https://github.com/kong/deck/releases)
or install by downloading the binary:

```shell
$ curl -sL https://github.com/kong/deck/releases/download/v1.37.0/deck_1.37.0_linux_amd64.tar.gz -o deck.tar.gz
$ curl -sL https://github.com/kong/deck/releases/download/v1.40.3/deck_1.40.3_linux_amd64.tar.gz -o deck.tar.gz
$ tar -xf deck.tar.gz -C /tmp
$ sudo cp /tmp/deck /usr/local/bin/
```
Expand All @@ -84,7 +84,7 @@ If you are on Windows, you can download the binary from the GitHub
[release page](https://github.com/kong/deck/releases) or via PowerShell:

```shell
$ curl -sL https://github.com/kong/deck/releases/download/v1.37.0/deck_1.37.0_windows_amd64.tar.gz -o deck.tar.gz
$ curl -sL https://github.com/kong/deck/releases/download/v1.40.3/deck_1.40.3_windows_amd64.tar.gz -o deck.tar.gz
$ tar -xzvf deck.tar.gz
```

Expand Down
Loading

0 comments on commit e07f7b0

Please sign in to comment.