diff --git a/hack/scripts/generate-rules-configmap.sh b/hack/scripts/generate-rules-configmap.sh
index 7a98962d62f955b838c71ec6e95420ec9ed589a9..97f99767f4b9dab5d44e176b5b2d7d89e36ff1f0 100755
--- a/hack/scripts/generate-rules-configmap.sh
+++ b/hack/scripts/generate-rules-configmap.sh
@@ -13,6 +13,6 @@ EOF
 
 for f in assets/prometheus/rules/*.rules.y*ml
 do
-  echo "  $(basename $f): |+"
+  echo "  $(basename $f | sed s/\.yml//): |+"
   cat $f | sed "s/^/    /g"
 done