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

Ability to *not* generate app.kubernetes.io/version label #31296

Closed
derlin opened this issue Feb 20, 2023 · 1 comment · Fixed by #31373
Closed

Ability to *not* generate app.kubernetes.io/version label #31296

derlin opened this issue Feb 20, 2023 · 1 comment · Fixed by #31373
Labels
Milestone

Comments

@derlin
Copy link
Contributor

derlin commented Feb 20, 2023

Description

Kubernetes labels are immutable. Thus, having non-stable labels (such as a version) is very problematic when upgrading.
This should be part of the same effort as:

Here is a real use-case for which this label is highly problematic. I have a kubernetes operator built with Java Operator SDK. Having those changing labels (especially the version) makes it impossible to use the Operator Framework: when upgrading through operator framework, the InstallPlan fails with "field is immutable". (see operator-framework/operator-lifecycle-manager#1608).

I was able to avoid the issue by setting quarkus.kubernetes.add-version-to-label-selectors=false which incidentally removed the version label, but this behaviour has changed in #30100 . It now still adds the version label, just not uses it in the selector... I cannot find another workaround, and believe that the ability to control the labels added is useful in many cases.

Implementation ideas

Possible implementations were already proposed for annotations, which could be reused for labels as well (see #15473)

@derlin derlin added the kind/enhancement New feature or request label Feb 20, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 20, 2023

/cc @Sgitario (kubernetes), @geoand (kubernetes), @iocanel (kubernetes)

Sgitario added a commit to Sgitario/quarkus that referenced this issue Feb 23, 2023
[x] Added new property `quarkus.kubernetes.idempotent=true` to avoid producing non idempotent resources.
[x] Added new property `quarkus.kubernetes.output-directory` to select the target directory where to generate the resources.

Fix quarkusio#26928
Fix quarkusio#15473
Fix quarkusio#31296
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant