diff --git a/chart-infra/templates/datadog-sidecar-rbac.yaml b/chart-infra/templates/datadog-sidecar-rbac.yaml index 85f355b8..78e3877c 100644 --- a/chart-infra/templates/datadog-sidecar-rbac.yaml +++ b/chart-infra/templates/datadog-sidecar-rbac.yaml @@ -1,3 +1,4 @@ +{{- if eq .Values.myAccount.datadogEnabled "true" -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -9,4 +10,5 @@ roleRef: subjects: - kind: ServiceAccount name: deployment-runner - namespace: "{{.Release.Namespace}}" \ No newline at end of file + namespace: "{{.Release.Namespace}}" +{{- end -}} \ No newline at end of file diff --git a/chart-infra/templates/pod-template.tpl b/chart-infra/templates/pod-template.tpl index f3eee5b3..3f1f0a8a 100644 --- a/chart-infra/templates/pod-template.tpl +++ b/chart-infra/templates/pod-template.tpl @@ -27,6 +27,7 @@ resources: requests: memory: "{{ .Values.memoryRequest }}" +{{- if eq .Values.myAccount.datadogEnabled "true" }} - name: datadog-agent image: datadog/agent env: @@ -55,6 +56,7 @@ fieldRef: apiVersion: v1 fieldPath: spec.nodeName +{{- end }} volumes: - name: podinfo downwardAPI: