Skip to content
Snippets Groups Projects

PLATFORM-2481 - allow prometheus-operator to modify deployments and stateful...

Merged PLATFORM-2481 - allow prometheus-operator to modify deployments and stateful...
Merged Brandon Booker requested to merge platform-2481-prometheus into master
Compare and
3 files
+ 3
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -3,6 +3,7 @@ package allow_rollout_restart_deployment
# Violation caused when user is not the local flux, nor stakater-reloader, and not in the admin group, trying to use UPDATE to change a DEPLOYMENT. The old annotations get patched with a value to build the datastructure, but it gets removed in the next step, so the value is innocuous.
violation[{"msg": msg}] {
not input.review.userInfo.username == "system:serviceaccount:platform-stakater-reloader:stakater-reloader"
not input.review.userInfo.username == "system:serviceaccount:platform-prometheus-stack:prometheus-kube-prometheus-operator"
flux_username := concat("",["system:serviceaccount:",input.review.namespace,":flux"])
not input.review.userInfo.username == flux_username
not contains(input.review.userInfo.groups, "oidc:it.platform.roles.admin")