-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fallback specialized kubernetes config to vanilla kubernetes #34487
Conversation
radcortez
commented
Jul 3, 2023
- Fixes Reduce verbosity of kubernetes extension config with inheritance or more opinionated defaulting #34025
This comment has been minimized.
This comment has been minimized.
The test failures seems related |
Yes, but I'm not sure if this is a bug caused by the change or the change discovered an existent bug :) Because of the config fallback rule, the Openshift processor reads Lines 1 to 15 in 8068cb2
Lines 103 to 107 in d01808f
Which ends up modifying the container image name that fails the test:
Shouldn't |
...lla/runtime/src/main/java/io/quarkus/kubernetes/runtime/config/KubernetesConfigFallback.java
Outdated
Show resolved
Hide resolved
This is the new behaviour after #33724. So Kubernetes name or openshift name should never modify the container image name, so if this is still happening in the OpenShift extension, it's a bug. wdty @iocanel ? |
This comment has been minimized.
This comment has been minimized.
What ever happened with this? |
The change may have discovered a possible bug described in #34487 (comment). We need clarification on the proper behaviour to proceed. |
Thank you @radcortez
Reading the documentation it seems that So what exactly does "naming" mean in this context? The name of the To me, the documentation itself isn't clear, so I'm unsure of what the proper behavior should be today before we introduce any of these changes. Shouldn't the container image name itself be driven by the |
At some point we allowed the name to be affected by the image name, too. To answer @Sgitario question, AFAIR we never named images after |
These two sentences seem contradictory to me unless we're not speaking about the same objects. Therefore, if I understood what the issue was, if there are some container images (in the OpenShift) where Are we on the same page? |
It is. Look at the processor code: Lines 103 to 107 in d01808f
In this case, it is not I believe we only need to remove the processor producer. Regardless, I just wanted to confirm which one should be the correct behaviour. |
Ok, I've updated the PR and removed the build producer with the customized image name. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Except for a couple of minor things.
One concern I had is that when using for example quarkus.kubernetes.ingress.expose
, this property does not exist in OpenShift, so I didn't want to see a warning message saying that quarkus.openshift.ingress.expose
. But I tried it and this is not happening, so perfect!
...lla/runtime/src/main/java/io/quarkus/kubernetes/runtime/config/KubernetesConfigFallback.java
Outdated
Show resolved
Hide resolved
...quarkus-standard-way/src/test/java/io/quarkus/it/kubernetes/OpenshiftWithCustomNameTest.java
Show resolved
Hide resolved
From my point of view there is no contradiction. The property I have no recollection of
Partially. The part that I disagree, is that this has nothing to do with #33724. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
@iocanel @radcortez I've added the |
Sure. |
Hi @radcortez / @Sgitario / @iocanel should this feature have made it into the If I specify the following (the quarkus.kubernetes.part-of=villains-service
quarkus.kubernetes.annotations."app.openshift.io/connects-to"=villains-db,otel-collector
quarkus.kubernetes.env.configmaps=${quarkus.application.name}-config
quarkus.kubernetes.env.secrets=${quarkus.application.name}-config-creds
quarkus.kubernetes.labels.app=${quarkus.application.name}
quarkus.kubernetes.labels.application=${quarkus.kubernetes.part-of}
quarkus.kubernetes.labels.system=quarkus-super-heroes
quarkus.openshift.route.expose=true when the OpenShift & KNative resources are generated, the resources (the OpenShift The minikube I'm not sure if this is because for OpenShift/Knative the resource types are different (kubernetes In any event, it does not work as expected. Should I file a new issue? |
I've created a new issue for this - #35608 |