From 10406df883a16cd5afef4da28e2e55dba4dbcd55 Mon Sep 17 00:00:00 2001 From: gsergiu <4517853+gsergiu@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:14:58 +0100 Subject: [PATCH 1/2] moved the add-opens to JAVA_TOOL_OPTIONS --- Dockerfile | 2 +- k8s/overlays/cloud/deployment_patch.yaml.template | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0f4429b..802e7e39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ ADD https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/$ELASTIC_APM COPY ./annotation-web/target/annotation-web-executable.jar /opt/app/annotation-web-executable.jar EXPOSE 8080 -ENTRYPOINT ["java", "--add-opens=java.base/java.util=ALL-UNNAMED" , "-jar", "/opt/app/annotation-web-executable.jar"] \ No newline at end of file +ENTRYPOINT ["java", "-jar", "/opt/app/annotation-web-executable.jar"] \ No newline at end of file diff --git a/k8s/overlays/cloud/deployment_patch.yaml.template b/k8s/overlays/cloud/deployment_patch.yaml.template index d3f34971..dc90e3fe 100644 --- a/k8s/overlays/cloud/deployment_patch.yaml.template +++ b/k8s/overlays/cloud/deployment_patch.yaml.template @@ -21,7 +21,9 @@ spec: -Delastic.apm.application_packages=${ELASTIC_APP_PACKAGES} -Delastic.apm.server_urls=${ELASTIC_APM_SERVERS} -Delastic.apm.service_name=${APP_NAME} - -Delastic.apm.environment=${K8S_NAMESPACE}" + -Delastic.apm.environment=${K8S_NAMESPACE} + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED" resources: requests: memory: "${MEMORY_REQUEST}M" From 0bbdaeb63f21140f09dcba38d01608b3d9171435 Mon Sep 17 00:00:00 2001 From: gsergiu <4517853+gsergiu@users.noreply.github.com> Date: Wed, 10 Jan 2024 14:43:01 +0100 Subject: [PATCH 2/2] try to escape space for the add-opens --- Dockerfile | 2 +- k8s/overlays/cloud/deployment_patch.yaml.template | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 802e7e39..aede7c17 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ ADD https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/$ELASTIC_APM COPY ./annotation-web/target/annotation-web-executable.jar /opt/app/annotation-web-executable.jar EXPOSE 8080 -ENTRYPOINT ["java", "-jar", "/opt/app/annotation-web-executable.jar"] \ No newline at end of file +ENTRYPOINT ["java", "--add-opens=java.base/java.util=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED", "-jar", "/opt/app/annotation-web-executable.jar"] \ No newline at end of file diff --git a/k8s/overlays/cloud/deployment_patch.yaml.template b/k8s/overlays/cloud/deployment_patch.yaml.template index dc90e3fe..d3f34971 100644 --- a/k8s/overlays/cloud/deployment_patch.yaml.template +++ b/k8s/overlays/cloud/deployment_patch.yaml.template @@ -21,9 +21,7 @@ spec: -Delastic.apm.application_packages=${ELASTIC_APP_PACKAGES} -Delastic.apm.server_urls=${ELASTIC_APM_SERVERS} -Delastic.apm.service_name=${APP_NAME} - -Delastic.apm.environment=${K8S_NAMESPACE} - --add-opens java.base/java.util=ALL-UNNAMED - --add-opens java.base/java.lang=ALL-UNNAMED" + -Delastic.apm.environment=${K8S_NAMESPACE}" resources: requests: memory: "${MEMORY_REQUEST}M"