DataDog / helm-charts

Helm charts for Datadog products
Apache License 2.0
330 stars 1.01k forks source link

Chart 3.59.4 creates cluster-agent objects even when cluster agent is disabled #1365

Open luitzw opened 3 months ago

luitzw commented 3 months ago

Describe what happened: The chart creates configmap/-cluster-agent-confd, ClusterRole/-ksm-core, ClusterRoleBinding/-ksm-core even when clusterAgent.enabled=false is used.

Describe what you expected: Omit the create of the cluster agent resources when clusterAgent.enabled=false is used

Steps to reproduce the issue: Use a basic values file

datadog:
  apiKeyExistingSecret: datadog-keys
  clusterName: dummy
  helmCheck:
    enabled: false
  containerLifecycle:
    enabled: false
  securityAgent:
    compliance:
      enabled: false  
  containerImageCollection:
    enabled: false
  sbom:
    containerImage:
      enabled: false
  hostVolumeMountPropagation: "None"
agents:
  enabled: true
  additionalLabels:
    app: datadog
    env: acceptance
  shareProcessNamespace: true
  revisionHistoryLimit: 10
  useConfigMap: false
  rbac:
    create: false
    serviceAccountName: "dd-agent"
  tolerations: []
  containers:
    agent:
      env:
      - name: DD_REMOTE_CONFIGURATION_ENABLED
        value: "false"
  image: 
    name: agent
    tag: 7.52
    pullPolicy: Always
  podSecurity:
    podSecurityPolicy:
      create: false
    privileged: false
clusterAgent:
  enabled: false
  rbac:
    create: false
  confd: {}
  advancedConfd: {}

Additional environment details (Operating System, Cloud provider, etc): NA