Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus-kind does not add ingress annotations #42294

Closed
cmarchand opened this issue Aug 2, 2024 · 5 comments · Fixed by #43580
Closed

quarkus-kind does not add ingress annotations #42294

cmarchand opened this issue Aug 2, 2024 · 5 comments · Fixed by #43580
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@cmarchand
Copy link

Describe the bug

Having dependencies on quarkus-kubernetes and quarkus-kind, and defining an Ingress annotation, annotation is not
present in target/kubernetes/kind.yml

Expected behavior

kind.yml should contain ingress annotation, as kubernetes.yml contains it

Actual behavior

kind.yml does not contains ingress annotation.

How to Reproduce?

  1. Add dependencies to quarkus-kubernetes and to quakus-kind :
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-kubernetes</artifactId>
</dependency>
<dependency>
  <groupId>io.quarkus</groupId>
  <artifactId>quarkus-kind</artifactId>
</dependency>
  1. Expose ingress and define an ingress annotation in application.properties
quarkus.kubernetes.ingress.expose=true
quarkus.kubernetes.ingress.annotations."nginx.ingress.kubernetes.io/rewrite-target"=/$2
  1. Build application, with mvn package
  2. Check target/kubernetes/kubernetes.xml, it contains ingress annotation
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    app.quarkus.io/quarkus-version: 3.12.3
    app.quarkus.io/vcs-uri: https://git...
    nginx.ingress.kubernetes.io/rewrite-target: /$2
  labels:
  1. Check target/kubernetes/kind.xml, it does not contains ingress annotation
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    app.quarkus.io/quarkus-version: 3.12.3
    app.quarkus.io/vcs-uri: https://git.clever-age.net/oxiane/gitlab-oxiane/formation/accessoires_cours/tp-quarkus-essentiel.git
  labels:

Output of uname -a or ver

Darwin paris-105.local 22.6.0 Darwin Kernel Version 22.6.0: Mon Apr 22 20:54:28 PDT 2024; root:xnu-8796.141.3.705.2~1/RELEASE_X86_64 x86_64

Output of java -version

java version "21" 2023-09-19 LTS Java(TM) SE Runtime Environment (build 21+35-LTS-2513) Java HotSpot(TM) 64-Bit Server VM (build 21+35-LTS-2513, mixed mode, sharing)

Quarkus version or git rev

3.12.3

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

$ mvn -v Apache Maven 3.9.3 (21122926829f1ead511c958d89bd2f672198ae9f) Maven home: /Users/cmarchand/applications/apache-maven-3.9.3 Java version: 21, vendor: Oracle Corporation, runtime: /Users/cmarchand/applications/java/jdk-21.jdk/Contents/Home Default locale: fr_FR, platform encoding: UTF-8 OS name: "mac os x", version: "13.6.7", arch: "x86_64", family: "mac"

Additional information

No response

@cmarchand cmarchand added the kind/bug Something isn't working label Aug 2, 2024
Copy link

quarkus-bot bot commented Aug 2, 2024

/cc @geoand (kubernetes), @iocanel (kubernetes)

@cmarchand
Copy link
Author

cmarchand commented Aug 5, 2024

It seems that other properties are not processed either ; if I add

quarkus.kubernetes.ingress.rules.1.host=localhost
quarkus.kubernetes.ingress.rules.1.path=/game(/|$)(.*)
quarkus.kubernetes.ingress.rules.1.path-type=ImplementationSpecific

kubernetes.yml contains the second rule :

spec:
  rules:
    - http:
        paths:
          - backend:
              service:
                name: guess-game
                port:
                  name: http
            path: /game(/|$)(.*)
            pathType: Prefix
    - host: localhost
      http:
        paths:
          - backend:
              service:
                name: guess-game
                port:
                  name: http
            path: /game(/|$)(.*)
            pathType: ImplementationSpecific

But kind.yml does not contain it :

spec:
  rules:
    - http:
        paths:
          - backend:
              service:
                name: guess-game
                port:
                  name: http
            path: /game(/|$)(.*)
            pathType: Prefix

@mcruzdev
Copy link
Contributor

Hello @cmarchand, how are you? I am trying to solve it

@cmarchand
Copy link
Author

Hello !

Nice ! Should I review or test your PR ?

Thanks a lot,
Christophe

@mcruzdev
Copy link
Contributor

mcruzdev commented Oct 2, 2024

Hi @cmarchand!

Yes, it would be great if you could test/review it. I am also waiting for a review from @iocanel to ensure everything is okay.

You need to build the quarkus (./mvnw -Dquickly) from my branch and follow this guide.

@quarkus-bot quarkus-bot bot added this to the 3.17 - main milestone Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants