Interview Prep/Monitoring & Observability/Observability as Code, Security & Vendor Choices

How do you keep secrets out of Alertmanager and collector configs in Git?

BeginnerProductionObservability as Code, Security & Vendor Choices
Answer

Reference secrets from files or Kubernetes Secrets instead of inlining them:

receivers:
  - name: slack-critical
    slack_configs:
      - api_url_file: /etc/alertmanager/secrets/slack-webhook/url
        channel: "#incidents"

With the operator, AlertmanagerConfig uses apiURL: { name: slack-webhook, key: url } and alertmanagerSpec.secrets mounts Secrets. The OTel Collector supports ${env:DD_API_KEY} substitution. The Secrets themselves come from External Secrets Operator or Sealed Secrets. A Slack webhook URL in a public repo is abused within hours, so add secret scanning (gitleaks) to the pipeline.

All Monitoring & Observability questions

More on Observability as Code, Security & Vendor Choices