Skip to content
Closed
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
11 changes: 10 additions & 1 deletion cue/dashboard/dashboard_go_gen.cue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@ import plugin_9 "github.com/perses/spec/cue/plugin"
}

#PanelSpec: {
// Preserve unknown fields so plugins and downstream tooling can attach display-level
// metadata without it being pruned at admission. The declared fields above stay validated;
// Schemaless is intentionally not used, as that would drop their schema entirely.
// +kubebuilder:pruning:PreserveUnknownFields
Comment thread
Nexucis marked this conversation as resolved.
display?: null | #PanelDisplay @go(Display,*PanelDisplay)
plugin: plugin_9.#Plugin @go(Plugin)
queries?: [...#Query] @go(Queries,[]Query)
links?: [...#Link] @go(Links,[]Link)
}

#Panel: {
kind: string @go(Kind)
kind: string @go(Kind)

// Preserve unknown fields so plugins and downstream tooling can attach panel-level
// metadata without it being pruned at admission. The declared fields stay validated;
// Schemaless is intentionally not used, as that would drop their schema entirely.
// +kubebuilder:pruning:PreserveUnknownFields
spec: #PanelSpec @go(Spec)
}

Expand Down
10 changes: 9 additions & 1 deletion go/dashboard/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,22 @@ type PanelDisplay struct {
}

type PanelSpec struct {
// Preserve unknown fields so plugins and downstream tooling can attach display-level
// metadata without it being pruned at admission. The declared fields above stay validated;
// Schemaless is intentionally not used, as that would drop their schema entirely.
// +kubebuilder:pruning:PreserveUnknownFields
Display *PanelDisplay `json:"display,omitempty" yaml:"display,omitempty"`
Plugin plugin.Plugin `json:"plugin" yaml:"plugin"`
Queries []Query `json:"queries,omitempty" yaml:"queries,omitempty"`
Links []Link `json:"links,omitempty" yaml:"links,omitempty"`
}

type Panel struct {
Kind string `json:"kind" yaml:"kind"`
Kind string `json:"kind" yaml:"kind"`
// Preserve unknown fields so plugins and downstream tooling can attach panel-level
// metadata without it being pruned at admission. The declared fields stay validated;
// Schemaless is intentionally not used, as that would drop their schema entirely.
// +kubebuilder:pruning:PreserveUnknownFields
Spec PanelSpec `json:"spec" yaml:"spec"`
}

Expand Down
Loading