Skip to content

JSON-patch values update partially broken #166

Answered by diafour
yalosev asked this question in Q&A
Discussion options

You must be logged in to vote

More details of indices tracking approach and JSON patches.

The addon-operator has two types of patches: patches of config values in $CONFIG_VALUES_JSON_PATCH_PATH that applies to cm/addon-operator immediately after hook run and patches of values in $VALUES_JSON_PATCH_PATH. Values patches are stored in memory. To construct effective values for hook, addon-operator merges values from values.yaml, config-values.yaml, cm/addon-operator and then applies patches from memory.

Let's look at what happens with your hook:

  1. First, a new pod appears, and the hook returns:
{"op":"add", "path":"/podMonitor/pods/-", "value":"test-848844fd9-wz4x6"}

addon-operator saves this patch.

  1. Next, a second pod a…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

yalosev
Nov 26, 2020
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by shurup
Comment options

yalosev
Nov 27, 2020
Maintainer Author

You must be logged in to vote
0 replies
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
Converted from issue

This discussion was converted from issue #151 on January 15, 2021 04:12.