Scaling Fails After Initial Deployment on Kubernetes 1.17
On Gitlab 13.1.4 with Kubernetes 1.17, a production deployment of an app with PRODUCTION_REPLICAS set to 2 succeeds in deploying two instances the first time the app is ever deployed to the cluster, but on all subsequent deployments the rollout step succeeds
$ auto-deploy deploy rollout $ROLLOUT_PERCENTAGE secret "production-rollout-secret" deleted secret/production-rollout-secret replaced Using helm values file '.gitlab/auto-deploy-values.yaml' Deploying new rollout release... Release "production-rollout" has been upgraded.
but fails when being scaled.
$ auto-deploy scale stable $((100-ROLLOUT_PERCENTAGE)) Error: UPGRADE FAILED: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1" UPGRADE FAILED Error: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
Tried overriding the deploymentApiVersion as described in https://docs.gitlab.com/ee/topics/autodevops/stages.html#kubernetes-116, though this seems like it should be unnecessary given the version of gitlab being used. This failed to resolve the issue.
Builds are using auto-deploy-image 0.17.0
Using Kubernetes executor with image registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v0.17.0 ...
Cluster is Kubernetes 1.17.6
Kubernetes: &version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.6", GitCommit:"d32e40e20d167e103faf894261614c5b45c44198", GitTreeState:"clean", BuildDate:"2020-05-20T13:08:34Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"} Server: &version.Version{SemVer:"v2.16.7", GitCommit:"5f2584fd3d35552c4af26036f0c464191287986b", GitTreeState:"clean"}