Closed bgagnon closed 6 years ago
We're going to add this very soon! Thanks for the suggestion
The latest version (0.0.2) has a filename
data type which gives you access to configuration filename details like path
, expanded_path
, name
and ext
. This should help you achieve what you need.
I don't see a way to write Copper rules on the filename. We have a policy that the
.yaml
manifest file must be named in a certain way. For example,NAME-TYPE.yaml
whereNAME
must match.spec.metadata.name
. andTYPE
must match.spec.kind
.Similarly, I might want to enforce rules on the parent directories of the manifest. For example, if the directory structure has some correspondence on the
.spec.medata.labels
values.Would that be possible to implement, perhaps by exposing the raw filepath to a rule?