Skip to content

Commit

Permalink
feat: add validation for instrumentation values
Browse files Browse the repository at this point in the history
This commit adds a schema for the datadog.apm.instrumentation values.
  • Loading branch information
betterengineering committed Mar 7, 2025
1 parent 7ee6d21 commit 0b51ade
Show file tree
Hide file tree
Showing 17 changed files with 669 additions and 2 deletions.
4 changes: 4 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Datadog changelog

## 3.107.0

* * Validation has been added for values under `datadog.apm.instrumentation`. Additional or incorrect values will fail a helm install or upgrade operation.

## 3.106.0

* Target based workload selection for Single Step Instrumentation has been added in preview (requires Cluster Agent 7.64.0+)
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: datadog
version: 3.106.0
version: 3.107.0
appVersion: "7"
description: Datadog Agent
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Datadog

![Version: 3.106.0](https://img.shields.io/badge/Version-3.106.0-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)
![Version: 3.107.0](https://img.shields.io/badge/Version-3.107.0-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square)

[Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/).

Expand Down
300 changes: 300 additions & 0 deletions charts/datadog/values.schema.json
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
}
}
}
}
]
}
}
}
}
}
}
}
Loading

0 comments on commit 0b51ade

Please sign in to comment.