4 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
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.
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 KUDInstaller string `json:"kudInstallerPath,omitempty"`
19 DHCPleaseFile string `json:"dhcpLeaseFile,omitempty"`
20 MultiClusterPath string `json:"multiClusterDir,omitempty"`
23 // ProvisioningStatus defines the observed state of Provisioning
24 // +k8s:openapi-gen=true
25 type ProvisioningStatus struct {
26 // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
27 // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
28 // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
31 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
33 // Provisioning is the Schema for the provisionings API
34 // +k8s:openapi-gen=true
35 // +kubebuilder:subresource:status
36 type Provisioning struct {
37 metav1.TypeMeta `json:",inline"`
38 metav1.ObjectMeta `json:"metadata,omitempty"`
40 Spec ProvisioningSpec `json:"spec,omitempty"`
41 Status ProvisioningStatus `json:"status,omitempty"`
44 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
46 // ProvisioningList contains a list of Provisioning
47 type ProvisioningList struct {
48 metav1.TypeMeta `json:",inline"`
49 metav1.ListMeta `json:"metadata,omitempty"`
50 Items []Provisioning `json:"items"`
53 // master struct contains resource requirements for a master node
55 MACaddress string `json:"mac-address,omitempty"`
56 CPU int32 `json:"cpu,omitempty"`
57 Memory string `json:"memory,omitempty"`
60 // worker struct contains resource requirements for a worker node
62 MACaddress string `json:"mac-address,omitempty"`
63 CPU int32 `json:"cpu,omitempty"`
64 Memory string `json:"memory,omitempty"`
65 SRIOV bool `json:"sriov,omitempty"`
66 QAT bool `json:"qat,omitempty"`
70 SchemeBuilder.Register(&Provisioning{}, &ProvisioningList{})