aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/prometheusremoteendpoint_types.go
blob: 71b38dc2ec242adbc63571650c429b020aa9e03d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package v1alpha1

import (
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

type Metadata struct {
	Name   string   `json:"Name"`
	Labels []string `json:"Labels"`
}

// PrometheusRemoteEndpointSpec defines the desired state of PrometheusRemoteEndpoint
// +k8s:openapi-gen=true
type PrometheusRemoteEndpointSpec struct {
	AdapterUrl     string                `json:"adapterUrl"`
	FilterSelector *metav1.LabelSelector `json:"filterSelector,omitempty"`
	Type           string                `json:"type"`
	KafkaConfig    string                `json:"kafkaConfig,omitempty"`
	QueueConfig    QueueConfig           `json:"queueConfig,omitempty"`
	RemoteTimeout  string                `json:"remoteTimeout,omitempty"`
}

type KafkaConfig struct {
	BrokerUrl string `json:"brokerUrl"`
	Group     string `json:"group,omitempty"`
	Topic     string `json:"topic"`
}

type QueueConfig struct {
	BatchSendDeadline string `json:"batchSendDeadline,omitempty"`
	Capacity          string `json:"capacity,omitempty"`
	MaxBackoff        string `json:"maxBackoff,omitempty"`
	MaxRetries        string `json:"maxRetries,omitempty"`
	MaxSamplesPerSend string `json:"maxSamplesPerSend,omitempty"`
	MaxShards         string `json:"maxShards,omitempty"`
	MinBackoff        string `json:"minBackoff,omitempty"`
	MinShards         string `json:"minShards,omitempty"`
}

// PrometheusRemoteEndpointStatus defines the observed state of PrometheusRemoteEndpoint
// +k8s:openapi-gen=true
type PrometheusRemoteEndpointStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "operator-sdk generate k8s" to regenerate code after modifying this file
	// Add custom validation using kubebuilder tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PrometheusRemoteEndpoint is the Schema for the prometheusremoteendpoints API
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=prometheusremoteendpoints,scope=Namespaced
type PrometheusRemoteEndpoint struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PrometheusRemoteEndpointSpec   `json:"spec,omitempty"`
	Status PrometheusRemoteEndpointStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// PrometheusRemoteEndpointList contains a list of PrometheusRemoteEndpoint
type PrometheusRemoteEndpointList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []PrometheusRemoteEndpoint `json:"items"`
}

func init() {
	SchemeBuilder.Register(&PrometheusRemoteEndpoint{}, &PrometheusRemoteEndpointList{})
}