I want to use an existing kubernetes.yml to give a template for ingress. This is not working cause the values in Ingress part of the yaml will never been overwritten from quarkus. If I add expose=true a second Ingress will be copied to the generated kubernetes.yml instead of overwriting the existing one.
So, if expose=true check if an Ingress Template exists and modify this one instead of generating a new.
/cc @geoand
@iocanel seems like one for you. I am wondering if this is a duplicate of https://github.com/quarkusio/quarkus/issues/10641 (which has already been fixed)
Well, I'm not sure if it is fixed with this bug, because it seems that the behaviour is a little bit more weird for Ingress. For deployment etc. it works ok for me, just for Ingress it is not replacing the stuff I want or generating a new Ingress when exposed true.
Well, to overwork my comment. Some params are overwritten in the ingress part, something like name. But, most important part, LABELS with Version are not set. This is the only really big problem, because without labels it is unusable.
Gotcha.
Would you be willing to try the current Quarkus from master and see if it fixes your problem?
All you need to do is:
mvn -Dquickly -DskipDocsquarkus-bom instead of quarkus-universe-bom and also change your application to use version 999-SNAPSHOT for the quarkus plugin and dependencies.Sure, I'll give it a try.
Well, maybe I'm too stupid in the moment but getting following error:
[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.8.0-jboss-2 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.8.0-jboss-2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
Do I need to add another repo?
Hm.. I have seen people encounter that from time to time...
Can you try adding --settings .github/mvn-settings.xml to the mvn command line execution?
Well, didn't helped directly, I added https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/ to my settings.xml
The compiler plugin you use is only in a thirdparty repo available.
Ok, Build really needed a time.
Feedback:
The duplicate generation of the Ingress is gone, even when expose=true
So this is really a good way forward. But:
For the Ingress part there is still no replace of the variables. Wether something like port nor the labels are set correctly. And with this it is unusable, cause I really need the current version generated into the kubernetes.yml
Thanks for the info! I am sure it will be very valuable to @iocanel
For Ingress, Routes, Service etc we may need to provide a more fine-grained control on how we apply things on existing resources. I will work on that early next week.
Ok, perfect. When you are already going to touch this part, it would be great if we would be able to add env vars/specs to the ingress part. Then we wouldn't need a template. For us we add something like:
tls:
So, if you would extend the Ingress generation options, it would be even better than increasing the templating ;)
Status update: We've recently made changes in dekorate so that labels aren't just hardcoded but more dynamic.
Hopefully, this will solve the issue. I will release and re-evaluate.
All labels and annotations are now added using decorators, so they will be properly applied to existing resources too.