-
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
Kubernetes: inconsistent handling of kubernetes.name/group/version properties #6726
Comments
CC @iocanel |
@iocanel I assume you will be handling this one? |
I think that we have multiple issues here.
The first task is probably a @Ladicek: I am not sure what's the intention here. Do you want me to pick this issue up? Is this something you were planning to work on? |
@iocanel I played with this a bit yesterday and it doesn't seem like an easy fix, due to all the mutability inside Dekorate. My current assignment is to find bugs, not fix them, so if you could take this, that would be great :-) |
…t that verifies the issue has been fixed
fix (#6726): Bump dekorate to 0.10.8 and add integration test that
@Ladicek can you double check if this issue is still valid ? |
@Ladicek re-ping |
Ah, totally missed this one. Will check. |
This works fine now, closing. Thanks! |
Describe the bug
I'm using the
kubernetes
extension to generate Kubernetes and OpenShift resources, and find that thekubernetes.name/group/version
configuration properties are handled wildly inconsistently.The problem seems to be in Dekorate, but the
KubernetesProcessor
in Quarkus is also involved (it sets theapp.group
system property). I think the root cause is that the DekorateResources
object, which is shared among the entire DekorateSession
, is being modified in the middle of Dekorate processing (by the callers ofAbstractKubernetesHandler.setApplicationInfo
).Here's my
application.properties
file:And the generated
kubernetes.yml
; marking the relevant lines by!!!
:Expected behavior
I'd expect
kubernetes.name
to have priority overquarkus.application.name
, but I see that sometimes it's one and sometimes it's the other.The
kubernetes.group
setting seems to be set consistently. But if I rename it toopenshift.group
, it still affects the Kubernetes resources, which sounds wrong.I'd expect
kubernetes.version
to have priority over what Dekorate reads frompom.xml
, but I see that sometimes it's one and sometimes it's the other.Actual behavior
See above.
Also I think that
kubernetes.*
properties should only affect Kubernetes resources,openshift.*
properties should only affect OpenShift resources, etc. This seems to be the case for 99% of properties, the only problematic ones are potentially thename
,group
andversion
things. This seems to be because Dekorate expects these properties to be always the same (app.name/group/version
). I'd be fine with keeping them always the same, too, but then there should be noopenshift.name/group/version
orknative.name/group/version
. (Preferrably, there would be nokubernetes.name/group/version
and it would be centralized underquarkus.application
, in my opinion.)To Reproduce
Steps to reproduce the behavior:
kubernetes
extensionapplication.properties
per abovemvn clean package
target/kubernetes/kubernetes.yml
Environment (please complete the following information):
uname -a
orver
:java -version
:The text was updated successfully, but these errors were encountered: