Newest Strimzi operator should use Java version 17 instead of 11
Summary
The Java version in the dockerfile uses version 11 of java (https://repo1.dso.mil/dsop/opensource/strimzi/operator/-/blob/development/Dockerfile#L8) while the matching version of strimzi operator upstream has been made on, and tested on java version 17 (https://github.com/strimzi/strimzi-kafka-operator/blob/0.33.0/development-docs/DEV_GUIDE.md#java-versions).
When deploying, strimzi operator will fail saying the supported version of java is 0.61.0 (version 17) but the complied code is 0.55.0
Steps to reproduce
Using strimzi helm charts and a default deployment will create this error
What is the current bug behavior?
The strimzi operator pod will go into crashloopbackoff with the logs showing an error about the Java version
What is the expected correct behavior?
Strimzi operator pod should stand up without Java errors by using the current operator Java version
Relevant logs and/or screenshots
+ exec /usr/bin/tini -w -e 143 -- java -Dcom.redhat.fips=false -Dlog4j2.configurationFile=file:/opt/strimzi/custom-config/log4j2.properties -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager -Dvertx.cacheDirBase=/tmp/vertx-cache -Djava.security.egd=file:/dev/./urandom -XX:+ExitOnOutOfMemoryError -XX:MinRAMPercentage=15 -XX:MaxRAMPercentage=20 -classpath lib/io.strimzi.cluster-operator-0.33.0.jar:lib/io.strimzi.api-0.33.0.jar:lib/io.fabric8.kubernetes-model-common-6.3.1.jar:lib/io.fabric8.kubernetes-model-apiextensions-6.3.1.jar:lib/io.strimzi.config-model-0.33.0.jar:lib/io.strimzi.operator-common-0.33.0.jar:lib/io.strimzi.crd-annotations-0.33.0.jar:lib/org.quartz-scheduler.quartz-2.3.2.jar:lib/io.fabric8.openshift-client-6.3.1.jar:lib/com.github.mifmif.generex-1.0.2.jar:lib/dk.brics.automaton.automaton-1.11-8.jar:lib/io.fabric8.openshift-client-api-6.3.1.jar:lib/io.fabric8.openshift-model-clusterautoscaling-6.3.1.jar:lib/io.fabric8.openshift-model-operator-6.3.1.jar:lib/io.fabric8.openshift-model-operatorhub-6.3.1.jar:lib/io.fabric8.openshift-model-machine-6.3.1.jar:lib/io.fabric8.openshift-model-whereabouts-6.3.1.jar:lib/io.fabric8.openshift-model-monitoring-6.3.1.jar:lib/io.fabric8.openshift-model-storageversionmigrator-6.3.1.jar:lib/io.fabric8.openshift-model-tuned-6.3.1.jar:lib/io.fabric8.openshift-model-console-6.3.1.jar:lib/io.fabric8.openshift-model-config-6.3.1.jar:lib/io.fabric8.openshift-model-machineconfig-6.3.1.jar:lib/io.fabric8.openshift-model-miscellaneous-6.3.1.jar:lib/io.fabric8.openshift-model-hive-6.3.1.jar:lib/io.fabric8.openshift-model-installer-6.3.1.jar:lib/io.fabric8.kubernetes-client-6.3.1.jar:lib/io.fabric8.kubernetes-httpclient-okhttp-6.3.1.jar:lib/com.squareup.okhttp3.okhttp-3.12.12.jar:lib/com.squareup.okio.okio-1.15.0.jar:lib/com.squareup.okhttp3.logging-interceptor-3.12.12.jar:lib/io.fabric8.kubernetes-client-api-6.3.1.jar:lib/io.fabric8.kubernetes-model-gatewayapi-6.3.1.jar:lib/io.fabric8.kubernetes-model-admissionregistration-6.3.1.jar:lib/io.fabric8.kubernetes-model-autoscaling-6.3.1.jar:lib/io.fabric8.kubernetes-model-batch-6.3.1.jar:lib/io.fabric8.kubernetes-model-certificates-6.3.1.jar:lib/io.fabric8.kubernetes-model-discovery-6.3.1.jar:lib/io.fabric8.kubernetes-model-extensions-6.3.1.jar:lib/io.fabric8.kubernetes-model-flowcontrol-6.3.1.jar:lib/io.fabric8.kubernetes-model-metrics-6.3.1.jar:lib/io.fabric8.kubernetes-model-scheduling-6.3.1.jar:lib/io.fabric8.kubernetes-model-node-6.3.1.jar:lib/org.slf4j.slf4j-api-1.7.36.jar:lib/org.yaml.snakeyaml-1.33.jar:lib/com.fasterxml.jackson.datatype.jackson-datatype-jsr310-2.14.1.jar:lib/io.fabric8.kubernetes-model-core-6.3.1.jar:lib/io.fabric8.kubernetes-model-events-6.3.1.jar:lib/io.fabric8.kubernetes-model-policy-6.3.1.jar:lib/io.fabric8.kubernetes-model-rbac-6.3.1.jar:lib/io.fabric8.kubernetes-model-apps-6.3.1.jar:lib/io.fabric8.kubernetes-model-storageclass-6.3.1.jar:lib/io.fabric8.kubernetes-model-networking-6.3.1.jar:lib/io.fabric8.kubernetes-model-coordination-6.3.1.jar:lib/io.fabric8.openshift-model-6.3.1.jar:lib/io.fabric8.zjsonpatch-0.3.0.jar:lib/com.fasterxml.jackson.core.jackson-core-2.14.1.jar:lib/com.fasterxml.jackson.core.jackson-databind-2.14.1.jar:lib/com.fasterxml.jackson.core.jackson-annotations-2.14.1.jar:lib/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.14.1.jar:lib/io.vertx.vertx-core-4.3.6.jar:lib/io.netty.netty-common-4.1.86.Final.jar:lib/io.netty.netty-buffer-4.1.86.Final.jar:lib/io.netty.netty-handler-4.1.86.Final.jar:lib/io.netty.netty-handler-proxy-4.1.86.Final.jar:lib/io.netty.netty-codec-http-4.1.86.Final.jar:lib/io.netty.netty-codec-http2-4.1.86.Final.jar:lib/io.netty.netty-resolver-4.1.86.Final.jar:lib/io.netty.netty-resolver-dns-4.1.86.Final.jar:lib/io.netty.netty-codec-dns-4.1.86.Final.jar:lib/io.strimzi.certificate-manager-0.33.0.jar:lib/org.apache.logging.log4j.log4j-core-2.17.2.jar:lib/org.apache.logging.log4j.log4j-api-2.17.2.jar:lib/org.apache.logging.log4j.log4j-slf4j-impl-2.17.2.jar:lib/org.apache.logging.log4j.log4j-jul-2.17.2.jar:lib/io.strimzi.kafka-oauth-server-0.11.0.jar:lib/io.strimzi.kafka-oauth-server-plain-0.11.0.jar:lib/io.strimzi.kafka-oauth-client-0.11.0.jar:lib/io.strimzi.kafka-oauth-common-0.11.0.jar:lib/com.nimbusds.nimbus-jose-jwt-9.10.jar:lib/com.github.stephenc.jcip.jcip-annotations-1.0-1.jar:lib/com.jayway.jsonpath.json-path-2.6.0.jar:lib/net.minidev.json-smart-2.4.7.jar:lib/net.minidev.accessors-smart-2.4.7.jar:lib/org.apache.kafka.kafka-clients-3.3.2.jar:lib/com.github.luben.zstd-jni-1.5.2-1.jar:lib/org.lz4.lz4-java-1.8.0.jar:lib/org.xerial.snappy.snappy-java-1.1.8.4.jar:lib/org.apache.zookeeper.zookeeper-3.6.3.jar:lib/org.apache.yetus.audience-annotations-0.5.0.jar:lib/io.netty.netty-transport-native-epoll-4.1.86.Final.jar:lib/org.apache.zookeeper.zookeeper-jute-3.6.3.jar:lib/io.netty.netty-transport-4.1.86.Final.jar:lib/io.netty.netty-transport-native-epoll-4.1.86.Final-linux-x86_64.jar:lib/io.netty.netty-transport-native-unix-common-4.1.86.Final.jar:lib/io.netty.netty-transport-classes-epoll-4.1.86.Final.jar:lib/io.micrometer.micrometer-core-1.9.5.jar:lib/org.hdrhistogram.HdrHistogram-2.1.12.jar:lib/org.latencyutils.LatencyUtils-2.0.3.jar:lib/io.micrometer.micrometer-registry-prometheus-1.9.5.jar:lib/io.prometheus.simpleclient_common-0.15.0.jar:lib/io.prometheus.simpleclient-0.15.0.jar:lib/io.prometheus.simpleclient_tracer_otel-0.15.0.jar:lib/io.prometheus.simpleclient_tracer_common-0.15.0.jar:lib/io.prometheus.simpleclient_tracer_otel_agent-0.15.0.jar:lib/io.vertx.vertx-micrometer-metrics-4.3.6.jar:lib/io.netty.netty-codec-4.1.86.Final.jar:lib/io.netty.netty-codec-socks-4.1.86.Final.jar io.strimzi.operator.cluster.Main
Error: LinkageError occurred while loading main class io.strimzi.operator.cluster.Main
java.lang.UnsupportedClassVersionError: io/strimzi/operator/cluster/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Possible fixes
https://repo1.dso.mil/dsop/opensource/strimzi/operator/-/blob/development/Dockerfile#L8 Bumping this version should, in theory, fix the issue
Tasks
-
Bug has been identified and corrected within the container