-
Notifications
You must be signed in to change notification settings - Fork 923
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Fabric8 Kubernetes client integration (#5167)
Motivation: Fabric8 is one of the popular Kubernetes client implementations. It has an abstract layer for HTTP and WebSocket protocols. If Armeria provides a Kubernetes client to better support the cloud infrastructure, other useful functions such as #4497 will be able to be implemented based on it. Modifications: - Add `kubernetes` module to provide Fabric `StandardHttpClient`. - `ArmeriaHttpClientFactory` is automatically activated via Java SPI. - Both HTTP and WebSocket clients have been implemented in compliance with Reactive Streams specification. - WebSocket is working over HTTP/1. WebSocket over HTTP/2 is disabled for compatibility. - Forked test suites from the upstream repo. - Miscellaneous) - Allow `ProxyConfig` to configure proxy headers. - Allow `WebSocketClient` to configure `HttpHeaders` and `RequestOptions` when starting a WebSocket session. Result: You can use the Fabric Kubernetes client on top of the Armeria client.
- Loading branch information
Showing
44 changed files
with
2,685 additions
and
28 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,76 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
# The release versions will be verified by 'publish-release.yml' | ||
- armeria-* | ||
pull_request: | ||
|
||
concurrency: | ||
group: ci-e2e-chaos-tests-${{ github.event.pull_request.number || github.sha }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CHAOS_MESH_VERSION: 2.6.2 | ||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} | ||
|
||
jobs: | ||
chaos-tests: | ||
name: Kubernetes Chaos test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
if: github.repository == 'line/armeria' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: setup-jdk-19 | ||
name: Setup Java 19 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: 19 | ||
|
||
- name: Setup Minikube | ||
id: minikube | ||
uses: medyagh/setup-minikube@latest | ||
|
||
- name: Install Chaos Mesh | ||
run: | | ||
curl -sSL https://mirrors.chaos-mesh.org/v${CHAOS_MESH_VERSION}/install.sh | bash | ||
kubectl wait --for=condition=Ready pods --all-namespaces --all --timeout=600s | ||
shell: bash | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: Build Chaos test images | ||
run: | | ||
# The images should be built in the minikube docker environment | ||
eval $(minikube -p minikube docker-env) | ||
./gradlew --no-daemon --stacktrace :it:kubernetes-chaos-tests:k8sBuild | ||
shell: bash | ||
|
||
- name: Run Chaos Tests - network-delay.yaml | ||
env: | ||
CHAOS_TEST: network-delay.yaml | ||
run: | | ||
./gradlew --no-daemon --stacktrace :it:kubernetes-chaos-tests:test | ||
shell: bash | ||
|
||
- name: Run Chaos Tests - network-loss.yaml | ||
env: | ||
CHAOS_TEST: network-loss.yaml | ||
run: | | ||
# --rerun-tasks is required to run the tests because only the environment variable is changed | ||
./gradlew --no-daemon --stacktrace :it:kubernetes-chaos-tests:test --rerun-tasks | ||
shell: bash | ||
|
||
- name: Run Chaos Tests - network-duplicate.yaml | ||
env: | ||
CHAOS_TEST: network-duplicate.yaml | ||
run: | | ||
./gradlew --no-daemon --stacktrace :it:kubernetes-chaos-tests:test --rerun-tasks | ||
shell: bash |
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
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
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
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
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
Oops, something went wrong.