-
Notifications
You must be signed in to change notification settings - Fork 17
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
Fix generation of already present resources #892
Conversation
Signed-off-by: David Cassany <[email protected]>
{{ if and (eq (index $channel.metadata.labels "app.kubernetes.io/managed-by") "Helm") (ne $channel.metadata.name $defChannelName) }} | ||
{{ range $_, $channel := (lookup "elemental.cattle.io/v1beta1" "ManagedOSVersionChannel" "fleet-default" "").items }} | ||
{{ if and (eq (index $channel.metadata.labels "app.kubernetes.io/managed-by") "Helm") (not (hasKey $includedChannels $channel.metadata.name)) }} | ||
{{ if and (ne $channel.metadata.name "unstable-testing-channel") (ne $channel.metadata.name $defChannelName) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure none of the generated here is already listed as default channel or testing channel
Signed-off-by: David Cassany <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix.
I wonder if it would be simpler at this point to deprecate the .channel
chart value, since we have the default channels now. If users want to add a custom channel they could simply create their own ManagedOSVersionChannel resource and be done with it, without us having to manage the lifecycle with Helm.
Still this should work, nicely done!
I agree, this is something we could get rid of. I'd just leave it for the next release though. |
* Fix generation of already present resources Signed-off-by: David Cassany <[email protected]> * Fix legacy name Signed-off-by: David Cassany <[email protected]> --------- Signed-off-by: David Cassany <[email protected]>
* Fix generation of already present resources * Fix legacy name --------- Signed-off-by: David Cassany <[email protected]>
Fixes #881