Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 0 additions & 8 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,6 @@ func main() {
webhookName = "webhook.pipeline.tekton.dev"
}

var statsReporterOptions []webhook.StatsReporterOption
enableNamespace := os.Getenv("WEBHOOK_METRICS_ENABLE_NAMESPACE")
if enableNamespace != "true" {
statsReporterOptions = append(statsReporterOptions, webhook.WithoutTags("resource_namespace"))
}

// Scope informers to the webhook's namespace instead of cluster-wide
ctx := injection.WithNamespaceScope(signals.NewContext(), system.Namespace())

Expand All @@ -258,8 +252,6 @@ func main() {
ServiceName: serviceName,
Port: webhook.PortFromEnv(8443),
SecretName: secretName,

StatsReporterOptions: statsReporterOptions,
})

mux := http.NewServeMux()
Expand Down
41 changes: 40 additions & 1 deletion config/config-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,47 @@ data:
# this example block and unindented to be in the data block
# to actually change the configuration.

# OpenTelemetry Metrics Configuration
# Protocol for metrics export (prometheus, grpc, http/protobuf, none)
# Default: prometheus
metrics-protocol: prometheus

# Metrics endpoint (for grpc/http protocols)
# Default: empty (uses default OTLP endpoint)
metrics-endpoint: ""

# Metrics export interval (e.g., "30s", "1m")
# Default: empty (uses default interval)
metrics-export-interval: ""

# OpenTelemetry Tracing Configuration
# Protocol for tracing export (grpc, http/protobuf, none, stdout)
# Default: none
tracing-protocol: none

# Tracing endpoint (for grpc/http protocols)
# Default: empty
tracing-endpoint: ""

# Tracing sampling rate (0.0 to 1.0)
# Default: 1.0 (100% sampling)
tracing-sampling-rate: "1.0"

# Runtime Configuration
# Enable profiling (enabled, disabled)
# Default: disabled
runtime-profiling: disabled

# Runtime export interval (e.g., "15s")
# Default: 15s
runtime-export-interval: "15s"

# Legacy OpenCensus Configuration (DEPRECATED)
# These are kept for backward compatibility but should be migrated to OpenTelemetry
# metrics.backend-destination field specifies the system metrics destination.
# It supports either prometheus (the default) or stackdriver.
# Note: Using Stackdriver will incur additional charges.
metrics.backend-destination: prometheus
metrics-protocol: prometheus

# metrics.stackdriver-project-id field specifies the Stackdriver project ID. This
# field is optional. When running on GCE, application default credentials will be
Expand All @@ -54,6 +91,8 @@ data:
# charge. If metrics.backend-destination is not Stackdriver, this is
# ignored.
metrics.allow-stackdriver-custom-metrics: "false"

# Tekton-specific metrics configuration
metrics.taskrun.level: "task"
metrics.taskrun.duration-type: "histogram"
metrics.pipelinerun.level: "pipeline"
Expand Down
37 changes: 37 additions & 0 deletions config/resolvers/config-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,43 @@ data:
# this example block and unindented to be in the data block
# to actually change the configuration.

# OpenTelemetry Metrics Configuration
# Protocol for metrics export (prometheus, grpc, http/protobuf, none)
# Default: prometheus
metrics-protocol: prometheus

# Metrics endpoint (for grpc/http protocols)
# Default: empty (uses default OTLP endpoint)
metrics-endpoint: ""

# Metrics export interval (e.g., "30s", "1m")
# Default: empty (uses default interval)
metrics-export-interval: ""

# OpenTelemetry Tracing Configuration
# Protocol for tracing export (grpc, http/protobuf, none, stdout)
# Default: none
tracing-protocol: none

# Tracing endpoint (for grpc/http protocols)
# Default: empty
tracing-endpoint: ""

# Tracing sampling rate (0.0 to 1.0)
# Default: 1.0 (100% sampling)
tracing-sampling-rate: "1.0"

# Runtime Configuration
# Enable profiling (enabled, disabled)
# Default: disabled
runtime-profiling: disabled

# Runtime export interval (e.g., "15s")
# Default: 15s
runtime-export-interval: "15s"

# Legacy OpenCensus Configuration (DEPRECATED)
# These are kept for backward compatibility but should be migrated to OpenTelemetry
# metrics.backend-destination field specifies the system metrics destination.
# It supports either prometheus (the default) or stackdriver.
# Note: Using stackdriver will incur additional charges
Expand Down
47 changes: 27 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ require (
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
golang.org/x/oauth2 v0.30.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0
k8s.io/api v0.32.7
k8s.io/apimachinery v0.32.7
k8s.io/client-go v0.32.7
k8s.io/code-generator v0.32.7
k8s.io/api v0.33.1
k8s.io/apimachinery v0.33.1
k8s.io/client-go v0.33.1
k8s.io/code-generator v0.33.1
k8s.io/klog v1.0.0
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7
knative.dev/hack v0.0.0-20250331013814-c577ed9f7775 // indirect
knative.dev/pkg v0.0.0-20250415155312-ed3e2158b883
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
knative.dev/hack v0.0.0-20250708013849-70d4b00da6ba // indirect
knative.dev/pkg v0.0.0-20250716115900-19d3cc2da0b9
sigs.k8s.io/yaml v1.6.0
)

Expand All @@ -48,6 +48,7 @@ require (
github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.9.5
go.opentelemetry.io/otel v1.37.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0
go.opentelemetry.io/otel/metric v1.37.0
go.opentelemetry.io/otel/sdk v1.37.0
go.opentelemetry.io/otel/trace v1.37.0
k8s.io/utils v0.0.0-20241210054802-24370beab758
Expand Down Expand Up @@ -83,13 +84,14 @@ require (
github.com/go-fed/httpsig v1.1.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-containerregistry/pkg/authn/kubernetes v0.0.0-20240108195214-a0658aa1d0cc // indirect
github.com/google/s2a-go v0.1.9 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
Expand All @@ -115,15 +117,22 @@ require (
github.com/zeebo/errs v1.4.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
go.opentelemetry.io/contrib/instrumentation/runtime v0.62.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/prometheus v0.59.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.37.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
k8s.io/gengo/v2 v2.0.0-20250207200755-1244d31929d7 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
)

// TODO: Remove this once github.com/google/go-containerregistry uses github.com/aws/aws-sdk-go-v2 >v1.23.0
Expand Down Expand Up @@ -183,7 +192,6 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/go-version v1.7.0
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand All @@ -197,12 +205,11 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/prometheus/statsd_exporter v0.22.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shurcooL/githubv4 v0.0.0-20190718010115-4ba037080260 // indirect
Expand All @@ -213,7 +220,7 @@ require (
github.com/vbatts/tar-split v0.12.1 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.39.0
golang.org/x/crypto v0.39.0 // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/sync v0.16.0
Expand All @@ -229,11 +236,11 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.32.6
k8s.io/apiextensions-apiserver v0.33.1
k8s.io/gengo v0.0.0-20240404160639-a0386bf69313 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
)

replace github.com/ahmetb/gen-crd-api-reference-docs => github.com/tektoncd/ahmetb-gen-crd-api-reference-docs v0.3.1-0.20220729140133-6ce2d5aafcb4 // Waiting for https://github.com/ahmetb/gen-crd-api-reference-docs/pull/43/files to merge
Loading
Loading