-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(replacements): add IgnoreMissingField option #5778
base: master
Are you sure you want to change the base?
feat(replacements): add IgnoreMissingField option #5778
Conversation
|
Welcome @bt-macole! |
Hi @bt-macole. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bt-macole The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c05c6a9
to
deb08ff
Compare
deb08ff
to
6ed2bbf
Compare
@varshaprasad96 hihi, reaching out based on the recommendation in the above comment. any chance I could get a review on this? all feedback is greatly appreciated--thanks 🙏😊 |
This change adds a field option to replacements for
IgnoreMissingField
that will find/replace all matching fields and ignore resources that match the target but do not have the field instead of throwing an error.Context:
When using replacements as a reusable component across multiple manifests, especially in environmental overlays, a common pattern emerges. For example, certain elements like an accountId in an IRSA role annotation on a ServiceAccount often need to be replaced.
In cases where you have many ServiceAccount resources—such as N applications with M workloads and M ServiceAccounts—only X of those ServiceAccounts may require the annotation replacement, while others do not.
This approach ensures flexibility, allowing replacements to be applied only where needed, without enforcing unnecessary changes across all resources.
resolves #5777