Collectd operator utilties
[demo.git] / vnfs / DAaaS / microservices / collectd-operator / pkg / apis / onap / v1alpha1 / collectdplugin_types.go
1 package v1alpha1
2
3 import (
4         corev1 "k8s.io/api/core/v1"
5         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
6 )
7
8 // EDIT THIS FILE!  THIS IS SCAFFOLDING FOR YOU TO OWN!
9 // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
10
11 // CollectdPluginSpec defines the desired state of CollectdPlugin
12 // +k8s:openapi-gen=true
13 type CollectdPluginSpec struct {
14         // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
15         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
16         // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
17         PluginName string `json:"pluginName"`
18         PluginConf string `json:"pluginConf"`
19 }
20
21 // CollectdPluginStatus defines the observed state of CollectdPlugin
22 // +k8s:openapi-gen=true
23 type CollectdPluginStatus 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.kubebuilder.io/beyond_basics/generating_crd.html
27         // CollectdAgents are the collectd pods in the Daemonset
28         CollectdAgents []string         `json:"collectdAgents"`
29         CollectdConf   corev1.ConfigMap `json:"collectdConf"`
30 }
31
32 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
33
34 // CollectdPlugin is the Schema for the collectdplugins API
35 // +k8s:openapi-gen=true
36 // +kubebuilder:subresource:status
37 type CollectdPlugin struct {
38         metav1.TypeMeta   `json:",inline"`
39         metav1.ObjectMeta `json:"metadata,omitempty"`
40
41         Spec   CollectdPluginSpec   `json:"spec,omitempty"`
42         Status CollectdPluginStatus `json:"status,omitempty"`
43 }
44
45 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
46
47 // CollectdPluginList contains a list of CollectdPlugin
48 type CollectdPluginList struct {
49         metav1.TypeMeta `json:",inline"`
50         metav1.ListMeta `json:"metadata,omitempty"`
51         Items           []CollectdPlugin `json:"items"`
52 }
53
54 func init() {
55         SchemeBuilder.Register(&CollectdPlugin{}, &CollectdPluginList{})
56 }