Scopes: Add DashboardTitle to scopedashboardbinding (#88609)

scopes: add title to scopedashboardbinding

Signed-off-by: bergquist <carl.bergquist@gmail.com>
This commit is contained in:
Carl Bergquist
2024-06-04 09:36:03 +02:00
committed by GitHub
parent 3af72bdeee
commit c99fe4f970
7 changed files with 22 additions and 44 deletions

View File

@@ -19,9 +19,7 @@ type Scope struct {
type ScopeSpec struct {
Title string `json:"title"`
Type string `json:"type"`
Description string `json:"description"`
Category string `json:"category"`
// +listType=atomic
Filters []ScopeFilter `json:"filters"`
@@ -62,8 +60,10 @@ type ScopeDashboardBinding struct {
}
type ScopeDashboardBindingSpec struct {
Dashboard string `json:"dashboard"`
Scope string `json:"scope"`
Dashboard string `json:"dashboard"`
DashboardTitle string `json:"dashboardTitle"`
Scope string `json:"scope"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@@ -171,6 +171,13 @@ func schema_pkg_apis_scope_v0alpha1_ScopeDashboardBindingSpec(ref common.Referen
Format: "",
},
},
"dashboardTitle": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"scope": {
SchemaProps: spec.SchemaProps{
Default: "",
@@ -179,7 +186,7 @@ func schema_pkg_apis_scope_v0alpha1_ScopeDashboardBindingSpec(ref common.Referen
},
},
},
Required: []string{"dashboard", "scope"},
Required: []string{"dashboard", "dashboardTitle", "scope"},
},
},
}
@@ -424,13 +431,6 @@ func schema_pkg_apis_scope_v0alpha1_ScopeSpec(ref common.ReferenceCallback) comm
Format: "",
},
},
"type": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"description": {
SchemaProps: spec.SchemaProps{
Default: "",
@@ -438,13 +438,6 @@ func schema_pkg_apis_scope_v0alpha1_ScopeSpec(ref common.ReferenceCallback) comm
Format: "",
},
},
"category": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
"filters": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -464,7 +457,7 @@ func schema_pkg_apis_scope_v0alpha1_ScopeSpec(ref common.ReferenceCallback) comm
},
},
},
Required: []string{"title", "type", "description", "category", "filters"},
Required: []string{"title", "description", "filters"},
},
},
Dependencies: []string{