From cf0306f0a9680754a54b6a126163afafa0ed02b2 Mon Sep 17 00:00:00 2001 From: sudeshnas93 Date: Tue, 5 Sep 2023 21:24:56 +0530 Subject: [PATCH] [JBEAP-24939]JDK 17 Support for XP 4 Helm Charts --- charts/eap-xp4/README.md | 6 ++++-- charts/eap-xp4/templates/_helpers.tpl | 11 +++++++++-- charts/eap-xp4/values.schema.json | 15 ++++++++++++++- charts/eap-xp4/values.yaml | 3 +++ 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/charts/eap-xp4/README.md b/charts/eap-xp4/README.md index d368548..ff18fd3 100644 --- a/charts/eap-xp4/README.md +++ b/charts/eap-xp4/README.md @@ -77,9 +77,11 @@ The configuration to build the application image is configured in a `build` sect | `build.triggers.genericSecret`| Name of the secret containing the WebHookSecretKey for the Generic Webhook | - | The secret must exist in the same namespace or the chart will fail to install - [OpenShift documentation](https://docs.openshift.com/container-platform/latest/cicd/builds/triggering-builds-build-hooks.html#builds-webhook-triggers_triggering-builds-build-hooks) | | `build.s2i` | Configuration specific to building with EAP S2I images | - | - | | `build.s2i.version` | Version of the EAP S2I images | Defaults to this chart `AppVersion` | - | -| `build.s2i.jdk` | JDK Version of the EAP S2I images | `"11"` | Allowed Values: `"11"` | +| `build.s2i.jdk` | JDK Version of the EAP S2I images | `"11"` | Allowed Values: `"11"`, `"17"` | | `build.s2i.jdk11.builderImage` | EAP S2I Builder image for JDK 11 | `registry.redhat.io/jboss-eap-7/eap-xp4-openjdk11-openshift-rhel8` | [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.jdk11.runtimeImage` | EAP S2I Runtime image for JDK 11 | `registry.redhat.io/jboss-eap-7/eap-xp4-openjdk11-runtime-openshift-rhel8` | [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.jdk17.builderImage` | EAP S2I Builder image for JDK 17 | `registry.redhat.io/jboss-eap-7/eap-xp4-openjdk17-openshift-rhel8` | [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.jdk17.runtimeImage` | EAP S2I Runtime image for JDK 17 | `registry.redhat.io/jboss-eap-7/eap-xp4-openjdk17-runtime-openshift-rhel8` | [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.galleonLayers` | A list of layer names to compose a EAP server | - | [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.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) | @@ -106,4 +108,4 @@ The configuration to build the application image is configured in a `deploy` sec | `deploy.volumeMounts` | Freeform `volumeMounts` items| - | [Kubernetes Documentation](https://kubernetes.io/docs/concepts/storage/volumes/) | | `deploy.volumes` | Freeform `volumes` items| - | [Kubernetes Documentation](https://kubernetes.io/docs/concepts/storage/volumes/) | | `deploy.initContainers` | Freeform `initContainers` items | - | [Kubernetes Documentation](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) | -| `deploy.extraContainers` | Freeform extra `containers` items | - | [Kubernetes Documentation](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates) | \ No newline at end of file +| `deploy.extraContainers` | Freeform extra `containers` items | - | [Kubernetes Documentation](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates) | diff --git a/charts/eap-xp4/templates/_helpers.tpl b/charts/eap-xp4/templates/_helpers.tpl index 487831d..71c2924 100644 --- a/charts/eap-xp4/templates/_helpers.tpl +++ b/charts/eap-xp4/templates/_helpers.tpl @@ -2,11 +2,14 @@ {{/* eap-xp4.eapBuilderImage corresponds to the imagestream for the EAP S2I Builder image. It depends on the build.s2i.jdkVersion. -For now, we do not need to do anything as the only support version is 11 but when we support JDK 17, -we will have to check build.s2i.jdkVersion to determin the proper image. +For now, we support versions 11 and 17. */}} {{- define "eap-xp4.eapBuilderImage" -}} +{{- if eq .Values.build.s2i.jdk "11" -}} {{ .Values.build.s2i.jdk11.builderImage}}:{{ include "eap-xp4.version" . }} +{{- else -}} +{{ .Values.build.s2i.jdk17.builderImage}}:{{ include "eap-xp4.version" . }} +{{- end -}} {{- end -}} {{/* @@ -14,7 +17,11 @@ eap-xp4.eapRuntimeImage corresponds to the imagestream for the EAP S2I Runtime i It depends on the build.s2i.jdkVersion. */}} {{- define "eap-xp4.eapRuntimeImage" -}} +{{- if eq .Values.build.s2i.jdk "11" -}} {{ .Values.build.s2i.jdk11.runtimeImage}}:{{ include "eap-xp4.version" . }} +{{- else -}} +{{ .Values.build.s2i.jdk17.runtimeImage}}:{{ include "eap-xp4.version" . }} +{{- end -}} {{- end -}} {{/* diff --git a/charts/eap-xp4/values.schema.json b/charts/eap-xp4/values.schema.json index 4377a77..d168316 100644 --- a/charts/eap-xp4/values.schema.json +++ b/charts/eap-xp4/values.schema.json @@ -228,7 +228,7 @@ "jdk": { "description": "JDK Version of the EAP S2I images", "type": "string", - "enum": ["11"], + "enum": ["11", "17"], "default": "11" }, "jdk11": { @@ -244,6 +244,19 @@ } } }, + "jdk17": { + "type": "object", + "properties": { + "builderImage": { + "description": "EAP S2I Builder image for JDK 17", + "type": "string" + }, + "runtimeImage": { + "description": "EAP S2I Runtime image for JDK 17", + "type": "string" + } + } + }, "galleonLayers": { "description": "List of Galleon Layers to provision", "type": ["string", "array", "null"], diff --git a/charts/eap-xp4/values.yaml b/charts/eap-xp4/values.yaml index 313bd3c..b740e06 100644 --- a/charts/eap-xp4/values.yaml +++ b/charts/eap-xp4/values.yaml @@ -15,6 +15,9 @@ build: jdk11: builderImage: registry.redhat.io/jboss-eap-7/eap-xp4-openjdk11-openshift-rhel8 runtimeImage: registry.redhat.io/jboss-eap-7/eap-xp4-openjdk11-runtime-openshift-rhel8 + jdk17: + builderImage: registry.redhat.io/jboss-eap-7/eap-xp4-openjdk17-openshift-rhel8 + runtimeImage: registry.redhat.io/jboss-eap-7/eap-xp4-openjdk17-runtime-openshift-rhel8 output: kind: "ImageStreamTag" triggers: {}