-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial commit for the Kheper mock Kong Gateway data plane nodes
- Simulates Kong Gateway data plane node connections to a control plane using multiple WebSocket protocols - Supports both standard and JSON RPC protocols - Manages connections, pings, and configuration updates - Enables communication with multiple control planes for cross-region/environment testing - Offers simple configuration through YAML files or environment variables - Exposes a RESTful API for inspecting the configuration of each node - Supports the simulation of extensive network loads by creating thousands of mock Kong Gateway data plane nodes - Compatible with both OSS and Enterprise versions of Kong Gateway
- Loading branch information
0 parents
commit 6e587d2
Showing
43 changed files
with
6,537 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Lint | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/lint.yml' | ||
- 'docker/**' | ||
- 'docs/**' | ||
- 'mk/**' | ||
- '.gitignore' | ||
- 'kheper.yml' | ||
- 'LICENSE' | ||
- 'Makefile' | ||
- 'README.md' | ||
- 'version' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/lint.yml' | ||
- 'docker/**' | ||
- 'docs/**' | ||
- 'mk/**' | ||
- '.gitignore' | ||
- 'kheper.yml' | ||
- 'LICENSE' | ||
- 'Makefile' | ||
- 'README.md' | ||
- 'version' | ||
permissions: | ||
contents: read | ||
pull-requests: read | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest | ||
- name: install reodcly | ||
run: npm install -g @redocly/cli@latest | ||
- name: redocly-lint | ||
run: redocly lint --config redocly.yml --format=github-actions openapi.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Test | ||
env: | ||
KHEPER_TEST_WAIT_FOR: 500ms | ||
KHEPER_TEST_WAIT_FOR_CAPTURE: 100ms | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/test_and_coverage.yml' | ||
- 'docker/**' | ||
- 'docs/**' | ||
- 'mk/**' | ||
- '.gitignore' | ||
- '.golangci.yml' | ||
- '.header' | ||
- 'kheper.yml' | ||
- 'LICENSE' | ||
- 'Makefile' | ||
- 'openapi.yml' | ||
- 'README.md' | ||
- 'redocly.yml' | ||
- 'version' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/workflows/**' | ||
- '!.github/workflows/test_and_coverage.yml' | ||
- 'docker/**' | ||
- 'docs/**' | ||
- 'mk/**' | ||
- '.gitignore' | ||
- '.golangci.yml' | ||
- '.header' | ||
- 'kheper.yml' | ||
- 'LICENSE' | ||
- 'Makefile' | ||
- 'openapi.yml' | ||
- 'README.md' | ||
- 'redocly.yml' | ||
- 'version' | ||
permissions: | ||
contents: read | ||
pull-requests: read | ||
jobs: | ||
test: | ||
name: Test and Coverage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
# TODO(fero): remove gofumpt after removing make test-coverage | ||
- uses: luisnquin/setup-gofumpt@v2 | ||
- name: Test with Coverage | ||
run: make test-coverage | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./coverage.out | ||
name: kheper | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
slug: mikefero/kheper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vscode | ||
bin | ||
|
||
coverage.html | ||
coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
run: | ||
timeout: 5m | ||
|
||
issues: | ||
exclude-files: | ||
- "_test.go" | ||
|
||
linters-settings: | ||
goheader: | ||
values: | ||
regexp: | ||
COPYRIGHT-HOLDER: Copyright © {{ MOD-YEAR-RANGE }} Michael Fero | ||
template-path: .header | ||
|
||
linters: | ||
enable: | ||
- asciicheck | ||
- bidichk | ||
- decorder | ||
- dogsled | ||
- dupl | ||
- errname | ||
- errorlint | ||
- exhaustive | ||
- exportloopref | ||
- forbidigo | ||
- forcetypeassert | ||
- gci | ||
- goconst | ||
- gocritic | ||
- godot | ||
- gofmt | ||
- gofumpt | ||
- goheader | ||
- goimports | ||
- goprintffuncname | ||
- gosec | ||
- grouper | ||
- importas | ||
- lll | ||
- misspell | ||
- nakedret | ||
- nestif | ||
- nilnil | ||
- nolintlint | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- stylecheck | ||
- tenv | ||
- thelper | ||
- unconvert | ||
- whitespace | ||
- wrapcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ COPYRIGHT-HOLDER }} | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.DEFAULT_GOAL := test | ||
|
||
# Ensure golang is available | ||
ifeq (, $(shell which go 2> /dev/null)) | ||
$(error "'go' is not installed or available in PATH") | ||
endif | ||
|
||
APP_NAME := kheper | ||
APP_DIR := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) | ||
APP_WORKDIR := $(shell pwd) | ||
|
||
include $(APP_DIR)/mk/build.mk | ||
include $(APP_DIR)/mk/common.mk | ||
include $(APP_DIR)/mk/docker.mk | ||
include $(APP_DIR)/mk/test.mk | ||
include $(APP_DIR)/mk/tools.mk |
Oops, something went wrong.