71b38dc2ec242adbc63571650c429b020aa9e03d
[demo.git] / vnfs / DAaaS / microservices / remote-config-operator / pkg / apis / onap / v1alpha1 / prometheusremoteendpoint_types.go
1 package v1alpha1
2
3 import (
4         metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5 )
6
7 type Metadata struct {
8         Name   string   `json:"Name"`
9         Labels []string `json:"Labels"`
10 }
11
12 // PrometheusRemoteEndpointSpec defines the desired state of PrometheusRemoteEndpoint
13 // +k8s:openapi-gen=true
14 type PrometheusRemoteEndpointSpec struct {
15         AdapterUrl     string                `json:"adapterUrl"`
16         FilterSelector *metav1.LabelSelector `json:"filterSelector,omitempty"`
17         Type           string                `json:"type"`
18         KafkaConfig    string                `json:"kafkaConfig,omitempty"`
19         QueueConfig    QueueConfig           `json:"queueConfig,omitempty"`
20         RemoteTimeout  string                `json:"remoteTimeout,omitempty"`
21 }
22
23 type KafkaConfig struct {
24         BrokerUrl string `json:"brokerUrl"`
25         Group     string `json:"group,omitempty"`
26         Topic     string `json:"topic"`
27 }
28
29 type QueueConfig struct {
30         BatchSendDeadline string `json:"batchSendDeadline,omitempty"`
31         Capacity          string `json:"capacity,omitempty"`
32         MaxBackoff        string `json:"maxBackoff,omitempty"`
33         MaxRetries        string `json:"maxRetries,omitempty"`
34         MaxSamplesPerSend string `json:"maxSamplesPerSend,omitempty"`
35         MaxShards         string `json:"maxShards,omitempty"`
36         MinBackoff        string `json:"minBackoff,omitempty"`
37         MinShards         string `json:"minShards,omitempty"`
38 }
39
40 // PrometheusRemoteEndpointStatus defines the observed state of PrometheusRemoteEndpoint
41 // +k8s:openapi-gen=true
42 type PrometheusRemoteEndpointStatus struct {
43         // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
44         // Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
45         // Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
46 }
47
48 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
49
50 // PrometheusRemoteEndpoint is the Schema for the prometheusremoteendpoints API
51 // +k8s:openapi-gen=true
52 // +kubebuilder:subresource:status
53 // +kubebuilder:resource:path=prometheusremoteendpoints,scope=Namespaced
54 type PrometheusRemoteEndpoint struct {
55         metav1.TypeMeta   `json:",inline"`
56         metav1.ObjectMeta `json:"metadata,omitempty"`
57
58         Spec   PrometheusRemoteEndpointSpec   `json:"spec,omitempty"`
59         Status PrometheusRemoteEndpointStatus `json:"status,omitempty"`
60 }
61
62 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
63
64 // PrometheusRemoteEndpointList contains a list of PrometheusRemoteEndpoint
65 type PrometheusRemoteEndpointList struct {
66         metav1.TypeMeta `json:",inline"`
67         metav1.ListMeta `json:"metadata,omitempty"`
68         Items           []PrometheusRemoteEndpoint `json:"items"`
69 }
70
71 func init() {
72         SchemeBuilder.Register(&PrometheusRemoteEndpoint{}, &PrometheusRemoteEndpointList{})
73 }