mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-24 00:28:18 +00:00
58 lines
1.6 KiB
Go
58 lines
1.6 KiB
Go
|
// +kubebuilder:object:generate=true
|
||
|
// +groupName=caos.ch
|
||
|
package v1
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/orbos/pkg/tree"
|
||
|
orbdb "github.com/caos/zitadel/operator/database/kinds/orb"
|
||
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||
|
"k8s.io/apimachinery/pkg/runtime/schema"
|
||
|
"sigs.k8s.io/controller-runtime/pkg/scheme"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
// GroupVersion is group version used to register these objects
|
||
|
GroupVersion = schema.GroupVersion{Group: "caos.ch", Version: "v1"}
|
||
|
|
||
|
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
|
||
|
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
|
||
|
|
||
|
// AddToScheme adds the types in this group-version to the given scheme.
|
||
|
AddToScheme = SchemeBuilder.AddToScheme
|
||
|
)
|
||
|
|
||
|
// +kubebuilder:storageversion
|
||
|
// +kubebuilder:object:root=true
|
||
|
// +kubebuilder:crd=Database
|
||
|
type Database struct {
|
||
|
metav1.TypeMeta `json:",inline"`
|
||
|
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||
|
|
||
|
Spec Spec `json:"spec,omitempty"`
|
||
|
Status Status `json:"status,omitempty"`
|
||
|
}
|
||
|
|
||
|
type Status struct {
|
||
|
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
||
|
// Important: Run "make" to regenerate code after modifying this file
|
||
|
}
|
||
|
|
||
|
type Spec struct {
|
||
|
Common *tree.Common `json:",inline" yaml:",inline"`
|
||
|
Spec *orbdb.Spec `json:"spec" yaml:"spec"`
|
||
|
Database *Empty `json:"database" yaml:"database"`
|
||
|
}
|
||
|
|
||
|
type Empty struct{}
|
||
|
|
||
|
// +kubebuilder:object:root=true
|
||
|
type DatabaseList struct {
|
||
|
metav1.TypeMeta `json:",inline"`
|
||
|
metav1.ListMeta `json:"metadata,omitempty"`
|
||
|
Items []Database `json:"items"`
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
SchemeBuilder.Register(&Database{}, &DatabaseList{})
|
||
|
}
|