Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend ModRule CRD with ability to include arbitrary resources in patch template #11

Open
vassilvk opened this issue Oct 20, 2020 · 1 comment

Comments

@vassilvk
Copy link
Member

Currently the patch value of a ModRule is evaluated as a Golang template in the following intrinsic context:
* .Namespace - string representing the namespace of the target object
*.Target -object representing the target resource being patched

Sometimes this is not enough as the patching operation of one object may need to refer to parts of other related manifests.
For example, the patching of a pod may need to refer to annotations on the pod's deployment manifest.

Introduce an includes section where manifests of select set of objects can be included in the intrinsic part of the Golang template of the patch value.

The objects in the includes section can be identified based on their own match sections. These match sections, however, will require a resource designation (think pods, services, etc.), such that we perform targeted queries against the namespace when trying to identify potential objects to include in the Golang template context.

@jamiecore
Copy link
Contributor

+1 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants