Serve editor.ui.k8s.appscode.com read-only editor APIs#429
Closed
tamalsaha wants to merge 1 commit into
Closed
Conversation
Add registry storages for the new editor.ui.k8s.appscode.com/v1alpha1 group: - EditorRender renders an editor model/manifest/resources from options. - EditorTemplate loads them for an existing installation. Both wrap kubepack.dev/lib-app/pkg/editor and serve each request with a client that impersonates the API caller (apirequest.UserFrom + rest.ImpersonationConfig), so every read performed while rendering or loading is authorized against the caller's own RBAC. Wired into the aggregated apiserver alongside the existing meta/cost groups. Requires the kube-ui-server service account to hold impersonate on users/groups/userextras. Read-only only; apply/delete stay in b3. Bumps resource-metadata to pull in the editor API types. Signed-off-by: Tamal Saha <tamal@appscode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Serves a new read-only aggregated API group
editor.ui.k8s.appscode.com/v1alpha1fromkube-ui-server:output= model|manifest|resources).Both wrap
kubepack.dev/lib-app/pkg/editor(already vendored) and are registered in the aggregated apiserver next to the existing meta/cost groups.Authorization (resources touched as the caller)
Each request is served by a controller-runtime client + lib-helm registry that impersonate the API caller (
apirequest.UserFrom(ctx)→rest.ImpersonationConfig). Every read performed while rendering/loading is therefore authorized against the caller's own RBAC.Scope
Read-only only. Apply (
PUT /editor/) and delete (DELETE /editor/) remain in b3. The load path deliberately skipsCreateAppReleaseIfMissingto stay read-only (matchingmeta.resourcemanifests).Depends on
Design doc:
docs/design/editor-api.md. Part 2 of a 3-repo change (resource-metadata → ui-server → b3).