Skip to content

Commit

Permalink
fix(MeshTrace): invalid sampling default values (#11548)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
  • Loading branch information
michaelbeaumont authored and kumahq[bot] committed Sep 25, 2024
1 parent 6f7d2dd commit 48975f6
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4099,6 +4099,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -4110,13 +4114,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -4125,6 +4139,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4322,6 +4322,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -4333,13 +4337,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -4348,6 +4362,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4119,6 +4119,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -4130,13 +4134,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -4145,6 +4159,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
18 changes: 18 additions & 0 deletions app/kumactl/cmd/install/testdata/install-crds.all.golden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5403,6 +5403,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -5414,13 +5418,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -5429,6 +5443,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
18 changes: 18 additions & 0 deletions deployments/charts/kuma/crds/kuma.io_meshtraces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -150,13 +154,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -165,6 +179,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
20 changes: 16 additions & 4 deletions docs/generated/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6765,6 +6765,10 @@ components:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: >-
Target percentage of requests that will be force traced
if the
Expand All @@ -6782,6 +6786,10 @@ components:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: >-
Target percentage of requests will be traced
Expand All @@ -6791,11 +6799,11 @@ components:
random sampling). This field functions as an upper limit
on the total
configured sampling rate. For instance, setting
client_sampling to 100%
configured sampling rate. For instance, setting client
to 100
but overall_sampling to 1% will result in only 1% of
client requests with
but overall to 1 will result in only 1% of client
requests with
the appropriate headers to be force traced. Default:
100% Mirror of
Expand All @@ -6810,6 +6818,10 @@ components:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: >-
Target percentage of requests that will be randomly
selected for trace
Expand Down
18 changes: 18 additions & 0 deletions docs/generated/raw/crds/kuma.io_meshtraces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be force traced if the
'x-client-trace-id' header is set. Default: 100% Mirror of
Expand All @@ -150,13 +154,23 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests will be traced
after all other sampling checks have been applied (client, force tracing,
random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD
configured sampling rate. For instance, setting client_sampling to 100%
but overall_sampling to 1% will result in only 1% of client requests with
the appropriate headers to be force traced. Default: 100% Mirror of
=======
configured sampling rate. For instance, setting client to 100
but overall to 1 will result in only 1% of client requests with
the appropriate headers to be force traced. Mirror of
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
overall_sampling in Envoy
https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
Either int or decimal represented as string.
Expand All @@ -165,6 +179,10 @@ spec:
anyOf:
- type: integer
- type: string
<<<<<<< HEAD
=======
default: 100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))
description: |-
Target percentage of requests that will be randomly selected for trace
generation, if not requested by the client or not forced. Default: 100%
Expand Down
18 changes: 18 additions & 0 deletions pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,24 +98,42 @@ type Sampling struct {
// Target percentage of requests will be traced
// after all other sampling checks have been applied (client, force tracing,
// random sampling). This field functions as an upper limit on the total
<<<<<<< HEAD

Check failure on line 101 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected <<, expected field name or embedded type
// configured sampling rate. For instance, setting client_sampling to 100%
// but overall_sampling to 1% will result in only 1% of client requests with
// the appropriate headers to be force traced. Default: 100% Mirror of
// overall_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
// Either int or decimal represented as string.
=======

Check failure on line 108 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected ==, expected field name or embedded type
// configured sampling rate. For instance, setting client to 100
// but overall to 1 will result in only 1% of client requests with
// the appropriate headers to be force traced. Mirror of
// overall_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L142-L150
// Either int or decimal represented as string.
// +kubebuilder:default=100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))

Check failure on line 116 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

invalid character U+0023 '#'
Overall *intstr.IntOrString `json:"overall,omitempty"`
// Target percentage of requests that will be force traced if the
// 'x-client-trace-id' header is set. Default: 100% Mirror of
// client_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L127-L133
// Either int or decimal represented as string.
<<<<<<< HEAD

Check failure on line 123 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected <<, expected field name or embedded type
=======

Check failure on line 124 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected ==, expected field name or embedded type
// +kubebuilder:default=100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))

Check failure on line 126 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

invalid character U+0023 '#'
Client *intstr.IntOrString `json:"client,omitempty"`
// Target percentage of requests that will be randomly selected for trace
// generation, if not requested by the client or not forced. Default: 100%
// Mirror of random_sampling in Envoy
// https://github.com/envoyproxy/envoy/blob/v1.22.0/api/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto#L135-L140
// Either int or decimal represented as string.
<<<<<<< HEAD

Check failure on line 133 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected <<, expected field name or embedded type
=======

Check failure on line 134 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected ==, expected field name or embedded type
// +kubebuilder:default=100
>>>>>>> 79a23897c (fix(MeshTrace): invalid sampling default values (#11548))

Check failure on line 136 in pkg/plugins/policies/meshtrace/api/v1alpha1/meshtrace.go

View workflow job for this annotation

GitHub Actions / lint

invalid character U+0023 '#' (typecheck)
Random *intstr.IntOrString `json:"random,omitempty"`
}

Expand Down
Loading

0 comments on commit 48975f6

Please sign in to comment.