mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-09 05:25:14 +09:00
## What this PR does This adds custom indexable fields on core backup resources to enable filtering by backed-up application. This will later be useful for displaying backup resources in the dashboard: it will be possible to filter them with a field selector to display only those backup resources that are relevant to a given application. ### Release note ```release-note [backups] Enable filtering backup resources by backed up application for per-app views of backups. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
38 lines
1.1 KiB
Go
38 lines
1.1 KiB
Go
/*
|
|
Copyright 2025.
|
|
|
|
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 contains API Schema definitions for the v1alpha1 API group.
|
|
// +kubebuilder:object:generate=true
|
|
// +groupName=backups.cozystack.io
|
|
package v1alpha1
|
|
|
|
import (
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
|
)
|
|
|
|
var (
|
|
GroupVersion = schema.GroupVersion{Group: "backups.cozystack.io", Version: "v1alpha1"}
|
|
SchemeBuilder = runtime.NewSchemeBuilder(addGroupVersion)
|
|
AddToScheme = SchemeBuilder.AddToScheme
|
|
)
|
|
|
|
func addGroupVersion(scheme *runtime.Scheme) error {
|
|
metav1.AddToGroupVersion(scheme, GroupVersion)
|
|
return nil
|
|
}
|