-
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
Options with quarkus.openshift.init-containers
prefix are ignored
#39230
Comments
Would like to give this one a try |
@fedinskiy did some digging, controlling the image works when using the following config: Trying to control the IPP in the same way, results in nothing as there is no imagePullPolicy config in the initTasks class.
I just can't combine the two things above to work as intended. @geoand @iocanel do you have any directions to continue solving the issue? I don't know how to proceed. Do you have pointers for a way to debug what is going on in the Quarkus sources when compiling for example the reproducer project? |
Looks to me like for example the Flyway extension, creates an initTask as a buildStep. https://github.com/quarkusio/quarkus/blob/main/extensions/flyway/deployment/src/main/java/io/quarkus/flyway/deployment/FlywayProcessor.java#L265-L273 The initTaskConfig doesn't have that many config properties, like for example the image-pull-policy isn't available. https://github.com/quarkusio/quarkus/blob/main/extensions/kubernetes/vanilla/deployment/src/main/java/io/quarkus/kubernetes/deployment/InitTaskConfig.java |
The documentation was not in line with the implementation so I fixed things in both (and also fixed some typos in passing). Fixes quarkusio#39230
Good report and good reproducer, thanks. And thanks @appiepollo14 for the additional insights. Both the implementation and the documentation were problematic. I tried to fix both in #45296 . I experimented using your reproducer and things look fine. |
Describe the bug
I have an application, which uses flyway and deployed on openshift via quarkus extension. I want to change init container by using properties
quarkus.openshift.init-containers.wait-for-flyway
andquarkus.openshift.init-containers.wait-for-flyway.image-pull-policy
described in the guide[1]. However, these changes are not reflected in generatedopenshift.yml
file.[1] https://quarkus.io/guides/init-tasks#using-a-custom-wait-for-container-image
Expected behavior
Generated
openshift.yml
file contains custom image and pull policy in itsinitContainers
section,quay.io/quarkusqeteam/wait
andAlways
respectively.Actual behavior
Generated
openshift.yml
file contains default image and pull policy in itsinitContainers
section,groundnuty/k8s-wait-for:no-root-v1.7
andIfNotPresent
respectively.How to Reproduce?
git clone -b configure-container [email protected]:fedinskiy/reproducer.git
cd reproducer && mvn clean verify -Popenshift
grep -B4 "wait" target/kubernetes/openshift.yml
Output of
uname -a
orver
6.7.3-200.fc39.x86_64
Output of
java -version
Java version: 21.0.1, vendor: Eclipse Adoptium
Quarkus version or git rev
3.8.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Additional information
Container image can be changed via
quarkus.openshift.init-task-defaults.wait-for-container.image
property, but a) for all tasks b) there is no way to change pull policy.The text was updated successfully, but these errors were encountered: