You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
summary: Secure HTTP access to Jakarta REST (formerly known as JAX-RS) endpoints in your application with Bearer authentication by using the Quarkus OpenID Connect (OIDC) extension.
summary: "To protect your web applications, you can use the authorization code flow mechanism provided by the Quarkus OpenID Connect (OIDC) extension."
summary: "With the Quarkus OpenID Connect (OIDC) extension, you can protect application HTTP endpoints by using the OIDC Authorization Code Flow mechanism."
summary: Secure your Quarkus application endpoints by combining the built-in Quarkus Basic authentication with the Jakarta Persistence identity provider to enable role-based access control (RBAC).
summary: This reference guide explains how to enable AppCDS with Quarkus.
348
-
categories: "cloud, core"
348
+
categories: "core, cloud"
349
349
type: guide
350
350
url: /guides/appcds
351
351
- title: Application Data Caching
@@ -484,7 +484,7 @@ types:
484
484
- title: Deploying on OpenShift
485
485
filename: deploying-to-openshift.adoc
486
486
summary: This guide covers how to deploy a native application on OpenShift.
487
-
categories: "native, cloud"
487
+
categories: "cloud, native"
488
488
id: deploy-openshift
489
489
type: guide
490
490
url: /guides/deploying-to-openshift
@@ -751,7 +751,7 @@ types:
751
751
- title: Kubernetes extension
752
752
filename: deploying-to-kubernetes.adoc
753
753
summary: This guide covers how to deploy a native application on Kubernetes.
754
-
categories: "native, cloud"
754
+
categories: "cloud, native"
755
755
id: deploy-kubernetes
756
756
type: guide
757
757
url: /guides/deploying-to-kubernetes
@@ -961,7 +961,7 @@ types:
961
961
- title: Simplified Hibernate ORM with Panache and Kotlin
962
962
filename: hibernate-orm-panache-kotlin.adoc
963
963
summary: This explains the specifics of using Hibernate ORM with Panache in a Kotlin project.
964
-
categories: "data, alt-languages"
964
+
categories: "alt-languages, data"
965
965
type: guide
966
966
url: /guides/hibernate-orm-panache-kotlin
967
967
- title: Simplified Hibernate Reactive with Panache
@@ -979,13 +979,13 @@ types:
979
979
- title: Simplified MongoDB with Panache and Kotlin
980
980
filename: mongodb-panache-kotlin.adoc
981
981
summary: This guide covers the usage of MongoDB using active records and repositories in a Kotlin project.
982
-
categories: "data, alt-languages"
982
+
categories: "alt-languages, data"
983
983
type: guide
984
984
url: /guides/mongodb-panache-kotlin
985
985
- title: SmallRye Fault Tolerance
986
986
filename: smallrye-fault-tolerance.adoc
987
987
summary: This guide demonstrates how your Quarkus application can utilize the SmallRye Fault Tolerance specification through the SmallRye Fault Tolerance extension.
988
-
categories: "web, observability"
988
+
categories: "observability, web"
989
989
type: guide
990
990
url: /guides/smallrye-fault-tolerance
991
991
- title: SmallRye GraphQL
@@ -1015,14 +1015,14 @@ types:
1015
1015
- title: Testing Your Application
1016
1016
filename: getting-started-testing.adoc
1017
1017
summary: "This guide covers testing in JVM mode, native mode, and injection of resources into tests"
1018
-
categories: "tooling, native, core"
1018
+
categories: "tooling, core, native"
1019
1019
id: testing
1020
1020
type: guide
1021
1021
url: /guides/getting-started-testing
1022
1022
- title: Tips for writing native applications
1023
1023
filename: writing-native-applications-tips.adoc
1024
1024
summary: This guide is a collection of tips to help you solve the problems you encounter when compiling applications to native executable.
1025
-
categories: "native, core, writing-extensions"
1025
+
categories: "writing-extensions, core, native"
1026
1026
type: guide
1027
1027
url: /guides/writing-native-applications-tips
1028
1028
- title: Update projects to the latest version of Quarkus
@@ -1158,7 +1158,7 @@ types:
1158
1158
- title: Using SSL With Native Executables
1159
1159
filename: native-and-ssl.adoc
1160
1160
summary: "In this guide, we will discuss how you can get your native images to support SSL, as native images don't support it out of the box."
1161
-
categories: "native, security, core"
1161
+
categories: "security, core, native"
1162
1162
type: guide
1163
1163
url: /guides/native-and-ssl
1164
1164
- title: Using Security with .properties File
@@ -1265,7 +1265,7 @@ types:
1265
1265
- title: Validation with Hibernate Validator
1266
1266
filename: validation.adoc
1267
1267
summary: This guide covers how to use Hibernate Validator/Bean Validation in your REST services.
Copy file name to clipboardExpand all lines: _versions/main/guides/kubernetes-client.adoc
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ In dev mode and when running tests, xref:kubernetes-dev-services.adoc[Dev Servic
61
61
62
62
Quarkus provides multiple integration points for influencing the Kubernetes Client provided as a CDI bean.
63
63
64
+
==== Kubernetes Client Config customization
65
+
64
66
The first integration point is the use of the `io.quarkus.kubernetes.client.KubernetesConfigCustomizer` interface. When such a bean exists,
65
67
it allows for arbitrary customizations of the `io.fabric8.kubernetes.client.Config` created by Quarkus (which takes into account the `quarkus.kubernetes-client.*` properties).
66
68
@@ -82,6 +84,47 @@ public class KubernetesClientProducer {
82
84
}
83
85
----
84
86
87
+
==== Kubernetes Client ObjectMapper customization
88
+
89
+
The Fabric8 Kubernetes Client uses its own `ObjectMapper` instance for serialization and deserialization of Kubernetes resources.
90
+
This mapper is provided to the client through a `KubernetesSerialization` instance that's injected into
91
+
the `KubernetesClient` bean.
92
+
93
+
If for some reason you must customize the default `ObjectMapper` bean provided by this extension and used by the Kubernetes Client, you can do so by declaring a bean that implements the `KubernetesClientObjectMapperCustomizer` interface.
94
+
95
+
The following code snippet contains an example of a `KubernetesClientObjectMapperCustomizer` to set the `ObjectMapper` locale:
96
+
97
+
[source,java]
98
+
----
99
+
@Singleton
100
+
public static class Customizer implements KubernetesClientObjectMapperCustomizer {
101
+
@Override
102
+
public void customize(ObjectMapper objectMapper) {
103
+
objectMapper.setLocale(Locale.ROOT);
104
+
}
105
+
}
106
+
----
107
+
108
+
Furthermore, if you must replace the default `ObjectMapper` bean used by the Kubernetes Client that the extension creates automatically, you can do so by declaring a bean of type `@KubernetesClientObjectMapper`.
109
+
The following code snippet shows how you can declare this bean:
110
+
111
+
[source,java]
112
+
----
113
+
@Singleton
114
+
public class KubernetesObjectMapperProducer {
115
+
@KubernetesClientObjectMapper
116
+
@Singleton
117
+
@Produces
118
+
public ObjectMapper kubernetesClientObjectMapper() {
119
+
return new ObjectMapper();
120
+
}
121
+
}
122
+
----
123
+
124
+
125
+
WARNING: The static `io.fabric8.kubernetes.client.utils.Serialization` utils class is deprecated and should not be used.
126
+
Access to `Serialization.jsonMapper()` should be replaced by the usage of @KubernetesClientObjectMapperCustomizer` declared beans.
127
+
85
128
== Testing
86
129
87
130
To make testing against a mock Kubernetes API extremely simple, Quarkus provides the `WithKubernetesTestServer` annotation which automatically launches
0 commit comments