HNC upgrade for deprecated API versions.

21 views
Skip to first unread message

Geo P.C.

unread,
Feb 14, 2022, 10:52:51 AM2/14/22
to kubernetes-wg-multitenancy, Adrian Ludwin, Yiqi Gao

Hi Team

We are using hnc in our system in which we uses manifest files for hnc like this:

```
apiVersion: hnc.x-k8s.io/v1alpha2
kind: HierarchyConfiguration
metadata:
  name: hierarchy
  namespace: b
spec:
  parent: a
```


Please see the attached hnc-manager manifest file currently using and our AKS version is v1.19.13.

Now we are planning to upgrade AKS version to v1.22 and as part of it apiVersion admissionregistration.k8s.io/v1beta1 and apiextensions.k8s.io/v1beta1 got depreciated (https://kubernetes.io/docs/reference/using-api/deprecation-guide/#webhook-resources-v122)

We tried simply changing the apiVersion in manifest files from admissionregistration.k8s.io/v1beta1 to admissionregistration.k8s.io/v1
and apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1 in \hnc\crds\hnc-manager.yaml but its not working.

So please let us know how we can upgrade hnc and what's the easiest method in this as we are using lot of HierarchyConfiguration files to manage rolebindings in namespaces.

Thanks & Regards
Geo P.C.

hnc.yaml

Adrian Ludwin

unread,
Feb 14, 2022, 11:24:16 AM2/14/22
to Geo P.C., kubernetes-wg-multitenancy, Yiqi Gao
Hi, it looks like you're using a very old version of HNC (v0.6.0). The latest version is v0.9.0 and only uses the v1 API: https://github.com/kubernetes-sigs/hierarchical-namespaces/releases/tag/v0.9.0.

You may want to update to v0.7.0 and v0.8.0 instead of going straight to v0.9.0, I've never tested going straight from v0.6.0 to v0.9.0. There's no reason I can think of that it shouldn't work, but I can't guarantee that it will work either. You can probably just skip that if the cluster you're installing on isn't too critical. Note that all versions prior to v0.9 are on our old repo.

Cheers, A

Geo P.C.

unread,
Feb 14, 2022, 11:47:51 AM2/14/22
to Adrian Ludwin, kubernetes-wg-multitenancy, Yiqi Gao
Thanks... Can you please let me know the upgrade steps.

Adrian Ludwin

unread,
Mar 28, 2022, 11:15:18 PM3/28/22
to kubernetes-wg-multitenancy
Hmm, sorry, I thought I answered this. The upgrade instructions should be on the releases page, it's mainly about "kubectl apply -f <manifest file>" for the cluster, and using Krew for the client. Is there something confusing in the instructions?

Cheers, A

Geo P.C.

unread,
Mar 29, 2022, 12:26:47 AM3/29/22
to Adrian Ludwin, kubernetes-wg-multitenancy
Hi Adrian

Thanks a lot. We were able to successfully upgrade HNC to the latest version and everything looks good.

Thanks & Regards
Geo P.C.

--
You received this message because you are subscribed to the Google Groups "kubernetes-wg-multitenancy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-wg-multi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-wg-multitenancy/7d6dd457-23f1-4a70-8444-896fd7304e64n%40googlegroups.com.

Adrian Ludwin

unread,
Mar 29, 2022, 12:36:03 AM3/29/22
to kubernetes-wg-multitenancy
Great, thanks! Note that HNC v1.0 should be out shortly (hopefully this week if all goes well). You can test the latest RC at https://github.com/kubernetes-sigs/hierarchical-namespaces/releases/tag/v1.0.0-rc1.
Reply all
Reply to author
Forward
0 new messages