mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Merge pull request #115750 from saschagrunert/otel-beta
Graduate `KubeletTracing` feature to beta
This commit is contained in:
commit
1586138519
@ -1280,7 +1280,7 @@ func newTracerProvider(s *options.KubeletServer) (oteltrace.TracerProvider, erro
|
|||||||
}
|
}
|
||||||
hostname, err := nodeutil.GetHostname(s.HostnameOverride)
|
hostname, err := nodeutil.GetHostname(s.HostnameOverride)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not determine hostname for tracer provider: %v", err)
|
return nil, fmt.Errorf("could not determine hostname for tracer provider: %w", err)
|
||||||
}
|
}
|
||||||
resourceOpts := []otelsdkresource.Option{
|
resourceOpts := []otelsdkresource.Option{
|
||||||
otelsdkresource.WithAttributes(
|
otelsdkresource.WithAttributes(
|
||||||
@ -1290,7 +1290,7 @@ func newTracerProvider(s *options.KubeletServer) (oteltrace.TracerProvider, erro
|
|||||||
}
|
}
|
||||||
tp, err := tracing.NewProvider(context.Background(), s.KubeletConfiguration.Tracing, []otlptracegrpc.Option{}, resourceOpts)
|
tp, err := tracing.NewProvider(context.Background(), s.KubeletConfiguration.Tracing, []otlptracegrpc.Option{}, resourceOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not configure tracer provider: %v", err)
|
return nil, fmt.Errorf("could not configure tracer provider: %w", err)
|
||||||
}
|
}
|
||||||
return tp, nil
|
return tp, nil
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,7 @@ STORAGE_BACKEND=${STORAGE_BACKEND:-"etcd3"}
|
|||||||
STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-"application/vnd.kubernetes.protobuf"}
|
STORAGE_MEDIA_TYPE=${STORAGE_MEDIA_TYPE:-"application/vnd.kubernetes.protobuf"}
|
||||||
# preserve etcd data. you also need to set ETCD_DIR.
|
# preserve etcd data. you also need to set ETCD_DIR.
|
||||||
PRESERVE_ETCD="${PRESERVE_ETCD:-false}"
|
PRESERVE_ETCD="${PRESERVE_ETCD:-false}"
|
||||||
|
ENABLE_TRACING=${ENABLE_TRACING:-false}
|
||||||
|
|
||||||
# enable Kubernetes-CSI snapshotter
|
# enable Kubernetes-CSI snapshotter
|
||||||
ENABLE_CSI_SNAPSHOTTER=${ENABLE_CSI_SNAPSHOTTER:-false}
|
ENABLE_CSI_SNAPSHOTTER=${ENABLE_CSI_SNAPSHOTTER:-false}
|
||||||
@ -753,7 +754,7 @@ staticPodPath: "${POD_MANIFEST_PATH}"
|
|||||||
resolvConf: "${KUBELET_RESOLV_CONF}"
|
resolvConf: "${KUBELET_RESOLV_CONF}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [[ "$FEATURE_GATES" == *KubeletTracing=true* ]]; then
|
if [[ "$ENABLE_TRACING" = true ]]; then
|
||||||
cat <<EOF >> "${TMP_DIR}"/kubelet.yaml
|
cat <<EOF >> "${TMP_DIR}"/kubelet.yaml
|
||||||
tracing:
|
tracing:
|
||||||
endpoint: localhost:4317 # the default value
|
endpoint: localhost:4317 # the default value
|
||||||
|
@ -460,6 +460,7 @@ const (
|
|||||||
// owner: @sallyom
|
// owner: @sallyom
|
||||||
// kep: https://kep.k8s.io/2832
|
// kep: https://kep.k8s.io/2832
|
||||||
// alpha: v1.25
|
// alpha: v1.25
|
||||||
|
// beta: v1.27
|
||||||
//
|
//
|
||||||
// Add support for distributed tracing in the kubelet
|
// Add support for distributed tracing in the kubelet
|
||||||
KubeletTracing featuregate.Feature = "KubeletTracing"
|
KubeletTracing featuregate.Feature = "KubeletTracing"
|
||||||
@ -1013,7 +1014,7 @@ var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureS
|
|||||||
|
|
||||||
KubeletPodResourcesGetAllocatable: {Default: true, PreRelease: featuregate.Beta},
|
KubeletPodResourcesGetAllocatable: {Default: true, PreRelease: featuregate.Beta},
|
||||||
|
|
||||||
KubeletTracing: {Default: false, PreRelease: featuregate.Alpha},
|
KubeletTracing: {Default: true, PreRelease: featuregate.Beta},
|
||||||
|
|
||||||
LegacyServiceAccountTokenNoAutoGeneration: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29
|
LegacyServiceAccountTokenNoAutoGeneration: {Default: true, PreRelease: featuregate.GA, LockToDefault: true}, // remove in 1.29
|
||||||
|
|
||||||
|
2
pkg/generated/openapi/zz_generated.openapi.go
generated
2
pkg/generated/openapi/zz_generated.openapi.go
generated
@ -58380,7 +58380,7 @@ func schema_k8sio_kubelet_config_v1beta1_KubeletConfiguration(ref common.Referen
|
|||||||
},
|
},
|
||||||
"tracing": {
|
"tracing": {
|
||||||
SchemaProps: spec.SchemaProps{
|
SchemaProps: spec.SchemaProps{
|
||||||
Description: "Tracing specifies the versioned configuration for OpenTelemetry tracing clients. See https://kep.k8s.io/2832 for more details.",
|
Description: "Tracing specifies the versioned configuration for OpenTelemetry tracing clients. See https://kep.k8s.io/2832 for more details. Default: nil",
|
||||||
Ref: ref("k8s.io/component-base/tracing/api/v1.TracingConfiguration"),
|
Ref: ref("k8s.io/component-base/tracing/api/v1.TracingConfiguration"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -798,6 +798,7 @@ type KubeletConfiguration struct {
|
|||||||
RegisterNode *bool `json:"registerNode,omitempty"`
|
RegisterNode *bool `json:"registerNode,omitempty"`
|
||||||
// Tracing specifies the versioned configuration for OpenTelemetry tracing clients.
|
// Tracing specifies the versioned configuration for OpenTelemetry tracing clients.
|
||||||
// See https://kep.k8s.io/2832 for more details.
|
// See https://kep.k8s.io/2832 for more details.
|
||||||
|
// Default: nil
|
||||||
// +featureGate=KubeletTracing
|
// +featureGate=KubeletTracing
|
||||||
// +optional
|
// +optional
|
||||||
Tracing *tracingapi.TracingConfiguration `json:"tracing,omitempty"`
|
Tracing *tracingapi.TracingConfiguration `json:"tracing,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user