4 corev1 "k8s.io/api/core/v1"
5 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
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.
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"`
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"`
32 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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"`
41 Spec CollectdPluginSpec `json:"spec,omitempty"`
42 Status CollectdPluginStatus `json:"status,omitempty"`
45 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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"`
55 SchemeBuilder.Register(&CollectdPlugin{}, &CollectdPluginList{})