-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into issue-30101
- Loading branch information
Showing
42 changed files
with
1,733 additions
and
220 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,97 @@ | ||
name: Quarkus CI - Istio | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# 2am every weekday + saturday | ||
- cron: '0 2 * * 1-6' | ||
|
||
env: | ||
MAVEN_ARGS: -B -e | ||
|
||
jobs: | ||
cache: | ||
name: Build and save artifacts | ||
runs-on: ubuntu-latest | ||
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Install artifacts | ||
run: ./mvnw ${MAVEN_ARGS} -DskipTests -DskipITs -Dinvoker.skip clean install -pl :quarkus-integration-test-istio-invoker -am | ||
- name: Tar Maven repository | ||
shell: bash | ||
run: tar -I 'pigz -9' -cf maven-repo.tgz -C ~ .m2/repository | ||
- name: Persist Maven repository | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: maven-repo | ||
path: maven-repo.tgz | ||
retention-days: 1 | ||
|
||
kubernetes: | ||
name: Istio + Kubernetes Integration Tests | ||
needs: cache | ||
runs-on: ubuntu-latest | ||
if: "github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch'" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
kubernetes: [v1.20.1] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- name: Download Maven repository | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: maven-repo | ||
path: . | ||
- name: Extract Maven repository | ||
shell: bash | ||
run: tar -xzf maven-repo.tgz -C ~ | ||
- name: Set up Minikube-Kubernetes | ||
uses: manusa/[email protected] | ||
with: | ||
minikube version: v1.16.0 | ||
kubernetes version: ${{ matrix.kubernetes }} | ||
github token: ${{ secrets.GITHUB_TOKEN }} | ||
start args: '--addons=metrics-server --force' | ||
- name: Quay login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_QUARKUSCI_USERNAME }} | ||
password: ${{ secrets.QUAY_QUARKUSCI_PASSWORD }} | ||
- name: Get kubeconfig | ||
id: kubeconfig | ||
run: a="$(cat ~/.kube/config)"; a="${a//'%'/'%25'}"; a="${a//$'\n'/'%0A'}"; a="${a//$'\r'/'%0D'}"; echo "::set-output name=config::$a" | ||
- name: Install Istio | ||
uses: huang195/[email protected] | ||
with: | ||
kubeconfig: "${{steps.kubeconfig.outputs.config}}" | ||
istio version: '1.15.2' | ||
- name: Run Istio Invoker Tests | ||
run: | | ||
export QUARKUS_CONTAINER_IMAGE_GROUP=quarkustesting | ||
export QUARKUS_CONTAINER_IMAGE_TAG=${{ github.sha }} | ||
export QUARKUS_CONTAINER_IMAGE_REGISTRY=quay.io | ||
./mvnw ${MAVEN_ARGS} clean install -pl :quarkus-integration-test-istio-invoker -De2e-tests -Dkubernetes-e2e-tests | ||
- name: Report status | ||
if: "always() && github.repository == 'quarkusio/quarkus'" | ||
shell: bash | ||
run: | | ||
curl -Ls https://sh.jbang.dev | bash -s - app setup | ||
~/.jbang/bin/jbang .github/NativeBuildReport.java \ | ||
issueNumber=29536 \ | ||
runId=${{ github.run_id }} \ | ||
status=${{ job.status }} \ | ||
token=${{ secrets.GITHUB_API_TOKEN }} \ | ||
issueRepo=${{ github.repository }} \ | ||
thisRepo=${{ github.repository }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
//// | ||
This guide is maintained in the main Quarkus repository | ||
and pull requests should be submitted there: | ||
https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc | ||
//// | ||
= Using xDS gRPC | ||
include::_attributes.adoc[] | ||
:categories: serialization | ||
:summary: This page explains how to enable xDS gRPC usage in your Quarkus application. | ||
|
||
This page explains how to enable xDS gRPC usage in your Quarkus application. | ||
|
||
IMPORTANT: This Quarkus xDS gRPC integration currently doesn't support building native executables due to the issues | ||
with shaded grpc-netty library while running native IT tests. | ||
|
||
== Configuring your project | ||
|
||
Edit the `pom.xml` file to add the Quarkus gRPC xDS dependency (just under `<dependencies>`): | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>io.quarkus</groupId> | ||
<artifactId>quarkus-grpc-xds</artifactId> | ||
</dependency> | ||
---- | ||
|
||
NOTE: This transitively adds `io.quarkus:quarkus-grpc` extension dependency. | ||
|
||
== Server configuration | ||
|
||
include::{generated-dir}/config/quarkus-grpc-config-group-config-xds.adoc[opts=optional, leveloffset=+1] | ||
|
||
== Server configuration example | ||
|
||
To enable server xDS, use the following configuration. | ||
|
||
xDS must be explicitly enabled on the server, then verify you use it on the right xDS server port (default is 9000). | ||
If you want to use `XdsServerCredentials` set `xds.secure` to `true`. | ||
|
||
[source,properties] | ||
---- | ||
quarkus.grpc.server.xds.enabled=true | ||
#quarkus.grpc.server.xds.secure=true | ||
quarkus.grpc.server.port=30051 | ||
---- | ||
|
||
NOTE: When xDS is configured, `plain-text` is automatically disabled. | ||
|
||
== Client configuration | ||
|
||
include::{generated-dir}/config/quarkus-grpc-config-group-config-client-xds.adoc[opts=optional, leveloffset=+1] | ||
|
||
NOTE: When xDS target property is used, name resolver, host, and port are not used | ||
|
||
== Client configuration example | ||
|
||
To enable client xDS, use the following configuration. | ||
|
||
You can either explicitly enable xDS or you use `xds` name resolver, | ||
and make sure you point it to the right xDS server port (default is 9000). | ||
If you want to use `XdsChannelCredentials` set `xds.secure` to `true`. | ||
|
||
[source,properties] | ||
---- | ||
#quarkus.grpc.clients.<client-name>.xds.enabled=true | ||
#quarkus.grpc.clients.<client-name>.xds.secure=true | ||
quarkus.grpc.clients.<client-name>.name-resolver=xds | ||
quarkus.grpc.clients.<client-name>.port=30051 | ||
---- | ||
|
||
NOTE: When xDS is configured, `plain-text` is automatically disabled. | ||
|
||
== Kubernetes configuration example | ||
|
||
Below is an example of (required) additional configuration when using xDS gRPC with the Istio Service Mesh in Kubernetes. | ||
|
||
[source,properties] | ||
---- | ||
quarkus.kubernetes.ports.grpc.container-port=30051 | ||
quarkus.kubernetes.annotations."inject.istio.io/templates"=grpc-agent | ||
quarkus.kubernetes.annotations."proxy.istio.io/config"={"holdApplicationUntilProxyStarts": true} | ||
---- |
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.