Merge "Added BMH e2e test and enabled kud plugins"
[icn.git] / cmd / bpa-operator / pkg / apis / bpa / v1alpha1 / provisioning_types.go
1 package v1alpha1
2
3 import (
4         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5 )
6
7 // EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
8 // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
9
10 // ProvisioningSpec defines the desired state of Provisioning
11 // +k8s:openapi-gen=true
12 type ProvisioningSpec struct {
13         // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
14         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
15         // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
16         Masters []map[string]Master  `json:"masters,omitempty"`
17         Workers []map[string]Worker  `json:"workers,omitempty"`
18         KUDPlugins []string `json:"KUDPlugins,omitempty"`
19 }
20
21 // ProvisioningStatus defines the observed state of Provisioning
22 // +k8s:openapi-gen=true
23 type ProvisioningStatus struct {
24         // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
25         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
26         // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
27 }
28
29 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
30
31 // Provisioning is the Schema for the provisionings API
32 // +k8s:openapi-gen=true
33 // +kubebuilder:subresource:status
34 type Provisioning struct {
35         metav1.TypeMeta   `json:",inline"`
36         metav1.ObjectMeta `json:"metadata,omitempty"`
37
38         Spec   ProvisioningSpec   `json:"spec,omitempty"`
39         Status ProvisioningStatus `json:"status,omitempty"`
40 }
41
42 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
43
44 // ProvisioningList contains a list of Provisioning
45 type ProvisioningList struct {
46         metav1.TypeMeta `json:",inline"`
47         metav1.ListMeta `json:"metadata,omitempty"`
48         Items           []Provisioning `json:"items"`
49 }
50
51 // master struct contains resource requirements for a master node
52 type Master struct {
53         MACaddress string `json:"mac-address,omitempty"`
54         CPU int32  `json:"cpu,omitempty"`
55         Memory string  `json:"memory,omitempty"`
56 }
57
58 // worker struct contains resource requirements for a worker node
59 type Worker struct {
60         MACaddress string `json:"mac-address,omitempty"`
61         CPU int32 `json:"cpu,omitempty"`
62         Memory string  `json:"memory,omitempty"`
63         SRIOV bool  `json:"sriov,omitempty"`
64         QAT  bool      `json:"qat,omitempty"`
65 }
66
67 func init() {
68         SchemeBuilder.Register(&Provisioning{}, &ProvisioningList{})
69 }