no matches for kind "Deployment" in version "apps/v1beta1" when I upgrade to 2.4.+

Summary

when I upgrade gitlab to version 2.4.2 use kubernetes 1.16.2

Steps to reproduce

(Please provide the steps to reproduce the issue) execute this command

helm upgrade gitlab-bana gitlab/gitlab -f gitlab-values.yaml --version=2.4.2

I got this error

root@iZm5efs4sbjrz6mm7yrhqzZ helm_plugin]# helm upgrade gitlab-bana gitlab/gitlab -f gitlab-values.yaml --version=2.4.2
UPGRADE FAILED
Error: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"]
Error: UPGRADE FAILED: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"]

Configuration used

(Please provide a sanitized version of the configuration used wrapped in a code block (```yaml))

any configuration got this

Current behavior

root@iZm5efs4sbjrz6mm7yrhqzZ helm_plugin]# helm upgrade gitlab-bana gitlab/gitlab -f gitlab-values.yaml --version=2.4.2
UPGRADE FAILED
Error: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"]
Error: UPGRADE FAILED: [unable to recognize "": no matches for kind "Deployment" in version "apps/v1beta1", unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"]

Expected behavior

upgrade success!

Versions

  • Chart: 2.4.1
  • Platform:
    • Cloud: ECS
  • Kubernetes: (kubectl version)
    • Client: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
    • Server: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
  • Helm: (helm version)
    • Client: Client: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}
    • Server: Server: &version.Version{SemVer:"v2.14.3", GitCommit:"0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState:"clean"}

Relevant logs

I can work fine after this step!

  1. helm fetch gitlab/gitlab --version=2.4.2

  2. tar gitlab-2.4.2.tgz to gitlab-2.4.2 dictionary

  3. modify gitlab/charts/cert-manager/templates/deployment.yaml change apiVersion: apps/v1beta1 -> apiVersion: apps/v1 modify gitlab/charts/postgresql/templates/deployment.yaml change apiVersion: extensions/v1beta1 -> apiVersion: apps/v1

  4. then I upgrade use local chart , it works. helm upgrade gitlab-bana gitlab-2.4.2/gitlab -f gitlab-values.yaml