helm/helm-mapkubeapis

selector not generated for Deployment when upgrade extensions/v1beta1 to apps/v1

isaactl opened this issue · 4 comments

background

we have a old version(extensions/v1beta1) of configuration for Deployment that didn't set selector field, this has been running in k8s 1.14. While migrating to k8s 1.16, we found extensions/v1beta1 has deprecated. for the new version 'apps/v1', the selector field is now a required field according to schema. than i use this plugin to upgrade configuration in cluster

issue

although we have the apiVersion upgraded, but the selector field is not generated, and cause some issues to do further helm upgrade

Any thoughts, ideas will be appreciated!

@isaactl If you update the chart to contain the selector, does it then work when you do an upgrade? If not what is the error output?

hi @hickeyma yes, in that case, i can do the upgrade without an issue.
my scenario is fetch the manifest from k8s and do the upgrade based on that manifest(for example, update the image field only). since the selector is missing, the update manifest become invalid. i've tried kubectl convert, it does generate the selector. i can certainly add this field by myself, just wondering if mapkubeapis can also support this? thanks!

@isaactl It is good that you are able to progress and not blocked.

i can certainly add this field by myself, just wondering if mapkubeapis can also support this?

It is a good point that you raise. I would however prefer keeping the plugin to do the sole job of updating release APIs. I want to avoid introducing additional capabilities as there are numerous other updates that could be added like status etc. The problem with this is that the code base would balloon and a limit would be found on what could be supported or not. The plugin should be simple.

Hope this answers your questions.

@hickeyma i understand keep this plugin simple is important, so i'll close this issue. thanks for the reply!