banzaicloud / prometheus-jmx-exporter-operator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prometheus JMX Exporter Operator does not work with Cloud Native Build Packs

helpermethod opened this issue · comments

Describe the bug
When using the Operator with a Spring Boot application which was built with ./mvnw spring-boot:build-image, the operator is not able to find any Java processes running in the Pod, even though the process listing shows java PID 1 is indeed a Java process.

This problem does not happen if you build the image with an alternative tool like e.g. jib (which also creates a Docker container).

Steps to reproduce the issue:
Create a simple Spring Boot application (https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.3.4.RELEASE&packaging=jar&jvmVersion=11&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=web), build it with ./mvnw spring-boot:build-image and use the resulting image in your deployment.

Inspect the logs of the operator and you'll see that no Java process is found.

Expected behavior
A Java process is found, everything works as expected.