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

[Question] JSONPatch select array elements by element property instead of index #4509

Closed
tyxeron opened this issue Mar 7, 2022 · 2 comments
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@tyxeron
Copy link

tyxeron commented Mar 7, 2022

Is there an extension to the way JSONPatch uses paths similar to #4053?
I.e. is it possible to do something like this:

- op: replace
  path: /spec/policy/rules[name=rule1]/enabled
  value: false

I could not find anything in that direction for JSONPatch strategy.

@k8s-ci-robot k8s-ci-robot added needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 7, 2022
@k8s-ci-robot
Copy link
Contributor

@tyxeron: This issue is currently awaiting triage.

SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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/test-infra repository.

@KnVerey
Copy link
Contributor

KnVerey commented Mar 16, 2022

I don't believe that is supported by the JSONPatch spec: https://www.rfc-editor.org/rfc/rfc6901#section-4
We use a library to implement this functionality and will not be enabling any features outside the spec.

/kind support

@KnVerey KnVerey closed this as completed Mar 16, 2022
@k8s-ci-robot k8s-ci-robot added kind/support Categorizes issue or PR as a support question. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

3 participants