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

Ability to use a forEach on a jsonpatch #34

Merged
merged 1 commit into from
May 12, 2024

Conversation

jordipiqueselles
Copy link
Collaborator

Now, we can iterate over a list and apply a jsonpatch on each element of the list. For example, we can remove the limits on all the containers from a pod:

patch:
  op: forEach
  elements: .spec.containers
  patch:
    - op: remove
      path: .limits

@jordipiqueselles jordipiqueselles added the enhancement New feature or request label May 12, 2024
Now, we can iterate over a list and apply a jsonpatch on each element of
the list. For example, we can remove the limits on all the containers
from a pod:

```yaml
patch:
  op: forEach
  elements: .spec.containers
  patch:
    - op: remove
      path: .limits
```
@jordipiqueselles jordipiqueselles added enhancement New feature or request and removed enhancement New feature or request labels May 12, 2024
@jordipiqueselles jordipiqueselles merged commit 7ec6b28 into main May 12, 2024
2 checks passed
@jordipiqueselles jordipiqueselles deleted the jordi/jsonpatch-foreach-2 branch May 12, 2024 19:46
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

Successfully merging this pull request may close these issues.

1 participant