Use JDK17 features to simplify code with multiline strings (#27495)

Closes #27494

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2024-03-05 09:37:38 +01:00 committed by GitHub
parent 6851f14401
commit bba701437f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 51 additions and 48 deletions

View file

@ -17,9 +17,9 @@
<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.release>11</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<quarkus.container-image.group>keycloak</quarkus.container-image.group>

View file

@ -77,43 +77,44 @@ import io.quarkiverse.operatorsdk.annotations.SharedCSVMetadata;
capabilities = "Deep Insights",
categories = "Security",
certified = false,
// language=JSON
almExamples =
"[\n" +
" {\n" +
" \"apiVersion\": \"k8s.keycloak.org/v2alpha1\",\n" +
" \"kind\": \"Keycloak\",\n" +
" \"metadata\": {\n" +
" \"name\": \"example-keycloak\",\n" +
" \"labels\": {\n" +
" \"app\": \"sso\"\n" +
" }\n" +
" },\n" +
" \"spec\": {\n" +
" \"instances\": 1,\n" +
" \"hostname\": {\n" +
" \"hostname\": \"example.org\"\n" +
" },\n" +
" \"http\": {\n" +
" \"tlsSecret\": \"my-tls-secret\"\n" +
" }\n" +
" }\n" +
" },\n" +
" {\n" +
" \"apiVersion\": \"k8s.keycloak.org/v2alpha1\",\n" +
" \"kind\": \"KeycloakRealmImport\",\n" +
" \"metadata\": {\n" +
" \"name\": \"example-keycloak-realm-import\",\n" +
" \"labels\": {\n" +
" \"app\": \"sso\"\n" +
" }\n" +
" },\n" +
" \"spec\": {\n" +
" \"keycloakCRName\": \"example-keycloak\",\n" +
" \"realm\": {}\n" +
" }\n" +
" }\n" +
"]",
// language=JSON
"""
[
{
"apiVersion": "k8s.keycloak.org/v2alpha1",
"kind": "Keycloak",
"metadata": {
"name": "example-keycloak",
"labels": {
"app": "sso"
}
},
"spec": {
"instances": 1,
"hostname": {
"hostname": "example.org"
},
"http": {
"tlsSecret": "my-tls-secret"
}
}
},
{
"apiVersion": "k8s.keycloak.org/v2alpha1",
"kind": "KeycloakRealmImport",
"metadata": {
"name": "example-keycloak-realm-import",
"labels": {
"app": "sso"
}
},
"spec": {
"keycloakCRName": "example-keycloak",
"realm": {}
}
}
]""",
others = {
@CSVMetadata.Annotations.Annotation(
name = "support",
@ -126,15 +127,17 @@ import io.quarkiverse.operatorsdk.annotations.SharedCSVMetadata;
}
),
description =
"A Kubernetes Operator based on the Operator SDK for installing and managing Keycloak.\n" +
"\n" +
"Keycloak lets you add authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.\n" +
"\n" +
"The operator can deploy and manage Keycloak instances on Kubernetes and OpenShift.\n" +
"The following features are supported:\n" +
"\n" +
"* Install Keycloak to a namespace\n" +
"* Import Keycloak Realms\n",
"""
A Kubernetes Operator based on the Operator SDK for installing and managing Keycloak.
Keycloak lets you add authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.
The operator can deploy and manage Keycloak instances on Kubernetes and OpenShift.
The following features are supported:
* Install Keycloak to a namespace
* Import Keycloak Realms
""",
icon = @CSVMetadata.Icon(
fileName = "KeycloakController.icon.png",
mediatype = "image/png"