From adade6e936d8711fae2fc34075dbdd96c3f06a8f Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Sat, 27 Jun 2026 02:26:39 +0600 Subject: [PATCH] editor: EditorTemplate request carries chart values Change EditorTemplateRequest to carry the editor chart Values (fetched by the caller) instead of a ChartRef. getChart can exceed the aggregated apiserver request budget, so kube-ui-server only does the fast in-cluster reconstruction from these values; the caller pulls the chart. Signed-off-by: Tamal Saha --- apis/editor/v1alpha1/editortemplate_types.go | 8 +++++--- apis/editor/v1alpha1/openapi_generated.go | 8 ++++---- apis/editor/v1alpha1/zz_generated.deepcopy.go | 9 ++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/apis/editor/v1alpha1/editortemplate_types.go b/apis/editor/v1alpha1/editortemplate_types.go index 8712b6511..09d9d31f5 100644 --- a/apis/editor/v1alpha1/editortemplate_types.go +++ b/apis/editor/v1alpha1/editortemplate_types.go @@ -52,10 +52,12 @@ type EditorTemplate struct { type EditorTemplateRequest struct { releasesapi.ModelMetadata `json:",inline"` - // ChartRef optionally selects the chart source. When unset, the resource - // editor chart resolved from the metadata resource is used. + // Values is the editor chart's values, fetched by the caller. The chart is + // pulled (getChart) by the caller because it can take longer than the + // aggregated apiserver request budget; kube-ui-server only does the fast + // in-cluster reconstruction from these values. // +optional - ChartRef *releasesapi.ChartSourceFlatRef `json:"chartRef,omitempty"` + Values *runtime.RawExtension `json:"values,omitempty"` } type EditorTemplateResponse struct { diff --git a/apis/editor/v1alpha1/openapi_generated.go b/apis/editor/v1alpha1/openapi_generated.go index d7ae3640a..ca3fffcbe 100644 --- a/apis/editor/v1alpha1/openapi_generated.go +++ b/apis/editor/v1alpha1/openapi_generated.go @@ -19703,17 +19703,17 @@ func schema_resource_metadata_apis_editor_v1alpha1_EditorTemplateRequest(ref com Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.Metadata"), }, }, - "chartRef": { + "values": { SchemaProps: spec.SchemaProps{ - Description: "ChartRef optionally selects the chart source. When unset, the resource editor chart resolved from the metadata resource is used.", - Ref: ref("x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceFlatRef"), + Description: "Values is the editor chart's values, fetched by the caller. The chart is pulled (getChart) by the caller because it can take longer than the aggregated apiserver request budget; kube-ui-server only does the fast in-cluster reconstruction from these values.", + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, }, }, Dependencies: []string{ - "x-helm.dev/apimachinery/apis/releases/v1alpha1.ChartSourceFlatRef", "x-helm.dev/apimachinery/apis/releases/v1alpha1.Metadata"}, + "k8s.io/apimachinery/pkg/runtime.RawExtension", "x-helm.dev/apimachinery/apis/releases/v1alpha1.Metadata"}, } } diff --git a/apis/editor/v1alpha1/zz_generated.deepcopy.go b/apis/editor/v1alpha1/zz_generated.deepcopy.go index 6c60b6619..e8d4d6446 100644 --- a/apis/editor/v1alpha1/zz_generated.deepcopy.go +++ b/apis/editor/v1alpha1/zz_generated.deepcopy.go @@ -23,7 +23,6 @@ package v1alpha1 import ( runtime "k8s.io/apimachinery/pkg/runtime" - releasesv1alpha1 "x-helm.dev/apimachinery/apis/releases/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -65,10 +64,10 @@ func (in *EditorTemplate) DeepCopyObject() runtime.Object { func (in *EditorTemplateRequest) DeepCopyInto(out *EditorTemplateRequest) { *out = *in out.ModelMetadata = in.ModelMetadata - if in.ChartRef != nil { - in, out := &in.ChartRef, &out.ChartRef - *out = new(releasesv1alpha1.ChartSourceFlatRef) - **out = **in + if in.Values != nil { + in, out := &in.Values, &out.Values + *out = new(runtime.RawExtension) + (*in).DeepCopyInto(*out) } return }