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

Kubernetes extension(s) have stopped generating the app.openshift.io/runtime label #26516

Closed
edeandrea opened this issue Jul 1, 2022 · 9 comments · Fixed by #26561
Closed
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@edeandrea
Copy link
Contributor

edeandrea commented Jul 1, 2022

Describe the bug

I'm not sure which extension it is, but since Quarkus 2.10.1.Final the app.openshift.io/runtime: quarkus label is now missing from resources generated when using quarkus.kubernetes.deployment-target=openshift. For some reason it is still working when setting quarkus.kubernetes.deployment-target=knative.

You can see this in this diff: quarkusio/quarkus-super-heroes@fe02dae?diff=unified#diff-dc6194623579af548ca3da8872f2c72c20d41fb010026243a203b2d52da3defaL48

This commit is the diff between 2.10.0.Final & 2.10.1.Final. There were no other commits in between the upgrade to 2.10.0.Final (where it was behaving correctly) and 2.10.1.Final (where it is missing).

@edeandrea edeandrea added the kind/bug Something isn't working label Jul 1, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jul 1, 2022

/cc @geoand, @iocanel

@geoand
Copy link
Contributor

geoand commented Jul 2, 2022

Seems related to #26273.
However we do have tests that ensure that app.openshift.io/runtime is set to quarkus when quarkus.openshift.labels."app.openshift.io/runtime" is not set.

Does the application perhaps have any relevant configuration?

@edeandrea
Copy link
Contributor Author

edeandrea commented Jul 2, 2022

Nope. Not a single line of code or configuration changed between 2.10.0.Final and 2.10.1.Final. The label disappeared in 2.10.1.Final.

This is in all the superheroes apps (https://github.com/quarkusio/quarkus-super-heroes).

The apps have all the container extensions present (kubernetes/minikube/knative/openshift) and this happens when running mvnw clean package -Dquarkus.kubernetes.deployment-target=openshift

See https://github.com/quarkusio/quarkus-super-heroes/blob/main/scripts/generate-k8s-resources.sh#L45

I did add quarkusio/quarkus-super-heroes@bbd570e as a workaround once I noticed this. I'll remove it once it's fixed.

@geoand
Copy link
Contributor

geoand commented Jul 4, 2022

I couldn't reproduce this.

In the rest-fights service I updated to 2.10.1.Final and when doing mvn clean package -DskipTests -Dquarkus.kubernetes.deployment-target=openshift I still saw app.openshift.io/runtime: quarkus being set to quarkus.

@edeandrea
Copy link
Contributor Author

Did you remove https://github.com/quarkusio/quarkus-super-heroes/blob/main/rest-fights/src/main/resources/application.properties#L109 ?

As I mentioned in my last comment I added that in after I noticed the label missing.

@geoand
Copy link
Contributor

geoand commented Jul 4, 2022

The configuration was not present in my test

@edeandrea
Copy link
Contributor Author

I'll look at it again tomorrow when I'm back in the office, but if you look at this commit (this is the upgrade from 2.10.0 to 2.10.1)

quarkusio/quarkus-super-heroes@fe02dae#diff-98f9cc25e81ec7b55ca7eb4c793aede723ba84c47dff3e9d4074bcc001d05384

All the *-openshift.yml files have that label removed as part of the commit.

Screenshot_20220704-082658.png

@edeandrea
Copy link
Contributor Author

edeandrea commented Jul 5, 2022

@geoand Remove quarkus.openshift.labels."app.openshift.io/runtime"=quarkus from rest-fights/src/main/resources/application.properties & run this command from the rest-fights directory:

./mvnw clean package -DskipTests -Dquarkus.kubernetes.deployment-target=openshift -Dquarkus.knative.labels.\"app.openshift.io/runtime\"=quarkus

Then look at target/kubernetes/openshift.yml. You'll notice the app.openshift.io/runtime: quarkus label is missing when with Quarkus 2.10.0.Final it was there.

@geoand
Copy link
Contributor

geoand commented Jul 5, 2022

Gotcha, I see what the problem is.

geoand added a commit to geoand/quarkus that referenced this issue Jul 5, 2022
geoand added a commit to geoand/quarkus that referenced this issue Jul 5, 2022
geoand added a commit that referenced this issue Jul 6, 2022
Ensure that labels for different k8s targets don't interfere with each other
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jul 6, 2022
@gsmet gsmet modified the milestones: 2.11.0.CR1, 2.10.3.Final Jul 18, 2022
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jul 18, 2022
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.

3 participants