[node operator] AutoscalingStrategy API gen

Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
Malte Poll 2022-06-27 10:59:51 +02:00 committed by Malte Poll
parent f100febfa2
commit ac5ddc27f2
14 changed files with 355 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.
// AutoscalingStrategySpec defines the desired state of AutoscalingStrategy
type AutoscalingStrategySpec 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 AutoscalingStrategy. Edit autoscalingstrategy_types.go to remove/update
Foo string `json:"foo,omitempty"`
}
// AutoscalingStrategyStatus defines the observed state of AutoscalingStrategy
type AutoscalingStrategyStatus 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
// AutoscalingStrategy is the Schema for the autoscalingstrategies API
type AutoscalingStrategy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AutoscalingStrategySpec `json:"spec,omitempty"`
Status AutoscalingStrategyStatus `json:"status,omitempty"`
}
//+kubebuilder:object:root=true
// AutoscalingStrategyList contains a list of AutoscalingStrategy
type AutoscalingStrategyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AutoscalingStrategy `json:"items"`
}
func init() {
SchemeBuilder.Register(&AutoscalingStrategy{}, &AutoscalingStrategyList{})
}

View file

@ -10,6 +10,95 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AutoscalingStrategy) DeepCopyInto(out *AutoscalingStrategy) {
*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 AutoscalingStrategy.
func (in *AutoscalingStrategy) DeepCopy() *AutoscalingStrategy {
if in == nil {
return nil
}
out := new(AutoscalingStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AutoscalingStrategy) 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 *AutoscalingStrategyList) DeepCopyInto(out *AutoscalingStrategyList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]AutoscalingStrategy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingStrategyList.
func (in *AutoscalingStrategyList) DeepCopy() *AutoscalingStrategyList {
if in == nil {
return nil
}
out := new(AutoscalingStrategyList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *AutoscalingStrategyList) 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 *AutoscalingStrategySpec) DeepCopyInto(out *AutoscalingStrategySpec) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingStrategySpec.
func (in *AutoscalingStrategySpec) DeepCopy() *AutoscalingStrategySpec {
if in == nil {
return nil
}
out := new(AutoscalingStrategySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AutoscalingStrategyStatus) DeepCopyInto(out *AutoscalingStrategyStatus) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoscalingStrategyStatus.
func (in *AutoscalingStrategyStatus) DeepCopy() *AutoscalingStrategyStatus {
if in == nil {
return nil
}
out := new(AutoscalingStrategyStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodeImage) DeepCopyInto(out *NodeImage) {
*out = *in