Skip to content

Commit 03a71eb

Browse files
authored
[backups] Scaffold a backup strategy API group (#1687)
## What this PR does This patch adds the boilerplate for the `strategy.backups.cozystack.io` API group that will contain reference backup/restore strategy implementations that will live in Cozystack core. ### Release note ```release-note [backups] Scaffold the `strategy.backups.cozystack.io` API group to provide a well-defined point for adding reference strategy implementations. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced v1alpha1 backup strategy API group registration, enabling support for backup strategy resources within the system. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents 10d3574 + 0d71525 commit 03a71eb

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
Copyright 2025.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package v1alpha1 contains API Schema definitions for the v1alpha1 API group.
18+
// +kubebuilder:object:generate=true
19+
// +groupName=strategy.backups.cozystack.io
20+
package v1alpha1
21+
22+
import (
23+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24+
"k8s.io/apimachinery/pkg/runtime"
25+
"k8s.io/apimachinery/pkg/runtime/schema"
26+
)
27+
28+
var (
29+
GroupVersion = schema.GroupVersion{Group: "strategy.backups.cozystack.io", Version: "v1alpha1"}
30+
SchemeBuilder = runtime.NewSchemeBuilder(addGroupVersion)
31+
AddToScheme = SchemeBuilder.AddToScheme
32+
)
33+
34+
func addGroupVersion(scheme *runtime.Scheme) error {
35+
metav1.AddToGroupVersion(scheme, GroupVersion)
36+
return nil
37+
}

0 commit comments

Comments
 (0)