-
Notifications
You must be signed in to change notification settings - Fork 106
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
HNC under Kubernetes 1.22 : "error resolving resource" #86
Comments
What flavour of K8s is this - e.g. managed (GKE, EKS, etc) or self-hosted (e.g. VMWare etc)? This error message looks pretty suspicious to me:
That error's coming directly from the K8s apiserver, not from HNC. There shouldn't be any way for us to cause an internal error in the server. This sounds like a bug for K8s itself. One question - if you fully uninstall HNC (again), do all the other problems go away? E.g. you can delete namespaces, create quotas, etc? (HNC doesn't do anything with quotas by default, did you configure it to manage them?) |
Hello @adrianludwin
|
Hey sorry for the delay @ledroide. Just another question - you say you can easily reproduce the problem with 1.22, what are the steps to doing this? E.g. if you have have some script that you could run that would cause this problem, that would be great and I could try it out. |
@adrianludwin : HNC was running fine with Kubernetes 1.21.5. We have upgraded our clusters to Kubernetes 1.22.2 (using standard kubespray - which relies on kubeadm and ansible). We immediately noticed a weird behavior with resources finalizers, at first regarding namespaces deletion and quotas usage - as described here above. |
Ah, I somehow missed that it was working fine earlier, sorry. I'll check this out on 1.22. |
Ok, I've reproduced this on 1.22. Somehow our CRDs have a conversion webhook specified even though there's nothing to convert - something must have changed in our build process. Changing the conversion strategy to None seems to fix this. I'll fix this in v0.9 ASAP. |
Not sure why we're only seeing this in 1.22 though. |
I'll also consider backporting this to v0.8.1. |
@ledroide Do you want me to patch v0.8 with this? It's fairly easy for you to apply locally, just remove the "conversion" from all three CRDs:
|
@adrianludwin : I have removed 3 occurrences of this conversion section in the hnc CRDs, and applied.
From my side, this patch fixes the issue for Kubernetes 1.22. |
Thanks @ledroide . Sorry this took so long to resolve, but I'm glad it's working now. I'll be releasing v0.9 soon (this week, hopefully) and this will be fixed in that version. I'll keep this bug open as a reminder to file a bug against K8s (it's not good that a config this simple can crash the apiserver). |
After upgrading a cluster from Kubernetes 1.21.5 to 1.22.2,
I have removed all HNC resources including CRD, as explained in [#1255] (kubernetes-retired/multi-tenancy#1255 (comment)), then checked the effective removal :
Then I have reinstalled HNC controller v0.8.0 + hncconfiguration as documented (standard manifests). Everything looks good.
However, resources aren't recognized by the API :
Maybe a clue here :
$ kubectl describe customresourcedefinition.apiextensions.k8s.io/hierarchyconfigurations.hnc.x-k8s.io [...] Message: could not list instances: unable to find a custom resource client for hierarchyconfigurations.hnc.x-k8s.io: unable to load root certificates: unable to parse bytes as PEM block
Note : there are some apiVersions that come deprecated with Kubernetes 1.22, but in the HNC code, it looks like nothing is deprecated anyway. Please have a look to Kubernetes changelog.
Additional info :
Manifests used from hnc-v0.8.0 tag.
The text was updated successfully, but these errors were encountered: