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

CRD's are not installed with a helm upgrade #3

Open
bbetter173 opened this issue Aug 26, 2024 · 0 comments
Open

CRD's are not installed with a helm upgrade #3

bbetter173 opened this issue Aug 26, 2024 · 0 comments

Comments

@bbetter173
Copy link

As per the helm docs CRD's are not managed beyond the initial installation.

There is no support at this time for upgrading or deleting CRDs using Helm. This was an explicit decision after much community discussion due to the danger for unintentional data loss. Furthermore, there is currently no community consensus around how to handle CRDs and their lifecycle. As this evolves, Helm will add support for those use cases.

This results in the PSC autoscaler crashing after an upgrade:

W0826 00:20:10.376384       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.WorkloadAutomationConfig: the server could not find the requested resource (get workloadautomationconfigs.perfectscale.io)
E0826 00:20:10.376436       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.WorkloadAutomationConfig: failed to list *v1.WorkloadAutomationConfig: the server could not find the requested resource (get workloadautomationconfigs.perfectscale.io)
W0826 00:20:10.376516       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
E0826 00:20:10.376543       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.NamespaceAutomationConfig: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
W0826 00:20:10.471489       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.ClusterAutomationConfig: the server could not find the requested resource (get clusterautomationconfigs.perfectscale.io)
E0826 00:20:10.471528       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.ClusterAutomationConfig: failed to list *v1.ClusterAutomationConfig: the server could not find the requested resource (get clusterautomationconfigs.perfectscale.io)
W0826 00:20:11.373154       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.ClusterAutomationConfig: the server could not find the requested resource (get clusterautomationconfigs.perfectscale.io)
E0826 00:20:11.373184       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.ClusterAutomationConfig: failed to list *v1.ClusterAutomationConfig: the server could not find the requested resource (get clusterautomationconfigs.perfectscale.io)
W0826 00:20:11.373242       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
E0826 00:20:11.373298       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.NamespaceAutomationConfig: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
W0826 00:20:13.296287       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
E0826 00:20:13.296318       1 reflector.go:147] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: Failed to watch *v1.NamespaceAutomationConfig: failed to list *v1.NamespaceAutomationConfig: the server could not find the requested resource (get namespaceautomationconfigs.perfectscale.io)
W0826 00:20:14.572338       1 reflector.go:539] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:229: failed to list *v1.ClusterAutomationConfig: the server could not find the requested resource (get clusterautomationconfigs.perfectscale.io)
...

To workaround this issue, you must deploy the CRD updates manually:

kubectl apply -f https://raw.githubusercontent.com/perfectscale-io/perfectscale-io.github.io/main/charts/psc-autoscaler/crds/workloadautomationstatus.yaml
kubectl apply -f https://raw.githubusercontent.com/perfectscale-io/perfectscale-io.github.io/main/charts/psc-autoscaler/crds/workloadautomationconfig.yaml
kubectl apply -f https://raw.githubusercontent.com/perfectscale-io/perfectscale-io.github.io/main/charts/psc-autoscaler/crds/namespaceautomationconfig.yaml
kubectl apply -f https://raw.githubusercontent.com/perfectscale-io/perfectscale-io.github.io/main/charts/psc-autoscaler/crds/clusterautomationconfig.yaml

A common solution to this issue is to use a post-upgrade hook in helm to run a job that functionally does the same thing as above, but automated.

@perfectscale-io perfectscale-io deleted a comment Aug 26, 2024
@perfectscale-io perfectscale-io deleted a comment Aug 26, 2024
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

1 participant