From 8bba1faa249a0054c1fa1d7a6568177d4988581d Mon Sep 17 00:00:00 2001 From: Mark Spicer Date: Fri, 8 May 2026 14:36:13 -0400 Subject: [PATCH] Changes needed for local dev --- ...adoghq.com_datadoginstrumentations_v1.yaml | 168 ++++++++++++++++++ charts/datadog-operator/Chart.lock | 8 +- charts/datadog-operator/Chart.yaml | 4 +- .../templates/clusterrole.yaml | 15 ++ charts/datadog-operator/values.yaml | 2 + ...datadoghq.com_datadoginstrumentations.yaml | 168 ++++++++++++++++++ 6 files changed, 359 insertions(+), 6 deletions(-) diff --git a/charts/datadog-crds/templates/datadoghq.com_datadoginstrumentations_v1.yaml b/charts/datadog-crds/templates/datadoghq.com_datadoginstrumentations_v1.yaml index 90219c6894..9a99b1e333 100644 --- a/charts/datadog-crds/templates/datadoghq.com_datadoginstrumentations_v1.yaml +++ b/charts/datadog-crds/templates/datadoghq.com_datadoginstrumentations_v1.yaml @@ -69,6 +69,174 @@ spec: config: description: Config defines the Datadog instrumentation configuration to apply to the target workload. properties: + apm: + description: APM configures the APM product through Single Step Instrumentation for the target workload. + properties: + ddTraceConfigs: + description: |- + TracerConfigs is a list of configuration options to use for the installed SDKs. These options will be added + as environment variables to the workload in addition to the configured SDKs. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + ddTraceVersions: + additionalProperties: + type: string + description: |- + TracerVersions is a map of SDK versions to install for target workload. The key is the language name and the + value is the version to use. If omitted, all default supported SDKs will be added to the application runtime. + type: object + enabled: + description: |- + Enabled turns on APM via Single Step Instrumentation to automatically install the Datadog SDKs for supported + languages with no additional configuration required. + type: boolean + type: object checks: description: Checks configures Datadog Agent Autodiscovery checks for the target workload. items: diff --git a/charts/datadog-operator/Chart.lock b/charts/datadog-operator/Chart.lock index aea358e956..4e1831185c 100644 --- a/charts/datadog-operator/Chart.lock +++ b/charts/datadog-operator/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: datadog-crds - repository: https://helm.datadoghq.com - version: 2.20.0 -digest: sha256:8fcabadd67093b3d490bd1d2daeb48883d948d7d47262545e4ffa68774e4fc08 -generated: "2026-05-04T13:59:53.443067+02:00" + repository: file://../datadog-crds + version: 2.21.0-dev.1 +digest: sha256:addbc3ccd7cd08aacf9cfbac478d80418003e2ae03cde1e531cd2aa5c17f3738 +generated: "2026-05-08T14:32:27.702817-04:00" diff --git a/charts/datadog-operator/Chart.yaml b/charts/datadog-operator/Chart.yaml index f4694aebbe..05ff175c08 100644 --- a/charts/datadog-operator/Chart.yaml +++ b/charts/datadog-operator/Chart.yaml @@ -17,9 +17,9 @@ maintainers: email: support@datadoghq.com dependencies: - name: datadog-crds - version: 2.20.0 + version: 2.21.0-dev.1 alias: datadogCRDs - repository: https://helm.datadoghq.com + repository: file://../datadog-crds condition: installCRDs tags: - install-crds diff --git a/charts/datadog-operator/templates/clusterrole.yaml b/charts/datadog-operator/templates/clusterrole.yaml index 1abe53cc50..f7d7c5a2ac 100644 --- a/charts/datadog-operator/templates/clusterrole.yaml +++ b/charts/datadog-operator/templates/clusterrole.yaml @@ -302,6 +302,21 @@ rules: - datadogpodautoscalers/status verbs: - '*' +- apiGroups: + - datadoghq.com + resources: + - datadoginstrumentations + verbs: + - get + - list + - watch +- apiGroups: + - datadoghq.com + resources: + - datadoginstrumentations/status + verbs: + - patch + - update - apiGroups: - datadoghq.com resources: diff --git a/charts/datadog-operator/values.yaml b/charts/datadog-operator/values.yaml index 259883580d..83ffa0c624 100644 --- a/charts/datadog-operator/values.yaml +++ b/charts/datadog-operator/values.yaml @@ -187,6 +187,8 @@ datadogCRDs: datadogAgentProfiles: false # datadogCRDs.crds.datadogAgentInternals -- Set to true to deploy the DatadogAgentInternals CRD datadogAgentInternals: true + # datadogCRDs.crds.datadogInstrumentations -- Set to true to deploy the DatadogInstrumentations CRD + datadogInstrumentations: true # podAnnotations -- Allows setting additional annotations for Datadog Operator PODs podAnnotations: {} diff --git a/crds/datadoghq.com_datadoginstrumentations.yaml b/crds/datadoghq.com_datadoginstrumentations.yaml index eaa890fc78..5b2d16adb9 100644 --- a/crds/datadoghq.com_datadoginstrumentations.yaml +++ b/crds/datadoghq.com_datadoginstrumentations.yaml @@ -57,6 +57,174 @@ spec: config: description: Config defines the Datadog instrumentation configuration to apply to the target workload. properties: + apm: + description: APM configures the APM product through Single Step Instrumentation for the target workload. + properties: + ddTraceConfigs: + description: |- + TracerConfigs is a list of configuration options to use for the installed SDKs. These options will be added + as environment variables to the workload in addition to the configured SDKs. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + ddTraceVersions: + additionalProperties: + type: string + description: |- + TracerVersions is a map of SDK versions to install for target workload. The key is the language name and the + value is the version to use. If omitted, all default supported SDKs will be added to the application runtime. + type: object + enabled: + description: |- + Enabled turns on APM via Single Step Instrumentation to automatically install the Datadog SDKs for supported + languages with no additional configuration required. + type: boolean + type: object checks: description: Checks configures Datadog Agent Autodiscovery checks for the target workload. items: