From b8f24bce4e34f0b88aad402d87e0e11042bf4b6e Mon Sep 17 00:00:00 2001 From: Barry Dobson Date: Wed, 27 Nov 2024 11:47:07 +0000 Subject: [PATCH] add telemetry.istio.io/v1 (#421) --- telemetry.istio.io/telemetry_v1.json | 515 +++++++++++++++++++++++++++ 1 file changed, 515 insertions(+) create mode 100644 telemetry.istio.io/telemetry_v1.json diff --git a/telemetry.istio.io/telemetry_v1.json b/telemetry.istio.io/telemetry_v1.json new file mode 100644 index 00000000..f0d615ec --- /dev/null +++ b/telemetry.istio.io/telemetry_v1.json @@ -0,0 +1,515 @@ +{ + "properties": { + "spec": { + "description": "Telemetry configuration for workloads. See more details at: https://istio.io/docs/reference/config/telemetry.html", + "properties": { + "accessLogging": { + "description": "Optional.", + "items": { + "properties": { + "disabled": { + "description": "Controls logging.", + "nullable": true, + "type": "boolean" + }, + "filter": { + "description": "Optional.", + "properties": { + "expression": { + "description": "CEL expression for selecting when requests/connections should be logged.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "match": { + "description": "Allows tailoring of logging behavior to specific conditions.", + "properties": { + "mode": { + "description": "This determines whether or not to apply the access logging configuration based on the direction of traffic relative to the proxied workload.\n\nValid Options: CLIENT_AND_SERVER, CLIENT, SERVER", + "enum": [ + "CLIENT_AND_SERVER", + "CLIENT", + "SERVER" + ], + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "providers": { + "description": "Optional.", + "items": { + "properties": { + "name": { + "description": "Required.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "metrics": { + "description": "Optional.", + "items": { + "properties": { + "overrides": { + "description": "Optional.", + "items": { + "properties": { + "disabled": { + "description": "Optional.", + "nullable": true, + "type": "boolean" + }, + "match": { + "description": "Match allows providing the scope of the override.", + "oneOf": [ + { + "not": { + "anyOf": [ + { + "required": [ + "metric" + ] + }, + { + "required": [ + "customMetric" + ] + } + ] + } + }, + { + "required": [ + "metric" + ] + }, + { + "required": [ + "customMetric" + ] + } + ], + "properties": { + "customMetric": { + "description": "Allows free-form specification of a metric.", + "minLength": 1, + "type": "string" + }, + "metric": { + "description": "One of the well-known [Istio Standard Metrics](https://istio.io/latest/docs/reference/config/metrics/).\n\nValid Options: ALL_METRICS, REQUEST_COUNT, REQUEST_DURATION, REQUEST_SIZE, RESPONSE_SIZE, TCP_OPENED_CONNECTIONS, TCP_CLOSED_CONNECTIONS, TCP_SENT_BYTES, TCP_RECEIVED_BYTES, GRPC_REQUEST_MESSAGES, GRPC_RESPONSE_MESSAGES", + "enum": [ + "ALL_METRICS", + "REQUEST_COUNT", + "REQUEST_DURATION", + "REQUEST_SIZE", + "RESPONSE_SIZE", + "TCP_OPENED_CONNECTIONS", + "TCP_CLOSED_CONNECTIONS", + "TCP_SENT_BYTES", + "TCP_RECEIVED_BYTES", + "GRPC_REQUEST_MESSAGES", + "GRPC_RESPONSE_MESSAGES" + ], + "type": "string" + }, + "mode": { + "description": "Controls which mode of metrics generation is selected: `CLIENT`, `SERVER`, or `CLIENT_AND_SERVER`.\n\nValid Options: CLIENT_AND_SERVER, CLIENT, SERVER", + "enum": [ + "CLIENT_AND_SERVER", + "CLIENT", + "SERVER" + ], + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "tagOverrides": { + "additionalProperties": { + "properties": { + "operation": { + "description": "Operation controls whether or not to update/add a tag, or to remove it.\n\nValid Options: UPSERT, REMOVE", + "enum": [ + "UPSERT", + "REMOVE" + ], + "type": "string" + }, + "value": { + "description": "Value is only considered if the operation is `UPSERT`.", + "type": "string" + } + }, + "type": "object", + "x-kubernetes-validations": [ + { + "message": "value must be set when operation is UPSERT", + "rule": "((has(self.operation) ? self.operation : '') == 'UPSERT') ? self.value != '' : true" + }, + { + "message": "value must not be set when operation is REMOVE", + "rule": "((has(self.operation) ? self.operation : '') == 'REMOVE') ? !has(self.value) : true" + } + ], + "additionalProperties": false + }, + "description": "Optional.", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "providers": { + "description": "Optional.", + "items": { + "properties": { + "name": { + "description": "Required.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "reportingInterval": { + "description": "Optional.", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "must be a valid duration greater than 1ms", + "rule": "duration(self) >= duration('1ms')" + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "selector": { + "description": "Optional.", + "properties": { + "matchLabels": { + "additionalProperties": { + "maxLength": 63, + "type": "string", + "x-kubernetes-validations": [ + { + "message": "wildcard not allowed in label value match", + "rule": "!self.contains('*')" + } + ] + }, + "description": "One or more labels that indicate a specific set of pods/VMs on which a policy should be applied.", + "maxProperties": 4096, + "type": "object", + "x-kubernetes-validations": [ + { + "message": "wildcard not allowed in label key match", + "rule": "self.all(key, !key.contains('*'))" + }, + { + "message": "key must not be empty", + "rule": "self.all(key, key.size() != 0)" + } + ] + } + }, + "type": "object", + "additionalProperties": false + }, + "targetRef": { + "properties": { + "group": { + "description": "group is the group of the target resource.", + "maxLength": 253, + "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", + "type": "string" + }, + "kind": { + "description": "kind is kind of the target resource.", + "maxLength": 63, + "minLength": 1, + "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$", + "type": "string" + }, + "name": { + "description": "name is the name of the target resource.", + "maxLength": 253, + "minLength": 1, + "type": "string" + }, + "namespace": { + "description": "namespace is the namespace of the referent.", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "cross namespace referencing is not currently supported", + "rule": "self.size() == 0" + } + ] + } + }, + "required": [ + "kind", + "name" + ], + "type": "object", + "x-kubernetes-validations": [ + { + "message": "Support kinds are core/Service and gateway.networking.k8s.io/Gateway", + "rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway']]" + } + ], + "additionalProperties": false + }, + "targetRefs": { + "description": "Optional.", + "items": { + "properties": { + "group": { + "description": "group is the group of the target resource.", + "maxLength": 253, + "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$", + "type": "string" + }, + "kind": { + "description": "kind is kind of the target resource.", + "maxLength": 63, + "minLength": 1, + "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$", + "type": "string" + }, + "name": { + "description": "name is the name of the target resource.", + "maxLength": 253, + "minLength": 1, + "type": "string" + }, + "namespace": { + "description": "namespace is the namespace of the referent.", + "type": "string", + "x-kubernetes-validations": [ + { + "message": "cross namespace referencing is not currently supported", + "rule": "self.size() == 0" + } + ] + } + }, + "required": [ + "kind", + "name" + ], + "type": "object", + "x-kubernetes-validations": [ + { + "message": "Support kinds are core/Service and gateway.networking.k8s.io/Gateway", + "rule": "[self.group, self.kind] in [['core','Service'], ['','Service'], ['gateway.networking.k8s.io','Gateway']]" + } + ], + "additionalProperties": false + }, + "type": "array" + }, + "tracing": { + "description": "Optional.", + "items": { + "properties": { + "customTags": { + "additionalProperties": { + "oneOf": [ + { + "not": { + "anyOf": [ + { + "required": [ + "literal" + ] + }, + { + "required": [ + "environment" + ] + }, + { + "required": [ + "header" + ] + } + ] + } + }, + { + "required": [ + "literal" + ] + }, + { + "required": [ + "environment" + ] + }, + { + "required": [ + "header" + ] + } + ], + "properties": { + "environment": { + "description": "Environment adds the value of an environment variable to each span.", + "properties": { + "defaultValue": { + "description": "Optional.", + "type": "string" + }, + "name": { + "description": "Name of the environment variable from which to extract the tag value.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "header": { + "description": "RequestHeader adds the value of an header from the request to each span.", + "properties": { + "defaultValue": { + "description": "Optional.", + "type": "string" + }, + "name": { + "description": "Name of the header from which to extract the tag value.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "literal": { + "description": "Literal adds the same, hard-coded value to each span.", + "properties": { + "value": { + "description": "The tag value to use.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "value" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "description": "Optional.", + "type": "object" + }, + "disableSpanReporting": { + "description": "Controls span reporting.", + "nullable": true, + "type": "boolean" + }, + "match": { + "description": "Allows tailoring of behavior to specific conditions.", + "properties": { + "mode": { + "description": "This determines whether or not to apply the tracing configuration based on the direction of traffic relative to the proxied workload.\n\nValid Options: CLIENT_AND_SERVER, CLIENT, SERVER", + "enum": [ + "CLIENT_AND_SERVER", + "CLIENT", + "SERVER" + ], + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "providers": { + "description": "Optional.", + "items": { + "properties": { + "name": { + "description": "Required.", + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "randomSamplingPercentage": { + "description": "Controls the rate at which traffic will be selected for tracing if no prior sampling decision has been made.", + "format": "double", + "maximum": 100, + "minimum": 0, + "nullable": true, + "type": "number" + }, + "useRequestIdForTraceSampling": { + "nullable": true, + "type": "boolean" + } + }, + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "type": "object", + "additionalProperties": false + }, + "status": { + "type": "object", + "x-kubernetes-preserve-unknown-fields": true + } + }, + "type": "object" +}