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

Stash Helm upgrade not working because of removed PodSecurityPolicy feature #1563

Open
ZeiP opened this issue Apr 1, 2024 · 2 comments
Open

Comments

@ZeiP
Copy link

ZeiP commented Apr 1, 2024

I have Stash v2023.05.31 installed through Helm. My Kubernetes environment is upgraded by DigitalOcean and is currently in 1.26.13-do.0, which unfortunately already has had the PodSecurityPolicy feature removed (which was removed in 1.25).

I tried to figure out how to repair my installation based on, for example, the Helm instructions for this kind of case, but they seem to rely on there being a successor for the API, while PodSecurityPolicy apparently doesn't have a clear successor. stashed/installer#278 seems to have something to do with this, but I can't really figure out how to fix it. Would it be possible to get some guidance from you on how I could get my setup upgraded? IMO this would also be something that'd be good to have in the upgrade instructions, as I suppose not everyone controls their cluster upgrades (and maybe forgets Helm upgrades for a while).

The actual output I'm getting is
Error: UPGRADE FAILED: current release manifest contains removed kubernetes api(s) for this kubernetes version and it is therefore unable to build the kubernetes objects for performing the diff. error from kubernetes: unable to recognize "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"

Additionally I'm getting these errors for example when applying new (unrelated) configuration, not sure if that also has to do with this:

> E0401 23:11:32.027784  305132 memcache.go:287] couldn't get resource list for repositories.stash.appscode.com/v1alpha1: the server is currently unable to handle the request
> E0401 23:11:32.041431  305132 memcache.go:287] couldn't get resource list for admission.stash.appscode.com/v1alpha1: the server is currently unable to handle the request
> E0401 23:11:32.054092  305132 memcache.go:287] couldn't get resource list for admission.stash.appscode.com/v1beta1: the server is currently unable to handle the request
> E0401 23:11:32.109729  305132 memcache.go:121] couldn't get resource list for admission.stash.appscode.com/v1beta1: the server is currently unable to handle the request
> E0401 23:11:32.160312  305132 memcache.go:121] couldn't get resource list for repositories.stash.appscode.com/v1alpha1: the server is currently unable to handle the request
> E0401 23:11:32.211513  305132 memcache.go:121] couldn't get resource list for admission.stash.appscode.com/v1alpha1: the server is currently unable to handle the request

@MrCoffey
Copy link

MrCoffey commented Apr 4, 2024

I have the same issue when trying to install the latest version v2024.2.13 I think the PodSecurityPolicy has to be upgraded, it's no longer supported by Kubernetes.

unable to build Kubernetes objects from current release manifest: resource mapping not found for name: "privileged" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1"

@ZeiP
Copy link
Author

ZeiP commented Nov 9, 2024

Decided to take another peek at this. I tried removing the Stash helm altogether, but that also failed due to the broken manifest. What helped was first installing a tool for fixing broken APIs helm plugin install https://github.com/helm/helm-mapkubeapis and running it helm mapkubeapis -n stash stash. After that the uninstalling worked and I was able to re-install Stash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants