Skip to content

Commit

Permalink
Add ResourceOutlineFilter api (#518)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Dec 15, 2024
1 parent b50f027 commit 531c7df
Show file tree
Hide file tree
Showing 24 changed files with 1,914 additions and 489 deletions.
5 changes: 5 additions & 0 deletions .config/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/shared,UIParameters,InstanceLabelPaths
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplate,Icons
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplateGroup,Items
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ActionTemplateGroupFilter,Items
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ChartInfo,ValuesFiles
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,Dashboard,Panels
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,Dashboard,Vars
Expand All @@ -70,6 +71,10 @@ API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1a
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourceDashboardSpec,Dashboards
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourceEditorSpec,Icons
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourceEditorSpec,Variants
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourceOutlineFilterSpec,Actions
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourceOutlineFilterSpec,Pages
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,ResourcePageOutlineFilter,Sections
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,SectionOutlineFilter,Blocks
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,UIParameters,Actions
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,UIParameters,InstanceLabelPaths
API rule violation: list_type_missing,kmodules.xyz/resource-metadata/apis/ui/v1alpha1,VariantRef,Icons
Expand Down
89 changes: 89 additions & 0 deletions apis/meta/v1alpha1/openapi_generated.go

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

2 changes: 2 additions & 0 deletions apis/meta/v1alpha1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ResourceEditorList{},
&ResourceOutline{},
&ResourceOutlineList{},
&ResourceOutlineFilter{},
&ResourceOutlineFilterList{},
&ResourceLayout{},
&ResourceLayoutList{},
&Menu{},
Expand Down
52 changes: 52 additions & 0 deletions apis/meta/v1alpha1/resourceoutlinefilter_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
uiapi "kmodules.xyz/resource-metadata/apis/ui/v1alpha1"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
ResourceKindResourceOutlineFilter = "ResourceOutlineFilter"
ResourceResourceOutlineFilter = "resourceoutlinefilter"
ResourceResourceOutlineFilters = "resourceoutlinefilters"
)

// +genclient
// +genclient:nonNamespaced
// +genclient:onlyVerbs=get
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=resourceoutlinefilters,singular=resourceoutlinefilter,scope=Cluster
type ResourceOutlineFilter struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec uiapi.ResourceOutlineFilterSpec `json:"spec,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:object:root=true

type ResourceOutlineFilterList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ResourceOutlineFilter `json:"items,omitempty"`
}
60 changes: 60 additions & 0 deletions apis/meta/v1alpha1/zz_generated.deepcopy.go

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

Loading

0 comments on commit 531c7df

Please sign in to comment.