-
Notifications
You must be signed in to change notification settings - Fork 172
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
bug: spec.injectLabels is overwritten if not specified on command line #561
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
keep active |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
How to reproduce:
|
In PR #505, support was added to the tanka cli to control labels injection for the pruning feature.
But a regression was introduced where an already present flag in the spec will not be honoured. If it is set in the spec but not on the command line, the value will always be reset to the default value.
In the code, I believe there is a missing condition to evaluate if the setting was provided in the command line.
The fix is not that trivial, because we don't know if the default value comes from not specifying the value on the command line, or that the user explicitly said
--inject-lables=false
. Otherwize it would be easy, addtmp.Spec.InjectLabels
to the condition:The text was updated successfully, but these errors were encountered: