Code refactoring for bpa operator
[icn.git] / cmd / bpa-operator / pkg / apis / bpa / v1alpha1 / software_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 // SoftwareSpec defines the desired state of Software
11 // +k8s:openapi-gen=true
12 type SoftwareSpec 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         //MasterSoftware map[string][]interface{} `json:"masterSoftware,omitempty"`
17         MasterSoftware []interface{} `json:"masterSoftware,omitempty"`
18         WorkerSoftware []interface{} `json:"workerSoftware,omitempty"`
19 }
20
21 // SoftwareStatus defines the observed state of Software
22 // +k8s:openapi-gen=true
23 type SoftwareStatus 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 // Software is the Schema for the softwares API
32 // +k8s:openapi-gen=true
33 // +kubebuilder:subresource:status
34 type Software struct {
35         metav1.TypeMeta   `json:",inline"`
36         metav1.ObjectMeta `json:"metadata,omitempty"`
37
38         Spec   SoftwareSpec   `json:"spec,omitempty"`
39         Status SoftwareStatus `json:"status,omitempty"`
40 }
41
42 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
43
44 // SoftwareList contains a list of Software
45 type SoftwareList struct {
46         metav1.TypeMeta `json:",inline"`
47         metav1.ListMeta `json:"metadata,omitempty"`
48         Items           []Software `json:"items"`
49 }
50
51 func init() {
52         SchemeBuilder.Register(&Software{}, &SoftwareList{})
53 }