Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding label to ws-manager prevents updating Gitpod with the Installer #8653

Closed
corneliusludmann opened this issue Mar 8, 2022 · 5 comments
Labels
component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team

Comments

@corneliusludmann
Copy link
Contributor

With 44ef470 we added new labels to the ws-manager. However, that seems to prevent users from updating their Gitpod installation with the Installer. Following errors occurs:

for: "k8s.yaml": Deployment.apps "ws-manager-bridge" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{"app":"gitpod", "component":"ws-manager-bridge"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable

We need to find a way to update Gitpod with the Installer despite the changes of immutable fields.

@corneliusludmann corneliusludmann added component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team labels Mar 8, 2022
@corneliusludmann corneliusludmann added this to the release/2022.03 milestone Mar 8, 2022
@jimmybrancaccio
Copy link

jimmybrancaccio commented Mar 10, 2022

I think I may be experiencing this issue as well using main.2647 - https://ghostbin.linuxbox.ninja/paste/6btjh If what I am seeing is something different, let me know and I can create a new issue!

Update: I was able to get my instance updated to main.2651 with the help of @mrsimonemms. I ended up having to delete a few of the DaemonSets, the openvsx-proxy StatefulSet and a bunch of Deployments.

@nandajavarma
Copy link
Contributor

@corneliusludmann As this is a difficult problem to handle from the side of installer at this point, I am wondering if we should add a note to the upgrade guide a workaround for the problem, much like how @jimmybrancaccio solved the issue.

My suggestion is to do add a command to delete the objects with the flag --cascade=orphan on the DaemonSets/Deployments that has an immutable field changed. This makes the DS or deployment object to "orphan" the pods controlled by it, and reattach following an apply. This avoids the necessity of a restart on all the resources.

@mrsimonemms
Copy link
Contributor

I added a note to the 2022.03.0 release on how to upgrade


This release introduces some new labels for some resources. As labels are immutable properties, these resources will need to be deleted before upgrade can be made - this is basically all the Gitpod deployments/daemonsets/statefulsets

NB this will cause a short amount of downtime when these releases are deleted and before they are reapplied. Ensure you plan your upgrade accordingly.

kubectl delete deployments.apps blobserve content-service dashboard ide-proxy image-builder-mk3 proxy server ws-manager ws-manager-bridge ws-proxy \
&& kubectl delete daemonset.apps agent-smith registry-facade ws-daemon \
&& kubectl delete statefulset.apps openvsx-proxy

@nandajavarma
Copy link
Contributor

@mrsimonemms perfect! sorry I missed that!

@mrsimonemms
Copy link
Contributor

Don't worry about it. I couldn't find this ticket either.

I think this can be closed. Reopen if you think it needs any more work

Repository owner moved this from 🤝Proposed to ✨Done in 🚚 Security, Infrastructure, and Delivery Team (SID) Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team
Projects
No open projects
Development

No branches or pull requests

4 participants