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

Print valid api versions when specifying one in K8s Client Dev Services #33042

Merged
merged 1 commit into from
May 11, 2023

Conversation

Sgitario
Copy link
Contributor

@Sgitario Sgitario commented May 2, 2023

Plus, accept api-versions that use either the major version v1 only or both the major and the minor versions v1.22.

Note that I wanted to add a test using the Kind dev service, but the test took a while to start, so this is not suitable for the CI.

With these changes, when using an invalid API version (1.25), you will see:

[ERROR]   DevServicesKubernetesUsingKindTest.shouldReturnAllKeys » Runtime java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.kubernetes.client.deployment.DevServicesKubernetesProcessor#setupKubernetesDevService threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid API version 'v1.25' for flavor 'KIND'. Options are: [v1.21.2, v1.22.4, v1.22.5, v1.23.3, v1.24.0, v1.24.1]
        at io.quarkus.kubernetes.client.deployment.DevServicesKubernetesProcessor.setupKubernetesDevService(DevServicesKubernetesProcessor.java:119)

Fix #33007

Plus, accept api-versions that use either the major version `v1` only or both the major and the minor versions `v1.22`. 

Fix quarkusio#33007
@quarkus-bot
Copy link

quarkus-bot bot commented May 2, 2023

✔️ 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.

@maxandersen
Copy link
Member

out of curiosity - what happens if i change that value with quarkus dev running - will it recover if i change the value back or break/require restart ?

@Sgitario
Copy link
Contributor Author

out of curiosity - what happens if i change that value with quarkus dev running - will it recover if i change the value back or break/require restart ?

It will break it, you would need to force a restart ('s').

@Sgitario Sgitario merged commit 936737b into quarkusio:main May 11, 2023
@Sgitario Sgitario deleted the 33016 branch May 11, 2023 07:43
@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone May 11, 2023
@gsmet gsmet modified the milestones: 3.1.0.CR1, 3.0.4.Final May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubernetes dev service weird error when flavor is kind and setting api value
4 participants