[14.0 Breaking Change] Bump the major version of auto-deploy-image in Jobs/Deploy.gitlab-ci.yml
Description
As per gitlab-org/cluster-integration/auto-deploy-image#67 (closed), we've released v1.0.0 of auto-deploy-image
, and soon, we will start working on v2.0.0 for Canary Ingress support.
The v2 chart would not have backward compatibility with v0 or v1 charts. Therefore, if we bump the major version of auto-deploy-image in Jobs/Deploy.gitlab-ci.yml, some users would encounter Major version mismatch warning and they need to proceed 1. Manually upgrade the chart version or 2. Use a specific chart version.
Troubleshooting
Basically, all of the upgrade/troubleshooting information are described in the upgrade guide. When a user encountered a problem, they should either:
- [RECOMMENDED] Upgrade the Kubernetes instance according to the guidance, OR
- Use a legacy version of Auto Deploy dependencies. You can also use this Auto DevOps 13.12 archived project.
The information is also surfaced in the job log.
Example for the 2nd option
Create the following .gitlab-ci.yml
in their Auto DevOps project.
include:
- template: Auto-DevOps.gitlab-ci.yml
- remote: https://gitlab.com/gitlab-org/gitlab/-/raw/v13.12.0-ee/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml
or
include:
- remote: 'https://gitlab.com/hfyngvason/auto-devops-v13-12/-/raw/master/Auto-DevOps-remote.gitlab-ci.yml'
(See https://gitlab.com/hfyngvason/auto-devops-v13-12 for more info)
Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: **Ingress**
You might still encounter an error at production
job execution after the Helm 3 update. Something like the following error:
Error: UPGRADE FAILED: rendered manifests contain a resource that already exists. Unable to continue with update: Ingress "production-auto-deploy" in namespace "helm-upgrade-test-2-27323651-production" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "production"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "helm-upgrade-test-2-27323651-production"
This is because different apiVersion
is set to the Ingress resource during the helm upgrade
(See this comment for more information). To fix it, use v2.4.0
of auto-deploy-image for the deployment job. e.g.
include:
- template: Auto-DevOps.gitlab-ci.yml
.auto-deploy:
image: registry.gitlab.com/gitlab-org/cluster-integration/auto-deploy-image:v2.4.0
After that you can use any v2 versions of auto-deploy-image.