-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): introducing KamajiControlPlaneTemplate for ClusterClass su…
…pport (#107) Signed-off-by: Dario Tranchitella <[email protected]> Co-authored-by: Roman Hros <[email protected]>
- Loading branch information
1 parent
c82c1e4
commit d05ade0
Showing
13 changed files
with
13,834 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2023 Clastix Labs | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" | ||
) | ||
|
||
// KamajiControlPlaneTemplateSpec defines the desired state of KamajiControlPlaneTemplate. | ||
type KamajiControlPlaneTemplateSpec struct { | ||
Template KamajiControlPlaneTemplateResource `json:"template"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+kubebuilder:resource:categories=cluster-api;kamaji,shortName=ktcpt | ||
|
||
// KamajiControlPlaneTemplate is the Schema for the kamajicontrolplanetemplates API. | ||
type KamajiControlPlaneTemplate struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec KamajiControlPlaneTemplateSpec `json:"spec,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
|
||
// KamajiControlPlaneTemplateList contains a list of KamajiControlPlaneTemplate. | ||
type KamajiControlPlaneTemplateList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []KamajiControlPlaneTemplate `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&KamajiControlPlaneTemplate{}, &KamajiControlPlaneTemplateList{}) | ||
} | ||
|
||
// KamajiControlPlaneTemplateResource describes the data needed to create a KamajiControlPlane from a template. | ||
type KamajiControlPlaneTemplateResource struct { | ||
// Standard object's metadata. | ||
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | ||
// +optional | ||
ObjectMeta clusterv1.ObjectMeta `json:"metadata,omitempty"` | ||
Spec KamajiControlPlaneFields `json:"spec"` | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.