feat(generator): add explicit base-image JDK selection via jkube.java.version#3931
Open
ash-thakur-rh wants to merge 3 commits into
Open
feat(generator): add explicit base-image JDK selection via jkube.java.version#3931ash-thakur-rh wants to merge 3 commits into
ash-thakur-rh wants to merge 3 commits into
Conversation
Member
Eclipse JKube CI ReportStarted new GH workflow run for #3931 (2026-07-07T07:59:55Z) ⚙️ JKube E2E Tests (28850259239)
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3931 +/- ##
=============================================
+ Coverage 59.36% 72.55% +13.19%
- Complexity 4586 4932 +346
=============================================
Files 500 496 -4
Lines 21211 19438 -1773
Branches 2830 2603 -227
=============================================
+ Hits 12591 14104 +1513
+ Misses 7370 4130 -3240
+ Partials 1250 1204 -46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
….version (3916) Replace auto-detection of Java version (maven.compiler.* properties) with an explicit jkube.java.version shared property for selecting JDK base images. Users can set jkube.java.version to 11, 17, 21, or 25 to pin a specific JDK base image (jkube-java-11/-17/-21/-25). Works identically for Maven (-Djkube.java.version=17) and Gradle (-Pjkube.java.version=17). - Unset: default jkube-java (latest JDK) - from > jkube.java.version > default; warning when both are set - Unsupported value fails fast with supported versions list - ThorntailV2Generator stays pinned to JDK_11 - Supported versions derived from JDK enum (single source of truth)
|
ash-thakur-rh
added a commit
to ash-thakur-rh/jkube-integration-tests
that referenced
this pull request
Jul 7, 2026
Tests are disabled on main per maintainer guidance. Remove @disabled once eclipse-jkube/jkube#3931 merges and the snapshot includes the jkube.java.version property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Resolves #3916
Replace auto-detection of Java version (
maven.compiler.*properties) with an explicitjkube.java.versionshared property for selecting JDK base images.Users can set
jkube.java.versionto11,17,21, or25to pin a specificJDK base image (
jkube-java-11/-17/-21/-25). Works identically for Maven(
-Djkube.java.version=17) and Gradle (-Pjkube.java.version=17).Behavior
jkube-javaimagefrom>jkube.java.version> default (latest)fromandjkube.java.versionare set8) throwsIllegalArgumentExceptionlisting supported versionsJDK_11via 3-arg constructor (unaffected)JDKenum (single source of truth — fail-fast message and docs never drift)Changes
JavaExecGenerator— enhancedJDKenum withversionfield andfromVersion()lookup; replaceddetectJdk()withresolveJdk()readingjkube.java.version; addedaddFrom()override for thefrom-override warningJavaExecGeneratorTest— replaced auto-detection tests withResolveJdk,CustomizeWithJavaVersionProperty,FromOverridesJavaVersiontest classes (29 tests)ThorntailV2GeneratorTest— new test confirming ThorntailV2 stays onjkube-java-11even whenjkube.java.versionis set_java_exec.adoc— updated base images table, added "Selecting a specific Java version" section_faq.adoc— added FAQ entry for JDK version selectionWhat's not in this PR
Test plan
jkube.java.versionin {11,17,21,25} → correct base image (unit)jkube-javaimage (unit)from+ property →fromwins, warning logged (unit)fromonly → no warning (unit)jkube-java-11regardless of property (unit)