/
microvmmachinetemplate_types.go
40 lines (31 loc) · 1.25 KB
/
microvmmachinetemplate_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2021 Weaveworks or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MPL-2.0
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// MicrovmMachineTemplateSpec defines the desired state of MicrovmMachineTemplate.
type MicrovmMachineTemplateSpec struct {
Template MicrovmMachineTemplateResource `json:"template"`
}
// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +kubebuilder:resource:path=microvmmachinetemplates,scope=Namespaced,categories=cluster-api,shortName=mvmmt
// +k8s:defaulter-gen=true
// MicrovmMachineTemplate is the Schema for the microvmmachinetemplates API.
type MicrovmMachineTemplate struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MicrovmMachineTemplateSpec `json:"spec,omitempty"`
}
//+kubebuilder:object:root=true
// MicrovmMachineTemplateList contains a list of MicrovmMachineTemplate.
type MicrovmMachineTemplateList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []MicrovmMachineTemplate `json:"items"`
}
//nolint:gochecknoinits // Maybe we can remove it, now just ignore.
func init() {
SchemeBuilder.Register(&MicrovmMachineTemplate{}, &MicrovmMachineTemplateList{})
}