Dynatrace Labels Consistent (SL008)

Validates that DynatraceDeploymentName and MAP-<>-ServiceName labels in deployment.yaml match.

Description

Reads kubernetes/base/deployment.yaml and compares DynatraceDeploymentName to MAP-<>-ServiceName; reports mismatches or missing labels.

Rationale

Consistent labeling is required for monitoring and topology mapping.

Findings

  • ERROR

    • DynatraceDeploymentName does not match MAP-<>-ServiceName

    • deployment.yaml missing required label(s)

Noncompliant

Mismatched Dynatrace labels
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-service
  labels:
    DynatraceDeploymentName: my-service
    MAP-Prod-ServiceName: other-service

Compliant

Matching Dynatrace labels
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-service
  labels:
    DynatraceDeploymentName: my-service
    MAP-Prod-ServiceName: my-service

Configuration

This rule has no configuration.