fix lint issue

Signed-off-by: renzheng.wang <wangrzneu@gmail.com>
pull/10914/head
renzheng.wang 2022-06-25 22:40:47 +08:00
parent 98ffad01b8
commit b2c5de2e65
3 changed files with 9 additions and 14 deletions

View File

@ -252,7 +252,6 @@ func endpointSliceSourceFromNamespaceAndName(namespace, name string) string {
} }
const ( const (
endpointSliceNameLabel = metaLabelPrefix + "endpointslice_name"
endpointSliceAddressTypeLabel = metaLabelPrefix + "endpointslice_address_type" endpointSliceAddressTypeLabel = metaLabelPrefix + "endpointslice_address_type"
endpointSlicePortNameLabel = metaLabelPrefix + "endpointslice_port_name" endpointSlicePortNameLabel = metaLabelPrefix + "endpointslice_port_name"
endpointSlicePortProtocolLabel = metaLabelPrefix + "endpointslice_port_protocol" endpointSlicePortProtocolLabel = metaLabelPrefix + "endpointslice_port_protocol"

View File

@ -17,13 +17,14 @@ import (
"context" "context"
"errors" "errors"
"fmt" "fmt"
"github.com/prometheus/prometheus/util/strutil"
"os" "os"
"reflect" "reflect"
"strings" "strings"
"sync" "sync"
"time" "time"
"github.com/prometheus/prometheus/util/strutil"
disv1beta1 "k8s.io/api/discovery/v1beta1" disv1beta1 "k8s.io/api/discovery/v1beta1"
"github.com/go-kit/log" "github.com/go-kit/log"

View File

@ -146,18 +146,13 @@ func serviceSourceFromNamespaceAndName(namespace, name string) string {
} }
const ( const (
serviceNameLabel = metaLabelPrefix + "service_name" servicePortNameLabel = metaLabelPrefix + "service_port_name"
serviceLabelPrefix = metaLabelPrefix + "service_label_" servicePortNumberLabel = metaLabelPrefix + "service_port_number"
serviceLabelPresentPrefix = metaLabelPrefix + "service_labelpresent_" servicePortProtocolLabel = metaLabelPrefix + "service_port_protocol"
serviceAnnotationPrefix = metaLabelPrefix + "service_annotation_" serviceClusterIPLabel = metaLabelPrefix + "service_cluster_ip"
serviceAnnotationPresentPrefix = metaLabelPrefix + "service_annotationpresent_" serviceLoadBalancerIP = metaLabelPrefix + "service_loadbalancer_ip"
servicePortNameLabel = metaLabelPrefix + "service_port_name" serviceExternalNameLabel = metaLabelPrefix + "service_external_name"
servicePortNumberLabel = metaLabelPrefix + "service_port_number" serviceType = metaLabelPrefix + "service_type"
servicePortProtocolLabel = metaLabelPrefix + "service_port_protocol"
serviceClusterIPLabel = metaLabelPrefix + "service_cluster_ip"
serviceLoadBalancerIP = metaLabelPrefix + "service_loadbalancer_ip"
serviceExternalNameLabel = metaLabelPrefix + "service_external_name"
serviceType = metaLabelPrefix + "service_type"
) )
func serviceLabels(svc *apiv1.Service) model.LabelSet { func serviceLabels(svc *apiv1.Service) model.LabelSet {