Open antoniomacri opened 1 month ago
The generation of the file kubernetes.yml is incomplete if resources are defined in the pom and do not include application.properties
The generated kubernetes.yml is the same independently on resources I've defined in the pom. For instance:
--- apiVersion: apps/v1 kind: Deployment metadata: annotations: app.quarkus.io/quarkus-version: 3.15.1 app.quarkus.io/commit-id: c4fdc9650b0fd7eefb4e99d6bfcdc94bf96cda7c app.quarkus.io/build-timestamp: 2024-10-09 - 08:49:28 +0000 labels: app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/managed-by: quarkus name: code-with-quarkus spec: replicas: 1 selector: matchLabels: app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/name: code-with-quarkus template: metadata: annotations: app.quarkus.io/quarkus-version: 3.15.1 app.quarkus.io/commit-id: c4fdc9650b0fd7eefb4e99d6bfcdc94bf96cda7c app.quarkus.io/build-timestamp: 2024-10-09 - 08:49:28 +0000 labels: app.kubernetes.io/managed-by: quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/name: code-with-quarkus spec: containers: - env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: B value: BB - name: C value: CC - name: A value: AA - name: QUARKUS_PROFILE value: develop - name: TZ value: Europe/Rome - name: D value: DD image: docker.io/antonio/code-with-quarkus:1.0.0-SNAPSHOT imagePullPolicy: Always name: code-with-quarkus --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: app.quarkus.io/quarkus-version: 3.15.1 app.quarkus.io/commit-id: c4fdc9650b0fd7eefb4e99d6bfcdc94bf96cda7c app.quarkus.io/build-timestamp: 2024-10-09 - 08:49:28 +0000 labels: app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/managed-by: quarkus name: code-with-quarkus spec: rules: - host: example.net
The generate yaml is incomplete (missing env and ingress):
--- apiVersion: apps/v1 kind: Deployment metadata: annotations: app.quarkus.io/quarkus-version: 3.15.1 app.quarkus.io/commit-id: c4fdc9650b0fd7eefb4e99d6bfcdc94bf96cda7c app.quarkus.io/build-timestamp: 2024-10-09 - 08:54:46 +0000 labels: app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT app.kubernetes.io/managed-by: quarkus name: code-with-quarkus spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT template: metadata: annotations: app.quarkus.io/quarkus-version: 3.15.1 app.quarkus.io/commit-id: c4fdc9650b0fd7eefb4e99d6bfcdc94bf96cda7c app.quarkus.io/build-timestamp: 2024-10-09 - 08:54:46 +0000 labels: app.kubernetes.io/managed-by: quarkus app.kubernetes.io/name: code-with-quarkus app.kubernetes.io/version: 1.0.0-SNAPSHOT spec: containers: - env: - name: KUBERNETES_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace image: docker.io/antonio/code-with-quarkus:1.0.0-SNAPSHOT imagePullPolicy: Always name: code-with-quarkus
application properties
quarkus.kubernetes.env.vars.quarkus-profile=develop quarkus.kubernetes.env.vars.A=AA quarkus.kubernetes.env.vars.B=BB quarkus.kubernetes.env.vars.C=CC quarkus.kubernetes.env.vars.D=DD quarkus.kubernetes.env.vars.TZ=Europe/Rome quarkus.kubernetes.ingress.expose=true quarkus.kubernetes.ingress.host=example.net
./mvnw clean package
kubernetes.yml
pom.xml
<build>
<resources> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <includes> <include>META-INF/resources/**</include> </includes> </resource> </resources>
KUBERNETES_NAMESPACE
application.properties
<resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>application.properties</include> </includes> </resource>
uname -a
ver
No response
java -version
21
3.15.1
mvnw --version
gradlew --version
mvnw
/cc @geoand (kubernetes), @iocanel (kubernetes)
Describe the bug
The generation of the file kubernetes.yml is incomplete if resources are defined in the pom and do not include application.properties
Expected behavior
The generated kubernetes.yml is the same independently on resources I've defined in the pom. For instance:
Actual behavior
The generate yaml is incomplete (missing env and ingress):
How to Reproduce?
application properties
:./mvnw clean package
and look at the generatekubernetes.yml
: it correctly contains all the env and the ingress.pom.xml
under<build>
:./mvnw clean package
(clean also!)kubernetes.yml
: the env contains onlyKUBERNETES_NAMESPACE
and the ingress is gone.application.properties
as a resource the generation is correct again:Output of
uname -a
orver
No response
Output of
java -version
21
Quarkus version or git rev
3.15.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvnw
Additional information
No response