lib/metatron/templates/cluster_role.rb in metatron-0.3.3 vs lib/metatron/templates/cluster_role.rb in metatron-0.3.4
- old
+ new
@@ -23,11 +23,13 @@
metadata: {
name:,
labels: { "#{label_namespace}/name": name }.merge(additional_labels)
}.merge(formatted_annotations).compact,
aggregationRule:,
- rules:
+ rules: formatted_rules
}.compact
end
+
+ def formatted_rules = rules.map { _1.respond_to?(:render) ? _1.render : _1 }
end
end
end