-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add validation for instrumentation values
This commit adds a schema for the datadog.apm.instrumentation values.
- Loading branch information
1 parent
7ee6d21
commit 0b51ade
Showing
17 changed files
with
669 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,300 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "Values", | ||
"type": "object", | ||
"properties": { | ||
"datadog": { | ||
"type": "object", | ||
"properties": { | ||
"apm": { | ||
"type": "object", | ||
"properties": { | ||
"instrumentation": { | ||
"type": "object", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean" | ||
}, | ||
"enabledNamespaces": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"disabledNamespaces": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"libVersions": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"targets": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"podSelector": { | ||
"type": "object", | ||
"properties": { | ||
"matchLabels": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"matchExpressions": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"type": "string" | ||
}, | ||
"operator": { | ||
"type": "string", | ||
"enum": [ | ||
"In", | ||
"NotIn", | ||
"Exists", | ||
"DoesNotExist" | ||
] | ||
}, | ||
"values": { | ||
"type": "array", | ||
"items": { "type": "string" }, | ||
"minItems": 1 | ||
} | ||
}, | ||
"required": ["key", "operator"], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"namespaceSelector": { | ||
"type": "object", | ||
"properties": { | ||
"matchNames": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"matchLabels": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"matchExpressions": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"type": "string" | ||
}, | ||
"operator": { | ||
"type": "string", | ||
"enum": [ | ||
"In", | ||
"NotIn", | ||
"Exists", | ||
"DoesNotExist" | ||
] | ||
}, | ||
"values": { | ||
"type": "array", | ||
"items": { "type": "string" }, | ||
"minItems": 1 | ||
} | ||
}, | ||
"required": ["key", "operator"], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"anyOf": [ | ||
{ | ||
"if": { | ||
"properties": { | ||
"matchNames": { | ||
"type": "array", | ||
"minItems": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"matchLabels": { | ||
"type": "object", | ||
"maxProperties": 0 | ||
}, | ||
"matchExpressions": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"matchLabels": { | ||
"type": "object", | ||
"minProperties": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"matchNames": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"matchExpressions": { | ||
"type": "array", | ||
"minItems": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"matchNames": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"additionalProperties": false | ||
}, | ||
"ddTraceVersions": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"ddTraceConfigs": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["name", "value"], | ||
"additionalProperties": false | ||
} | ||
} | ||
}, | ||
"required": ["name"], | ||
"additionalProperties": false | ||
} | ||
}, | ||
"skipKPITelemetry": { | ||
"type": "boolean" | ||
}, | ||
"language_detection": { | ||
"type": "object", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"injector": { | ||
"type": "object", | ||
"properties": { | ||
"imageTag": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"allOf": [ | ||
{ | ||
"if": { | ||
"properties": { | ||
"enabledNamespaces": { | ||
"type": "array", | ||
"minItems": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"targets": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"libVersions": { | ||
"type": "object", | ||
"minProperties": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"targets": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"enabledNamespaces": { | ||
"type": "array", | ||
"minItems": 1 | ||
} | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"disabledNamespaces": { | ||
"type": "array", | ||
"maxItems": 0 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.