Yes the deployment is actually successful on the cluster, nevertheless I fixed the pipeline issue in the meantime.
In fact, GitLab needs that the deployment name is equal to the current environment name. For example, when working on the master branch the environment name GitLab uses is “production”, so the deployment name must be “production”. If you work on another branch, the environment name will be different.
The solution is to set the name of the deployment equal to the current environment name. In my repository (see above) I only had to update the values.yaml file with:
The next step is indeed to change the name of the deployment depending on the environment name. One way to do it is by using environment variables. First create another file containing the staging values: values.staging.yaml. Then, in the navigation pane, select Settings > CI/CD . Expand the Variables section and add a new variable called HELM_UPGRADE_EXTRA_ARGS. Set this variable to the name of the file containing the staging values, in my example: values.staging.yaml
Make sure that this environment variable is associated to a specific stage by updating the scope like shown in this picture.
Hope this helps.