Code Review
/
demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remote Write Config and Filter operator
[demo.git]
/
vnfs
/
DAaaS
/
microservices
/
remote-config-operator
/
pkg
/
apis
/
onap
/
v1alpha1
/
prometheusremoteendpoint_types.go
diff --git
a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/prometheusremoteendpoint_types.go
b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/prometheusremoteendpoint_types.go
index
71b38dc
..
bc633c1
100644
(file)
--- a/
vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/prometheusremoteendpoint_types.go
+++ b/
vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/prometheusremoteendpoint_types.go
@@
-4,15
+4,10
@@
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
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 {
// PrometheusRemoteEndpointSpec defines the desired state of PrometheusRemoteEndpoint
// +k8s:openapi-gen=true
type PrometheusRemoteEndpointSpec struct {
- AdapterU
rl string `json:"adapterUrl
"`
+ AdapterU
RL string `json:"adapterURL
"`
FilterSelector *metav1.LabelSelector `json:"filterSelector,omitempty"`
Type string `json:"type"`
KafkaConfig string `json:"kafkaConfig,omitempty"`
FilterSelector *metav1.LabelSelector `json:"filterSelector,omitempty"`
Type string `json:"type"`
KafkaConfig string `json:"kafkaConfig,omitempty"`
@@
-20,12
+15,16
@@
type PrometheusRemoteEndpointSpec struct {
RemoteTimeout string `json:"remoteTimeout,omitempty"`
}
RemoteTimeout string `json:"remoteTimeout,omitempty"`
}
+// KafkaConfig - defines the desired remote kafka writer configurations
type KafkaConfig struct {
type KafkaConfig struct {
- BrokerUrl string `json:"brokerUrl"`
- Group string `json:"group,omitempty"`
- Topic string `json:"topic"`
+ BrokerURL string `json:"bootstrap.servers"`
+ Topic string `json:"topic"`
+ UsePartition bool `json:"usePartition"`
+ BatchMsgNum int `json:"batch.num.messages,omitempty`
+ Compression string `json:"compression.codec,omitempty`
}
}
+// QueueConfig - defines the prometheus remote write queue configurations
type QueueConfig struct {
BatchSendDeadline string `json:"batchSendDeadline,omitempty"`
Capacity string `json:"capacity,omitempty"`
type QueueConfig struct {
BatchSendDeadline string `json:"batchSendDeadline,omitempty"`
Capacity string `json:"capacity,omitempty"`
@@
-39,10
+38,16
@@
type QueueConfig struct {
// PrometheusRemoteEndpointStatus defines the observed state of PrometheusRemoteEndpoint
// +k8s:openapi-gen=true
// PrometheusRemoteEndpointStatus defines the observed state of PrometheusRemoteEndpoint
// +k8s:openapi-gen=true
+// +kubebuilder:subresource:status
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
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
+ // Status can be Error, Enabled
+ PrometheusInstance string `json:"prometheusInstance,omitempty"`
+ Status string `json:"status"`
+ KafkaWriterID string `json:"kafkaWriterID,omitempty"`
+ RemoteURL string `json:"remoteURL,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object