In a Micronaut project, when I specify port via application.yml:
micronaut:
server:
port: 9080
k8s:build does pick up this port and exposes 9000 port in container image. However, k8s:resource doesn't seem to add 9080 port in generated Kubernetes liveness, readiness and startup probes.
If I add extra jkube-healthcheck-micronaut enricher configuration for port, it works:
Run k8s:resource, you would notice generated resources has a different port in YAML manifests target/classes/META-INF/jkube/kubernetes.yml . It's not same as the one set in src/main/resources/application.yml
Describe the bug
Related to #2239
In a Micronaut project, when I specify port via application.yml:
k8s:build
does pick up this port and exposes9000
port in container image. However,k8s:resource
doesn't seem to add9080
port in generated Kubernetes liveness, readiness and startup probes.If I add extra jkube-healthcheck-micronaut enricher configuration for port, it works:
Eclipse JKube version
SNAPSHOT
Component
Kubernetes Maven Plugin
Apache Maven version
None
Gradle version
None
Steps to reproduce
k8s:resource
, you would notice generated resources has a different port in YAML manifeststarget/classes/META-INF/jkube/kubernetes.yml
. It's not same as the one set insrc/main/resources/application.yml
Expected behavior
MicronautHealthCheckEnricher should automatically read project configuration and read from ports. We need to make changes similar to https://github.com/eclipse-jkube/jkube/pull/2287 here to read ports.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3
Environment
Linux
Eclipse JKube Logs
No response
Sample Reproducer Project
No response
Additional context
No response