You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an object is passed from the pipeline, PSRule assigns the object a TargetName. TargetName is used in output results to identify one object from another.
Currently direct properties of the pipeline object can be bound, or a custom script block can be used to perform binding.
Using a custom script block is highly flexible but has performance impacts. For simple cases like nested properties, it would be better to provide this feature natively.
A similar feature was added in #60 for Exists, Within and Match keywords.
For example:
# Use the metadata.name property as TargetNamebinding:
targetName:
- 'metadata.name'
An example Kubernetes namespace object:
---
# Namespace: devapiVersion: v1kind: Namespacemetadata:
name: dev
Using metadata.name to bind TargetName should return dev.
The text was updated successfully, but these errors were encountered:
When an object is passed from the pipeline, PSRule assigns the object a TargetName. TargetName is used in output results to identify one object from another.
Currently direct properties of the pipeline object can be bound, or a custom script block can be used to perform binding.
Using a custom script block is highly flexible but has performance impacts. For simple cases like nested properties, it would be better to provide this feature natively.
A similar feature was added in #60 for
Exists
,Within
andMatch
keywords.For example:
An example Kubernetes namespace object:
Using
metadata.name
to bind TargetName should returndev
.The text was updated successfully, but these errors were encountered: