Skip to content

k8s:resource doesn't automatically pick up port from Quarkus application.properties #2239

@rohanKanojia

Description

@rohanKanojia

Describe the bug

In a Quarkus project, when I specify port via application.properties:

quarkus.http.port=9000

k8s:build does pick up this port and exposes 9000 port in container image. However, k8s:resource doesn't seem to add 9000 port in generated Kubernetes liveness, readiness and startup probes.

If I add extra jkube-healthcheck-quarkus enricher configuration for port, it works:

      <plugin>
          <groupId>org.eclipse.jkube</groupId>
          <artifactId>kubernetes-maven-plugin</artifactId>
          <version>${jkube.version}</version>              
          <configuration>
            <enricher>
              <config>
                  <jkube-healthcheck-quarkus>
                      <port>9000</port>
                  </jkube-healthcheck-quarkus>
              </config>
            </enricher>  
          </configuration>
      </plugin>

Eclipse JKube version

1.13.1

Component

Kubernetes Maven Plugin

Apache Maven version

None

Gradle version

None

Steps to reproduce

  1. Enable health support in Quarkus project
  2. Override default HTTP port via properties
  3. Run k8s:resource, generated manifests contains probes containing 8080 port

Expected behavior

Port should be automatically detected from properties while generating health checks

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions