Collectd Operator Unit Tests
[demo.git] / vnfs / DAaaS / microservices / collectd-operator / pkg / apis / onap / v1alpha1 / collectdglobal_types.go
1 /*
2 Copyright 2019 Intel Corporation.
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6     http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software
8 distributed under the License is distributed on an "AS IS" BASIS,
9 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 See the License for the specific language governing permissions and
11 limitations under the License.
12 */
13
14 package v1alpha1
15
16 import (
17         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
18 )
19
20 // NOTE: json tags are required.  Any new fields you add must have json tags for the fields to be serialized.
21
22 // CollectdGlobalSpec defines the desired state of CollectdGlobal
23 // +k8s:openapi-gen=true
24 type CollectdGlobalSpec struct {
25         // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
26         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
27         // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
28         GlobalOptions string `json:"globalOptions"`
29         ConfigMap     string `json:"configMap,omitempty"`
30 }
31
32 // CollectdGlobalStatus defines the observed state of CollectdGlobal
33 // +k8s:openapi-gen=true
34 type CollectdGlobalStatus struct {
35         // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
36         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
37         // Add custom validation using kubebuilder tags: https://book.kubebuilder.io/beyond_basics/generating_crd.html
38         // CollectdAgents are the collectd pods in the Daemonset
39         // Status can be one of "", Created, Deleting, Applied, Deprecated
40         CollectdAgents []string `json:"collectdAgents,omitempty"`
41         Status         string   `json:"status"`
42 }
43
44 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
45
46 // CollectdGlobal is the Schema for the collectdglobals API
47 // +k8s:openapi-gen=true
48 // +kubebuilder:subresource:status
49 type CollectdGlobal struct {
50         metav1.TypeMeta   `json:",inline"`
51         metav1.ObjectMeta `json:"metadata,omitempty"`
52
53         Spec   CollectdGlobalSpec   `json:"spec,omitempty"`
54         Status CollectdGlobalStatus `json:"status,omitempty"`
55 }
56
57 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
58
59 // CollectdGlobalList contains a list of CollectdGlobal
60 type CollectdGlobalList struct {
61         metav1.TypeMeta `json:",inline"`
62         metav1.ListMeta `json:"metadata,omitempty"`
63         Items           []CollectdGlobal `json:"items"`
64 }
65
66 func init() {
67         SchemeBuilder.Register(&CollectdGlobal{}, &CollectdGlobalList{})
68 }