d5c69fbd4f52ec45a608aa658f06eb762718ceba
[demo.git] / vnfs / DAaaS / microservices / collectd-operator / pkg / apis / onap / v1alpha1 / collectdglobal_types.go
1 package v1alpha1
2
3 import (
4         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5 )
6
7 // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
8
9 // CollectdGlobalSpec defines the desired state of CollectdGlobal
10 // +k8s:openapi-gen=true
11 type CollectdGlobalSpec struct {
12         // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
13         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
14         // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
15         GlobalOptions string `json:"globalOptions"`
16         ConfigMap     string `json:"configMap,omitempty"`
17 }
18
19 // CollectdGlobalStatus defines the observed state of CollectdGlobal
20 // +k8s:openapi-gen=true
21 type CollectdGlobalStatus struct {
22         // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
23         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
24         // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
25         // CollectdAgents are the collectd pods in the Daemonset
26         // Status can be one of "", Created, Deleting, Applied, Deprecated
27         CollectdAgents []string `json:"collectdAgents,omitempty"`
28         Status         string   `json:"status"`
29 }
30
31 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
32
33 // CollectdGlobal is the Schema for the collectdglobals API
34 // +k8s:openapi-gen=true
35 // +kubebuilder:subresource:status
36 type CollectdGlobal struct {
37         metav1.TypeMeta   `json:",inline"`
38         metav1.ObjectMeta `json:"metadata,omitempty"`
39
40         Spec   CollectdGlobalSpec   `json:"spec,omitempty"`
41         Status CollectdGlobalStatus `json:"status,omitempty"`
42 }
43
44 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
45
46 // CollectdGlobalList contains a list of CollectdGlobal
47 type CollectdGlobalList struct {
48         metav1.TypeMeta `json:",inline"`
49         metav1.ListMeta `json:"metadata,omitempty"`
50         Items           []CollectdGlobal `json:"items"`
51 }
52
53 func init() {
54         SchemeBuilder.Register(&CollectdGlobal{}, &CollectdGlobalList{})
55 }