From ba03a753eb369080c1538b0b998c55e51f700c5e Mon Sep 17 00:00:00 2001 From: Jeff Mesnil Date: Wed, 27 Nov 2024 15:08:02 +0100 Subject: [PATCH] Support JDK 21 images for S2I JDK 17 remains the default. Signed-off-by: Jeff Mesnil --- charts/eap-xp6/README.md | 8 +++++--- charts/eap-xp6/templates/_helpers.tpl | 6 ++++++ charts/eap-xp6/values.schema.json | 20 +++++++++++++++++--- charts/eap-xp6/values.yaml | 3 +++ 4 files changed, 31 insertions(+), 6 deletions(-) diff --git a/charts/eap-xp6/README.md b/charts/eap-xp6/README.md index 9ffa863..9e56684 100644 --- a/charts/eap-xp6/README.md +++ b/charts/eap-xp6/README.md @@ -138,9 +138,11 @@ If the application image has been built by another mechanism, you can skip the b | `build.s2i.galleonDir` | Directory relative to the root directory for the build that contains custom content for Galleon. | - | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | | `build.s2i.featurePacks` | List of additional Galleon feature-packs identified by Maven coordinates (`::`) | - | The value can be be either a `string` with a list of comma-separated Maven coordinate or an array where each item is the Maven coordinate of a feature pack - [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | | `build.s2i.channels` | List of Channels identified by Maven coordinates (`:`). If featurePacks are configured without any versioning, the channels that provides the latest feature packs can be specified. Deprecated, the recommended way to provision EAP is to use the eap-maven-plugin in the application pom.xml | - | The value can be be either a `string` with a list of comma-separated Maven coordinate or an array where each item is the Maven coordinate of a channel - [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | -| `build.s2i.jdk` | JDK Version of the EAP S2I images | `"17"` | Allowed Values: `"17"` | -| `build.s2i.jdk17.builderImage` | EAP S2I Builder image for JDK 17 | `registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk17-builder-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.0/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | -| `build.s2i.jdk17.runtimeImage` | EAP S2I Runtime image for JDK 17| `registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-runtime-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.0/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | +| `build.s2i.jdk` | JDK Version of the EAP S2I images | `"17"` | Allowed Values: `"17", "21"` | +| `build.s2i.jdk17.builderImage` | EAP S2I Builder image for JDK 17 | `registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk17-builder-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.1/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | +| `build.s2i.jdk17.runtimeImage` | EAP S2I Runtime image for JDK 17| `registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk17-runtime-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.1/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | +| `build.s2i.jdk17.builderImage` | EAP S2I Builder image for JDK 21 | `registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk21-builder-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.1/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | +| `build.s2i.jdk17.runtimeImage` | EAP S2I Runtime image for JDK 21| `registry.redhat.io/jboss-eap-8-tech-preview/eap8-openjdk21-runtime-openshift-rhel9:latest` | [EAP Documentation](https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/8.1/html/getting_started_with_jboss_eap_for_openshift_container_platform/index) | | `build.s2i.kind` | Determines the type of images for S2I Builder and Runtime images (`DockerImage`, `ImageStreamTag` or `ImageStreamImage`) | `DockerImage` | [OKD Documentation](https://docs.okd.io/latest/cicd/builds/build-strategies.html#builds-strategy-s2i-build_build-strategies) | | `build.s2i.runtimeKind` | Determines the type of images for S2I Runtime image (`DockerImage`, `ImageStreamTag` or `ImageStreamImage`) | the value of `build.s2i.kind` | [OKD Documentation](https://docs.okd.io/latest/cicd/)| | `build.sourceSecret`|Name of the secret containing the credentials to login to Git source reposiory | - | The secret must exist in the same namespace or the chart will fail to install - [OKD documentation](https://docs.okd.io/latest/cicd/builds/creating-build-inputs.html#builds-manually-add-source-clone-secrets_creating-build-inputs) | diff --git a/charts/eap-xp6/templates/_helpers.tpl b/charts/eap-xp6/templates/_helpers.tpl index 53a145c..db017c9 100644 --- a/charts/eap-xp6/templates/_helpers.tpl +++ b/charts/eap-xp6/templates/_helpers.tpl @@ -4,7 +4,10 @@ eap-xp.eapBuilderImage corresponds to the imagestream for the EAP S2I Builder im It depends on the build.s2i.jdk version. */}} {{- define "eap-xp.eapBuilderImage" -}} +{{- if eq .Values.build.s2i.jdk "17" -}} {{ .Values.build.s2i.jdk17.builderImage}} +{{- else -}} +{{ .Values.build.s2i.jdk21.builderImage}} {{- end -}} {{/* @@ -12,7 +15,10 @@ eap-xp.eapRuntimeImage corresponds to the imagestream for the EAP S2I Runtime im It depends on the build.s2i.jdkVersion. */}} {{- define "eap-xp.eapRuntimeImage" -}} +{{- if eq .Values.build.s2i.jdk "17" -}} {{ .Values.build.s2i.jdk17.runtimeImage}} +{{- else -}} +{{ .Values.build.s2i.jdk21.builderImage}} {{- end -}} {{/* diff --git a/charts/eap-xp6/values.schema.json b/charts/eap-xp6/values.schema.json index d1570eb..413cdad 100644 --- a/charts/eap-xp6/values.schema.json +++ b/charts/eap-xp6/values.schema.json @@ -234,7 +234,7 @@ "jdk": { "description": "JDK Version of the EAP S2I images", "type": "string", - "enum": ["17"], + "enum": ["17", "21"], "default": "17" }, "jdk17": { @@ -248,9 +248,23 @@ "runtimeImage": { "description": "EAP S2I Runtime image for JDK 17", "type": "string" - } } - }, + } + }, + "jdk21": { + "description": "EAP S2I images for JDK 21", + "type": "object", + "properties": { + "builderImage": { + "description": "EAP S2I Builder image for JDK 21", + "type": "string" + }, + "runtimeImage": { + "description": "EAP S2I Runtime image for JDK 21", + "type": "string" + } + } + }, "buildApplicationImage": { "description": "Determine if the application image must be built. If false, the Helm release will build the first artifact image (with the name of the Helm release)", "type": "boolean", diff --git a/charts/eap-xp6/values.yaml b/charts/eap-xp6/values.yaml index 766ff79..6b06316 100644 --- a/charts/eap-xp6/values.yaml +++ b/charts/eap-xp6/values.yaml @@ -16,6 +16,9 @@ build: jdk17: builderImage: registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk17-builder-openshift-rhel9:latest runtimeImage: registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk17-runtime-openshift-rhel9:latest + jdk21: + builderImage: registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk21-builder-openshift-rhel9:latest + runtimeImage: registry.redhat.io/jboss-eap-8-tech-preview/eap81-openjdk21-runtime-openshift-rhel9:latest output: kind: "ImageStreamTag" triggers: {}