[node operator] ScalingGroup API gen

Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
Malte Poll 2022-06-27 11:00:54 +02:00 committed by Malte Poll
parent ac5ddc27f2
commit b315ec6dc1
13 changed files with 304 additions and 0 deletions

View file

@ -0,0 +1,50 @@
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// ScalingGroupSpec defines the desired state of ScalingGroup
type ScalingGroupSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
// Foo is an example field of ScalingGroup. Edit scalinggroup_types.go to remove/update
Foo string `json:"foo,omitempty"`
}
// ScalingGroupStatus defines the observed state of ScalingGroup
type ScalingGroupStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
}
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:resource:scope=Cluster
// ScalingGroup is the Schema for the scalinggroups API
type ScalingGroup struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ScalingGroupSpec `json:"spec,omitempty"`
Status ScalingGroupStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// ScalingGroupList contains a list of ScalingGroup
type ScalingGroupList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ScalingGroup `json:"items"`
}
func init() {
SchemeBuilder.Register(&ScalingGroup{}, &ScalingGroupList{})
}

View file

@ -187,3 +187,92 @@ func (in *NodeImageStatus) DeepCopy() *NodeImageStatus {
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScalingGroup) DeepCopyInto(out *ScalingGroup) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
out.Spec = in.Spec
out.Status = in.Status
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingGroup.
func (in *ScalingGroup) DeepCopy() *ScalingGroup {
if in == nil {
return nil
}
out := new(ScalingGroup)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ScalingGroup) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScalingGroupList) DeepCopyInto(out *ScalingGroupList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ScalingGroup, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingGroupList.
func (in *ScalingGroupList) DeepCopy() *ScalingGroupList {
if in == nil {
return nil
}
out := new(ScalingGroupList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ScalingGroupList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScalingGroupSpec) DeepCopyInto(out *ScalingGroupSpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingGroupSpec.
func (in *ScalingGroupSpec) DeepCopy() *ScalingGroupSpec {
if in == nil {
return nil
}
out := new(ScalingGroupSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ScalingGroupStatus) DeepCopyInto(out *ScalingGroupStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScalingGroupStatus.
func (in *ScalingGroupStatus) DeepCopy() *ScalingGroupStatus {
if in == nil {
return nil
}
out := new(ScalingGroupStatus)
in.DeepCopyInto(out)
return out
}