Skip to content

Commit 3184266

Browse files
committed
Sync documentation of main branch
1 parent c2da7b8 commit 3184266

10 files changed

+258
-30
lines changed

_generated-doc/main/config/quarkus-all-config.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20274,7 +20274,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS+++`
2027420274
endif::add-copy-button-to-env-var[]
2027520275
--
2027620276
|int
20277-
|`20`
20277+
|`40`
2027820278

2027920279
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route[`quarkus.elasticsearch.max-connections-per-route`]##
2028020280
ifdef::add-copy-button-to-config-props[]
@@ -20295,7 +20295,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS_PER_ROUTE+++`
2029520295
endif::add-copy-button-to-env-var[]
2029620296
--
2029720297
|int
20298-
|`10`
20298+
|`20`
2029920299

2030020300
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts[`quarkus.elasticsearch.io-thread-counts`]##
2030120301
ifdef::add-copy-button-to-config-props[]

_generated-doc/main/config/quarkus-elasticsearch-rest-client.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS+++`
173173
endif::add-copy-button-to-env-var[]
174174
--
175175
|int
176-
|`20`
176+
|`40`
177177

178178
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route[`quarkus.elasticsearch.max-connections-per-route`]##
179179
ifdef::add-copy-button-to-config-props[]
@@ -194,7 +194,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS_PER_ROUTE+++`
194194
endif::add-copy-button-to-env-var[]
195195
--
196196
|int
197-
|`10`
197+
|`20`
198198

199199
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts[`quarkus.elasticsearch.io-thread-counts`]##
200200
ifdef::add-copy-button-to-config-props[]

_generated-doc/main/config/quarkus-elasticsearch-rest-client_quarkus.elasticsearch.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS+++`
173173
endif::add-copy-button-to-env-var[]
174174
--
175175
|int
176-
|`20`
176+
|`40`
177177

178178
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-max-connections-per-route[`quarkus.elasticsearch.max-connections-per-route`]##
179179
ifdef::add-copy-button-to-config-props[]
@@ -194,7 +194,7 @@ Environment variable: `+++QUARKUS_ELASTICSEARCH_MAX_CONNECTIONS_PER_ROUTE+++`
194194
endif::add-copy-button-to-env-var[]
195195
--
196196
|int
197-
|`10`
197+
|`20`
198198

199199
a| [[quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts]] [.property-path]##link:#quarkus-elasticsearch-rest-client_quarkus-elasticsearch-io-thread-counts[`quarkus.elasticsearch.io-thread-counts`]##
200200
ifdef::add-copy-button-to-config-props[]

_generated-doc/main/infra/quarkus-all-build-items.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9488,6 +9488,18 @@ Add a page (or section) to the Dev UI. This is typically the middle part of the
94889488
94899489
_No Javadoc found_
94909490

9491+
`java.util.List<LibraryLink> libraryVersions`
9492+
9493+
_No Javadoc found_
9494+
9495+
`java.lang.String darkLogo`
9496+
9497+
_No Javadoc found_
9498+
9499+
`java.lang.String lightLogo`
9500+
9501+
_No Javadoc found_
9502+
94919503

94929504

94939505

_versions/main/guides/_attributes.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
:mandrel-flavor: jdk-21
1212
:surefire-version: 3.5.3
1313
:gradle-version: 8.14
14-
:elasticsearch-version: 8.18.2
15-
:elasticsearch-image: docker.io/elastic/elasticsearch:8.18.2
16-
:opensearch-image: docker.io/opensearchproject/opensearch:2.16.0
14+
:elasticsearch-version: 9.0.2
15+
:elasticsearch-image: docker.io/elastic/elasticsearch:9.0.2
16+
:opensearch-image: docker.io/opensearchproject/opensearch:3.0.0
1717
:infinispan-version: ${infinispan.version}
1818
:infinispan-protostream-version: ${infinispan.protostream.version}
19-
:logstash-image: docker.io/elastic/logstash:8.18.2
20-
:kibana-image: docker.io/elastic/kibana:8.18.2
19+
:logstash-image: docker.io/elastic/logstash:9.0.2
20+
:kibana-image: docker.io/elastic/kibana:9.0.2
2121
:keycloak-docker-image: quay.io/keycloak/keycloak:26.2.4
2222
:jandex-version: 3.3.1
2323
:jandex-gradle-plugin-version: 1.0.0
@@ -27,10 +27,10 @@
2727
:gcf-invoker-version: 1.4.1
2828
// Cannot simply use the name 'hibernate-*-version' here as it somehow gets
2929
// overridden to the full version, at least when building locally.
30-
:hibernate-orm-version-major-minor: 6.6
31-
:hibernate-search-version-major-minor: 7.2
30+
:hibernate-orm-version-major-minor: 7.0
31+
:hibernate-search-version-major-minor: 8.0
3232
:hibernate-validator-version-major-minor: 9.0
33-
:jakarta-persistence-version-major-minor: 3.1
33+
:jakarta-persistence-version-major-minor: 3.2
3434
// .
3535
:quarkus-home-url: https://quarkus.io
3636
:quarkus-org-url: https://github.com/quarkusio

_versions/main/guides/hibernate-orm.adoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -515,14 +515,17 @@ HibernateCriteriaBuilder hibernateCriteriaBuilder;
515515
Metamodel metamodel;
516516
517517
@Inject
518-
Cache cache;
518+
jakarta.persistence.Cache cache;
519519
520520
@Inject
521521
org.hibernate.Cache cache;
522522
523523
@Inject
524524
jakarta.persistence.PersistenceUnitUtil persistenceUnitUtil;
525525
526+
@Inject
527+
jakarta.persistence.SchemaManager schemaManager;
528+
526529
@Inject
527530
org.hibernate.relational.SchemaManager schemaManager;
528531
----
@@ -1692,8 +1695,8 @@ section of the Hibernate Validator guide for more details.
16921695
== Static metamodel and Jakarta Data
16931696

16941697
Both static metamodel and Jakarta Data capabilities of Hibernate ORM are available in Quarkus
1695-
through the `hibernate-jpamodelgen` annotation processor. Since it is an annotation processor,
1696-
you must configure the annotation processor in your build tool:
1698+
through the `hibernate-processor` annotation processor. Since it is an annotation processor,
1699+
you must configure it accordingly in your build tool:
16971700

16981701
[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
16991702
.pom.xml
@@ -1704,7 +1707,7 @@ you must configure the annotation processor in your build tool:
17041707
<annotationProcessorPaths>
17051708
<path>
17061709
<groupId>org.hibernate.orm</groupId>
1707-
<artifactId>hibernate-jpamodelgen</artifactId>
1710+
<artifactId>hibernate-processor</artifactId>
17081711
<!-- Note, no artifact version is required, it's managed by Quarkus. -->
17091712
</path>
17101713
<!-- other processors that may be required by your app -->
@@ -1718,9 +1721,9 @@ you must configure the annotation processor in your build tool:
17181721
.build.gradle
17191722
----
17201723
// Enforce the version management of your annotation processor dependencies,
1721-
// so that there's no need to define an explicit version of the hibernate-jpamodelgen
1724+
// so that there's no need to define an explicit version of the hibernate-processor
17221725
annotationProcessor enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
1723-
annotationProcessor 'org.hibernate.orm:hibernate-jpamodelgen'
1726+
annotationProcessor 'org.hibernate.orm:hibernate-processor'
17241727
----
17251728

17261729
=== Static metamodel
@@ -1757,7 +1760,7 @@ For a more detailed overview of static metamodel, please refer to the link:{jaka
17571760

17581761
=== Jakarta Data
17591762

1760-
Jakarta Data requires, besides having the `hibernate-jpamodelgen` annotation processor in place, one extra dependency to be added:
1763+
Jakarta Data requires, besides having the `hibernate-processor` annotation processor in place, one extra dependency to be added:
17611764

17621765
[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
17631766
.pom.xml

_versions/main/guides/hibernate-search-orm-elasticsearch.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ quarkus.datasource.db-kind=postgresql <1>
631631
632632
quarkus.hibernate-orm.sql-load-script=import.sql <2>
633633
634-
quarkus.hibernate-search-orm.elasticsearch.version=8 <3>
634+
quarkus.hibernate-search-orm.elasticsearch.version=9 <3>
635635
quarkus.hibernate-search-orm.indexing.plan.synchronization.strategy=sync <4>
636636
637637
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/quarkus_test
@@ -820,7 +820,7 @@ as shown below.
820820

821821
[source,properties]
822822
----
823-
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:2.16
823+
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:3.0
824824
----
825825

826826
All other configuration options and APIs are exactly the same as with Elasticsearch.
@@ -850,7 +850,7 @@ quarkus.datasource.db-kind=h2
850850
quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1
851851
852852
quarkus.hibernate-search-orm.elasticsearch.hosts=es1.mycompany.com:9200
853-
quarkus.hibernate-search-orm.elasticsearch.version=8
853+
quarkus.hibernate-search-orm.elasticsearch.version=9
854854
----
855855

856856
Using a map based approach, it is also possible to configure named persistence units:
@@ -870,10 +870,10 @@ quarkus.hibernate-orm."inventory".datasource=inventory <4>
870870
quarkus.hibernate-orm."inventory".packages=org.acme.model.inventory
871871
872872
quarkus.hibernate-search-orm."users".elasticsearch.hosts=es1.mycompany.com:9200 <5>
873-
quarkus.hibernate-search-orm."users".elasticsearch.version=8
873+
quarkus.hibernate-search-orm."users".elasticsearch.version=9
874874
875875
quarkus.hibernate-search-orm."inventory".elasticsearch.hosts=es2.mycompany.com:9200 <6>
876-
quarkus.hibernate-search-orm."inventory".elasticsearch.version=8
876+
quarkus.hibernate-search-orm."inventory".elasticsearch.version=9
877877
----
878878
<1> Define a datasource named `users`.
879879
<2> Define a datasource named `inventory`.

_versions/main/guides/hibernate-search-standalone-elasticsearch.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ Edit `src/main/resources/application.properties` and inject the following config
560560
[source,properties]
561561
----
562562
quarkus.hibernate-search-standalone.mapping.structure=document <1>
563-
quarkus.hibernate-search-standalone.elasticsearch.version=8 <2>
563+
quarkus.hibernate-search-standalone.elasticsearch.version=9 <2>
564564
quarkus.hibernate-search-standalone.indexing.plan.synchronization.strategy=sync <3>
565565
566566
%prod.quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:9200 <4>
@@ -738,7 +738,7 @@ as shown below.
738738

739739
[source,properties]
740740
----
741-
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:2.16
741+
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:3.0
742742
----
743743

744744
All other configuration options and APIs are exactly the same as with Elasticsearch.

_versions/main/guides/kubernetes-client.adoc

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ subjects:
435435
Replace `<applicationName>` and `<namespace>` with your values.
436436
Have a look at https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/[Configure Service Accounts for Pods] to get further information.
437437

438+
[[openshift-client]]
438439
== OpenShift Client
439440

440441
If the targeted Kubernetes cluster is an OpenShift cluster, it is possible to access it through
@@ -513,6 +514,126 @@ To use this feature, you have to add a dependency on `quarkus-test-kubernetes-cl
513514
testImplementation("io.quarkus:quarkus-test-kubernetes-client")
514515
----
515516

517+
[[optimizing-native-image]]
518+
== Optimizing the Native Image
519+
520+
The Kubernetes and OpenShift client extensions aim to provide a great *developer experience* while enabling the client to work in *native mode*.
521+
When building a native image, the Kubernetes Client extension will register all the accessible Kubernetes model classes for reflection.
522+
Unfortunately, this can lead to large native image sizes and longer build times.
523+
524+
Once you've completed your application implementation, if you want to distribute and deploy your application as a *native image*, you should consider reducing its size by following these guidelines.
525+
526+
=== Use the Kubernetes Client extension
527+
528+
The <<openshift-client, OpenShift Client>> provides domain-specific language (DSL) accessors to common OpenShift resources.
529+
In addition, the extension supplies the necessary project configuration to bring in the OpenShift model type modules.
530+
531+
In JVM mode, this works great because, as a developer, you don't need to worry about the configuration.
532+
However, in native mode, by depending on the OpenShift extension you're bringing in many resources that your application might not need unnecessarily increasing its size.
533+
534+
In this context, it's better to depend only on what you need, by adding a dependency to the Kubernetes Client extension and only the minimum OpenShift model dependencies:
535+
536+
[source,xml,role="primary asciidoc-tabs-target-sync-maven"]
537+
.pom.xml
538+
----
539+
<dependency>
540+
<groupId>io.quarkus</groupId>
541+
<artifactId>quarkus-kubernetes-client</artifactId>
542+
</dependency>
543+
<dependency>
544+
<groupId>io.fabric8</groupId>
545+
<artifactId>openshift-model</artifactId>
546+
</dependency>
547+
----
548+
549+
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
550+
.build.gradle
551+
----
552+
implementation("io.quarkus:quarkus-kubernetes-client")
553+
implementation("io.fabric8:openshift-model")
554+
----
555+
556+
The OpenShift-specific DSL accessors won't be available since you'll now have a Bean of type `KubernetesClient` instead of `OpenShiftClient`.
557+
However, the Fabric8 Kubernetes Client provides generic entry-points to perform operations on any resource:
558+
559+
[source%nowrap,java]
560+
----
561+
// List OpenShift Routes in any namespace
562+
kubernetesClient
563+
.resources(io.fabric8.openshift.api.model.Route.class)
564+
.inAnyNamespace().list();
565+
// Delete an OpenShift Route
566+
kubernetesClient
567+
.resources(io.fabric8.openshift.api.model.Route.class)
568+
.inNamespace("default").withName("the-route").delete();
569+
// Create or replace a new OpenShift Route
570+
kubernetesClient
571+
.resource(new RouteBuilder()/* ... */.build())
572+
.inNamespace("default").createOr(NonDeletingOperation::update);
573+
----
574+
575+
=== Depend only on the modules you need
576+
577+
The Kubernetes Client extension has transitive dependencies to all of the vanilla Kubernetes API model types.
578+
This is very convenient in JVM mode, since you don't need to worry about configuring the project.
579+
580+
However, in native mode, this implies registering for reflection model types that you very likely won't use in your application.
581+
You can mitigate this by providing a more granular project configuration and depending only on those models you are sure the application uses.
582+
583+
[source,xml,role="primary asciidoc-tabs-target-sync-maven"]
584+
.pom.xml
585+
----
586+
<dependency>
587+
<groupId>io.quarkus</groupId>
588+
<artifactId>quarkus-kubernetes-client</artifactId>
589+
</dependency>
590+
<dependency>
591+
<groupId>io.fabric8</groupId>
592+
<artifactId>kubernetes-client-api</artifactId>
593+
<!-- Exclude all transitive dependencies -->
594+
<exclusions>
595+
<exclusion>
596+
<groupId>io.fabric8</groupId>
597+
<artifactId>*</artifactId>
598+
</exclusion>
599+
</exclusions>
600+
</dependency>
601+
<!-- Include only those that make sense for your application -->
602+
<dependency>
603+
<groupId>io.fabric8</groupId>
604+
<artifactId>kubernetes-client</artifactId>
605+
</dependency>
606+
<dependency>
607+
<groupId>io.fabric8</groupId>
608+
<artifactId>kubernetes-model-core</artifactId>
609+
</dependency>
610+
<dependency>
611+
<groupId>io.fabric8</groupId>
612+
<artifactId>kubernetes-model-admissionregistration</artifactId>
613+
</dependency>
614+
<dependency>
615+
<groupId>io.fabric8</groupId>
616+
<artifactId>kubernetes-model-apps</artifactId>
617+
</dependency>
618+
<!-- ... -->
619+
----
620+
621+
[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
622+
.build.gradle
623+
----
624+
implementation("quarkus-kubernetes-client")
625+
implementation("io.fabric8:kubernetes-client-api") {
626+
// Exclude all transitive dependencies
627+
exclude group: "io.fabric8"
628+
}
629+
// Include only those that make sense for your application
630+
implementation("io.fabric8:kubernetes-client")
631+
implementation("io.fabric8:kubernetes-model-core")
632+
implementation("io.fabric8:kubernetes-model-admissionregistration")
633+
implementation("io.fabric8:kubernetes-model-apps")
634+
// ...
635+
----
636+
516637
== Configuration Reference
517638

518639
include::{generated-dir}/config/quarkus-kubernetes-client.adoc[opts=optional, leveloffset=+1]

0 commit comments

Comments
 (0)