There are actually a a couple of options.
In each alerting rule (in prometheus) you can match on labels in the actual alerting expression: e.g.
expr: node_boot_time_seconds > (node_boot_time_seconds offset 5m + 5)
becomes
expr: node_boot_time_seconds{namespace="devsecops"} > (node_boot_time_seconds offset 5m + 5)
But I'd say it's simpler and more flexible to allow all the alerts to fire, but suppress the notifications in alertmanager routing rules:
route:
receiver: noc
routes:
- receiver: discard
matchers:
- namespace!="devsecops"
# more routing rules if desired go here
receivers:
- name: discard
- name: noc
email_configs:
- to:
n...@example.com send_resolved: false
Then you can see alerts firing in other environments in the prometheus web UI (which helps you test and tune the rules), but notifications aren't sent out for anything apart from devsecops.
This does require that all the alerting expressions pass through a namespace label. Pasting each alerting expression into the PromQL browser in the Prometheus web UI will let you see exactly what timeseries values it generates (including the labels), as long as it's generating at least one alert of course.