Skip to content
Discussion options

You must be logged in to vote

Simply set it so it always exists first. Since you are deleting it setting it to na just ensures it exists before removing it. Also add will simply replace if the key exists without issue.

    - op: add
      path: /metadata/labels/purpose
      value: na
    - op: remove
      path: /metadata/labels/purpose

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ahd3r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants