From 7585aae1b47b046dafd9a56f3658175b40606e82 Mon Sep 17 00:00:00 2001 From: Sally O'Malley Date: Mon, 11 Jul 2022 20:49:52 -0400 Subject: [PATCH] kubelet-tracing:update Signed-off-by: Sally O'Malley --- pkg/kubelet/server/server.go | 6 ++++-- staging/src/k8s.io/component-base/tracing/api/OWNERS | 4 +++- staging/src/k8s.io/component-base/tracing/api/v1/types.go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/server/server.go b/pkg/kubelet/server/server.go index a7f4ca9ebbf..495f6376f74 100644 --- a/pkg/kubelet/server/server.go +++ b/pkg/kubelet/server/server.go @@ -63,8 +63,8 @@ import ( "k8s.io/component-base/logs" compbasemetrics "k8s.io/component-base/metrics" "k8s.io/component-base/metrics/legacyregistry" - runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" tracing "k8s.io/component-base/tracing" + runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1" podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1" podresourcesapiv1alpha1 "k8s.io/kubelet/pkg/apis/podresources/v1alpha1" "k8s.io/kubernetes/pkg/api/legacyscheme" @@ -135,7 +135,9 @@ type filteringContainer struct { } func (a *filteringContainer) Handle(path string, handler http.Handler) { - handler = tracing.WithTracing(handler, a.TracerProvider, "kubelet") + if utilfeature.DefaultFeatureGate.Enabled(features.KubeletTracing) { + handler = tracing.WithTracing(handler, a.TracerProvider, "kubelet") + } a.HandleWithFilter(path, handler) a.registeredHandlePaths = append(a.registeredHandlePaths, path) } diff --git a/staging/src/k8s.io/component-base/tracing/api/OWNERS b/staging/src/k8s.io/component-base/tracing/api/OWNERS index b26e7a4dc7e..35cbbae7f3c 100644 --- a/staging/src/k8s.io/component-base/tracing/api/OWNERS +++ b/staging/src/k8s.io/component-base/tracing/api/OWNERS @@ -1,7 +1,9 @@ # See the OWNERS docs at https://go.k8s.io/owners +options: + no_parent_owners: true approvers: - - sig-instrumentation-approvers + - api-approvers reviewers: - sig-instrumentation-reviewers labels: diff --git a/staging/src/k8s.io/component-base/tracing/api/v1/types.go b/staging/src/k8s.io/component-base/tracing/api/v1/types.go index 7b0776fd4c5..a59d564050f 100644 --- a/staging/src/k8s.io/component-base/tracing/api/v1/types.go +++ b/staging/src/k8s.io/component-base/tracing/api/v1/types.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.