Skip to content

Commit

Permalink
delete functionally similar yaml packages
Browse files Browse the repository at this point in the history
Signed-off-by: LiZhenCheng9527 <[email protected]>
  • Loading branch information
LiZhenCheng9527 committed Jan 22, 2024
1 parent 7fd9cd3 commit 2189757
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 26 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ require (
github.com/vmware-tanzu/velero v1.11.1
golang.org/x/crypto v0.16.0
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v3 v3.0.1
helm.sh/helm/v3 v3.12.3
istio.io/api v0.0.0-20231006162241-350617755635
istio.io/istio v0.0.0-20231011021742-2dddcc9c9238
Expand Down Expand Up @@ -246,6 +245,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
istio.io/client-go v1.18.4-0.20231006163629-bd311827a565 // indirect
k8s.io/cluster-bootstrap v0.27.8 // indirect
k8s.io/gengo v0.0.0-20230306165830-ab3349d207d4 // indirect
Expand Down
2 changes: 1 addition & 1 deletion pkg/fleet-manager/application/rollout_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (
corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/yaml"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/yaml"

applicationapi "kurator.dev/kurator/pkg/apis/apps/v1alpha1"
fleetapi "kurator.dev/kurator/pkg/apis/fleet/v1alpha1"
Expand Down
82 changes: 60 additions & 22 deletions pkg/plugin/prometheus/testdata/prometheus-additional.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,64 @@
- job_name: remote1
honor_timestamps: false
params:
- BodySizeLimit: 0B
HTTPClientConfig:
enable_http2: true
follow_redirects: true
proxy_url: null
tls_config:
insecure_skip_verify: false
HonorLabels: false
HonorTimestamps: false
JobName: remote1
KeepDroppedTargets: 0
LabelLimit: 0
LabelNameLengthLimit: 0
LabelValueLengthLimit: 0
MetricRelabelConfigs: null
MetricsPath: /federate
NativeHistogramBucketLimit: 0
Params:
match[]:
- '{__name__=~".+"}'
metrics_path: /federate
follow_redirects: true
enable_http2: true
static_configs:
- targets:
- remote1.cluster:9090
labels:
- '{__name__=~".+"}'
RelabelConfigs: null
SampleLimit: 0
Scheme: ""
ScrapeClassicHistograms: false
ScrapeInterval: 0s
ScrapeTimeout: 0s
ServiceDiscoveryConfigs:
- - labels:
cluster: remote1
- job_name: remote2
honor_timestamps: false
params:
targets:
- remote1.cluster:9090
TargetLimit: 0
- BodySizeLimit: 0B
HTTPClientConfig:
enable_http2: true
follow_redirects: true
proxy_url: null
tls_config:
insecure_skip_verify: false
HonorLabels: false
HonorTimestamps: false
JobName: remote2
KeepDroppedTargets: 0
LabelLimit: 0
LabelNameLengthLimit: 0
LabelValueLengthLimit: 0
MetricRelabelConfigs: null
MetricsPath: /federate
NativeHistogramBucketLimit: 0
Params:
match[]:
- '{__name__=~".+"}'
metrics_path: /federate
follow_redirects: true
enable_http2: true
static_configs:
- targets:
- remote2.cluster:9090
labels:
- '{__name__=~".+"}'
RelabelConfigs: null
SampleLimit: 0
Scheme: ""
ScrapeClassicHistograms: false
ScrapeInterval: 0s
ScrapeTimeout: 0s
ServiceDiscoveryConfigs:
- - labels:
cluster: remote2
targets:
- remote2.cluster:9090
TargetLimit: 0
2 changes: 1 addition & 1 deletion pkg/plugin/prometheus/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/prometheus/common/model"
promcfg "github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery"
"gopkg.in/yaml.v3"
"sigs.k8s.io/yaml"
)

type endpoint struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ import (
apiextv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/yaml"
cmdtesting "k8s.io/kubectl/pkg/cmd/testing"
"k8s.io/kubectl/pkg/scheme"
"sigs.k8s.io/yaml"

"kurator.dev/kurator/pkg/typemeta"
)
Expand Down

0 comments on commit 2189757

Please sign in to comment.