diff options
Diffstat (limited to 'vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1')
4 files changed, 57 insertions, 37 deletions
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 71b38dc2..bc633c1a 100644 --- 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" ) -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"` + AdapterURL string `json:"adapterURL"` 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"` } +// KafkaConfig - defines the desired remote kafka writer configurations 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"` @@ -39,10 +38,16 @@ type QueueConfig struct { // 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 + // 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 diff --git a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/remotefilteraction_types.go b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/remotefilteraction_types.go index 18b3dc6d..4c09698c 100644 --- a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/remotefilteraction_types.go +++ b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/remotefilteraction_types.go @@ -7,8 +7,10 @@ import ( // RemoteFilterActionSpec defines the desired state of RemoteFilterAction // +k8s:openapi-gen=true type RemoteFilterActionSpec struct { - Action string `json:"action,omitempty"` - Regex string `json:"regex,omitempty"` + Action string `json:"action,omitempty"` + Regex string `json:"regex,omitempty"` + // SourceLabels are the labels of the each metric + // +listType=set SourceLabels []string `json:"sourceLabels,omitempty"` TargetLabel string `json:"targetLabel,omitempty"` Replacement string `json:"replacement,omitempty"` diff --git a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.deepcopy.go b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.deepcopy.go index 9fb59405..15aef9f7 100644 --- a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.deepcopy.go +++ b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.deepcopy.go @@ -26,27 +26,6 @@ func (in *KafkaConfig) DeepCopy() *KafkaConfig { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Metadata) DeepCopyInto(out *Metadata) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata. -func (in *Metadata) DeepCopy() *Metadata { - if in == nil { - return nil - } - out := new(Metadata) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PrometheusRemoteEndpoint) DeepCopyInto(out *PrometheusRemoteEndpoint) { *out = *in out.TypeMeta = in.TypeMeta @@ -78,7 +57,7 @@ func (in *PrometheusRemoteEndpoint) DeepCopyObject() runtime.Object { func (in *PrometheusRemoteEndpointList) DeepCopyInto(out *PrometheusRemoteEndpointList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PrometheusRemoteEndpoint, len(*in)) @@ -193,7 +172,7 @@ func (in *RemoteFilterAction) DeepCopyObject() runtime.Object { func (in *RemoteFilterActionList) DeepCopyInto(out *RemoteFilterActionList) { *out = *in out.TypeMeta = in.TypeMeta - out.ListMeta = in.ListMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]RemoteFilterAction, len(*in)) diff --git a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.openapi.go b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.openapi.go index ca4c9511..3dba690e 100644 --- a/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.openapi.go +++ b/vnfs/DAaaS/microservices/remote-config-operator/pkg/apis/onap/v1alpha1/zz_generated.openapi.go @@ -71,7 +71,7 @@ func schema_pkg_apis_onap_v1alpha1_PrometheusRemoteEndpointSpec(ref common.Refer Description: "PrometheusRemoteEndpointSpec defines the desired state of PrometheusRemoteEndpoint", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "adapterUrl": { + "adapterURL": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, Format: "", @@ -106,7 +106,7 @@ func schema_pkg_apis_onap_v1alpha1_PrometheusRemoteEndpointSpec(ref common.Refer }, }, }, - Required: []string{"adapterUrl", "type"}, + Required: []string{"adapterURL", "type"}, }, }, Dependencies: []string{ @@ -120,6 +120,34 @@ func schema_pkg_apis_onap_v1alpha1_PrometheusRemoteEndpointStatus(ref common.Ref SchemaProps: spec.SchemaProps{ Description: "PrometheusRemoteEndpointStatus defines the observed state of PrometheusRemoteEndpoint", Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "prometheusInstance": { + SchemaProps: spec.SchemaProps{ + Description: "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", + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "kafkaWriterID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "remoteURL": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"status"}, }, }, } @@ -189,8 +217,14 @@ func schema_pkg_apis_onap_v1alpha1_RemoteFilterActionSpec(ref common.ReferenceCa }, }, "sourceLabels": { + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-list-type": "set", + }, + }, SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, + Description: "SourceLabels are the labels of the each metric", + Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ |