Skip to content

Commit

Permalink
chore(MeshAccessLog): improve policy's openapi schema (#8533)
Browse files Browse the repository at this point in the history
Signed-off-by: Bart Smykla <[email protected]>
  • Loading branch information
bartsmykla authored Dec 5, 2023
1 parent ab86780 commit d03218b
Show file tree
Hide file tree
Showing 12 changed files with 627 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5151,6 +5151,11 @@ spec:
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
properties:
json:
example:
- key: start_time
value: '%START_TIME%'
- key: bytes_received
value: '%BYTES_RECEIVED%'
items:
properties:
key:
Expand All @@ -5160,8 +5165,10 @@ spec:
type: object
type: array
omitEmptyValues:
default: false
type: boolean
plain:
example: '[%START_TIME%] %KUMA_MESH% %UPSTREAM_HOST%'
type: string
type:
enum:
Expand All @@ -5174,6 +5181,8 @@ spec:
path:
description: Path to a file that logs will be
written to
example: /tmp/access.log
minLength: 1
type: string
required:
- path
Expand All @@ -5184,6 +5193,9 @@ spec:
attributes:
description: Attributes can contain placeholders
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
example:
- key: mesh
value: '%KUMA_MESH%'
items:
properties:
key:
Expand All @@ -5196,6 +5208,12 @@ spec:
description: Body is a raw string or an OTLP any
value as described at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-body
It can contain placeholders available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
example:
kvlistValue:
values:
- key: mesh
value:
stringValue: '%KUMA_MESH%'
x-kubernetes-preserve-unknown-fields: true
endpoint:
description: Endpoint of OpenTelemetry collector.
Expand All @@ -5211,12 +5229,19 @@ spec:
properties:
address:
description: Address of the TCP logging backend
example: 127.0.0.1:5000
minLength: 1
type: string
format:
description: Format of access logs. Placeholders
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
properties:
json:
example:
- key: start_time
value: '%START_TIME%'
- key: bytes_received
value: '%BYTES_RECEIVED%'
items:
properties:
key:
Expand All @@ -5226,8 +5251,10 @@ spec:
type: object
type: array
omitEmptyValues:
default: false
type: boolean
plain:
example: '[%START_TIME%] %KUMA_MESH% %UPSTREAM_HOST%'
type: string
type:
enum:
Expand Down Expand Up @@ -5288,7 +5315,7 @@ spec:
targetRef:
description: TargetRef is a reference to the resource the policy takes
an effect on. The resource could be either a real store object or
virtual resource defined inplace.
virtual resource defined in-place.
properties:
kind:
description: Kind of the referenced resource
Expand Down Expand Up @@ -5336,6 +5363,11 @@ spec:
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
properties:
json:
example:
- key: start_time
value: '%START_TIME%'
- key: bytes_received
value: '%BYTES_RECEIVED%'
items:
properties:
key:
Expand All @@ -5345,8 +5377,10 @@ spec:
type: object
type: array
omitEmptyValues:
default: false
type: boolean
plain:
example: '[%START_TIME%] %KUMA_MESH% %UPSTREAM_HOST%'
type: string
type:
enum:
Expand All @@ -5359,6 +5393,8 @@ spec:
path:
description: Path to a file that logs will be
written to
example: /tmp/access.log
minLength: 1
type: string
required:
- path
Expand All @@ -5369,6 +5405,9 @@ spec:
attributes:
description: Attributes can contain placeholders
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
example:
- key: mesh
value: '%KUMA_MESH%'
items:
properties:
key:
Expand All @@ -5381,6 +5420,12 @@ spec:
description: Body is a raw string or an OTLP any
value as described at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/data-model.md#field-body
It can contain placeholders available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
example:
kvlistValue:
values:
- key: mesh
value:
stringValue: '%KUMA_MESH%'
x-kubernetes-preserve-unknown-fields: true
endpoint:
description: Endpoint of OpenTelemetry collector.
Expand All @@ -5396,12 +5441,19 @@ spec:
properties:
address:
description: Address of the TCP logging backend
example: 127.0.0.1:5000
minLength: 1
type: string
format:
description: Format of access logs. Placeholders
available on https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators
properties:
json:
example:
- key: start_time
value: '%START_TIME%'
- key: bytes_received
value: '%BYTES_RECEIVED%'
items:
properties:
key:
Expand All @@ -5411,8 +5463,10 @@ spec:
type: object
type: array
omitEmptyValues:
default: false
type: boolean
plain:
example: '[%START_TIME%] %KUMA_MESH% %UPSTREAM_HOST%'
type: string
type:
enum:
Expand Down
Loading

0 comments on commit d03218b

Please sign in to comment.