Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
)

const (
ResourceKindEditorTemplate = "EditorTemplate"
ResourceEditorTemplate = "editortemplate"
ResourceEditorTemplates = "editortemplates"
ResourceKindEditorModel = "EditorModel"
ResourceEditorModel = "editormodel"
ResourceEditorModels = "editormodels"
)

// EditorTemplate loads the editor model, manifest and resources for an existing
// EditorModel loads the editor model, manifest and resources for an existing
// installation identified by its metadata. It is the aggregated-API equivalent
// of kubepack.dev/lib-app/pkg/editor.LoadResourceEditorModel (see
// chart_template.go loadEditorModel2).
Expand All @@ -40,17 +40,17 @@ const (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster
type EditorTemplate struct {
type EditorModel struct {
metav1.TypeMeta `json:",inline"`
// Request identifies the installation to load.
// +optional
Request *EditorTemplateRequest `json:"request,omitempty"`
Request *EditorModelRequest `json:"request,omitempty"`
// Response holds the loaded editor template.
// +optional
Response *EditorTemplateResponse `json:"response,omitempty"`
Response *EditorModelResponse `json:"response,omitempty"`
}

type EditorTemplateRequest struct {
type EditorModelRequest struct {
releasesapi.ModelMetadata `json:",inline"`
// 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
Expand All @@ -60,7 +60,7 @@ type EditorTemplateRequest struct {
Values *runtime.RawExtension `json:"values,omitempty"`
}

type EditorTemplateResponse struct {
type EditorModelResponse struct {
// Manifest is the rendered manifest of the existing installation.
// +optional
Manifest string `json:"manifest,omitempty"`
Expand All @@ -69,10 +69,10 @@ type EditorTemplateResponse struct {
Values *runtime.RawExtension `json:"values,omitempty"`
// Resources holds the individual resources of the existing installation.
// +optional
Resources []EditorTemplateResource `json:"resources,omitempty"`
Resources []EditorModelResource `json:"resources,omitempty"`
}

type EditorTemplateResource struct {
type EditorModelResource struct {
// +optional
Filename string `json:"filename,omitempty"`
// +optional
Expand Down
744 changes: 372 additions & 372 deletions apis/editor/v1alpha1/openapi_generated.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apis/editor/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Resource(resource string) schema.GroupResource {
// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&EditorTemplate{},
&EditorModel{},
)

scheme.AddKnownTypes(SchemeGroupVersion,
Expand Down
40 changes: 20 additions & 20 deletions apis/editor/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading