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

Option to ignore specific fields or annotations #3

Open
jrhouston opened this issue May 4, 2020 · 2 comments
Open

Option to ignore specific fields or annotations #3

jrhouston opened this issue May 4, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@jrhouston
Copy link
Owner

Example

tfk8s --ignore "metadata.annotations.cni.projectcalico.org/podIP"

@jrhouston jrhouston added the enhancement New feature or request label May 5, 2020
@dhutty
Copy link

dhutty commented Jul 21, 2023

seems like this could be achieved by sending the input YAML through a yq filter before handing it to tfk8s. Perhaps something like:
yq 'del(.metadata.annotations.cni.projectcalico.org/podIP)' input.yaml | tfk8s ...

@jrhouston
Copy link
Owner Author

Thanks for sharing @dhutty – that's definitely a more UNIX philosophy approach to the problem. I was able to get it working like this:

yq 'del(.metadata.annotations["cni.projectcalico.org/podIP"])' input.yaml | tfk8s

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

No branches or pull requests

2 participants