Skip to content

Kubernetes extension does not extend provided resources #50791

@andreas-repp

Description

@andreas-repp

Describe the bug

The documentation of the kubernetes extension states:

Image

However, if I provide a stub of the Deployment in the kubernetes.yml like this:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    foo: bar
  name: code-with-quarkus

The generated build/kubernetes/kubernetes.yml file only contains

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    foo: bar
    app.quarkus.io/quarkus-version: 3.29.0
    app.quarkus.io/build-timestamp: 2025-10-30 - 17:44:10 +0000
  labels:
    app.kubernetes.io/managed-by: quarkus
    app.kubernetes.io/name: code-with-quarkus
    app.kubernetes.io/version: 1.0.0-SNAPSHOT
  name: code-with-quarkus

This is obviously broken now because the whole spec part is missing.

Expected behavior

I would expect the deployment to be as if I do not apply the stub and contain everything + the foo:bar annotation.

Actual behavior

No response

How to Reproduce?

2025-10-30_helm-flyway.zip

  1. Run ./gradlew assemble
  2. check out the generated build/kubernetes/kubernetes.yml file.
  3. Remove the stub in the src/main/kubernetes/kubernetes.yml file and run ./gradlew assemble again
  4. now the full deployment is generated again.

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

3.29.0

Build tool (ie. output of mvnw --version or gradlew --version)

gradle

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions