Closed kyungminchoi closed 3 months ago
If you're using client-go, your best option is probably just to create the HNC API objects directly and send them through the generic client - that's what the HNS plugin does. I doubt any of the internal code would add much value to you, it's a pretty straightforward translation of command-line to API.
On Sun, Nov 5, 2023, 6:54 p.m. kyungminchoi @.***> wrote:
hello. I have a question. Is it possible to use the kubectl-hns plugin in REST API form? For example, currently I am using client-go to call the k8s api when creating a namespace within an application developed in the go language. I would like to modify the part that creates this namespace to the code that creates a subnamespace.
— Reply to this email directly, view it on GitHub https://github.com/kubernetes-sigs/hierarchical-namespaces/issues/345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE43PZAAEWY4DJ2RLFWQM6DYDARMNAVCNFSM6AAAAAA66V3INOVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3TQMBTGQYTEMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @adrianludwin, first off: Stellar effort on this project!
I'd also like to drive HNS via the API. We programmatically create compute "jobs" (which are basically entire applications). Each job works in its own namespace. HNS is a god-sent for managing permissions.
I've been looking at the documents that get created when assembling a hierarchy via kubectl
. I think I can possibly reverse engineer the API calls, but it'll be a lot of trial and error. I also tried added verbosity (like kubectl -v=8
which normally shows the API calls) but that option isn't available in the HNS plugin.
Is there anything you could point us at that would help in divining the correct API calls?
Thanks a bunch in advance!
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
hello. I have a question. Is it possible to use the kubectl-hns plugin in REST API form? For example, currently I am using client-go to call the k8s api when creating a namespace within an application developed in the go language. I would like to modify the part that creates this namespace to the code that creates a subnamespace.