Dynatrace Labels Valid (SL008)
Validates Dynatrace flags and labels in application.properties and deployment.yaml files.
Description
Reads kubernetes/base (or kubernetes/kustomize/base)/deployment.yaml and compares DynatraceDeploymentName to MAP-<>-ServiceName;
Rationale
Ensure required metrics exporting in production-like profiles. Consistent labeling, annotations, and property flags are required for monitoring and topology mapping.
Findings
-
ERROR
-
DynatraceDeploymentName does not match MAP-<>-ServiceName
-
deployment.yaml missing required label(s)
-
Could not find DynatraceDeploymentName in deployment.yaml
-
Could not find MAP-<>-ServiceName in deployment.yaml
-
Noncompliant
Invalid Dynatrace labels
#Mismatched labels
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-service
labels:
DynatraceDeploymentName: my-service
MAP-Prod-ServiceName: other-service