-
Notifications
You must be signed in to change notification settings - Fork 867
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
Allow analysis arguments to get valueFrom Rollout status #1242
Comments
To make this feature more useful, instead of single field paths, we should support JSON string objects and enhance analysis to allow dot notation referencing when the supplied argument is a json string. |
I am not sure I understand this last comment - do you mean something more complex than the example above? Or just having the ability to reference any field in the status, by using dot notation like I was thinking about using https://github.com/stretchr/objx to extract the value from the rollout instance. Is there any library/way you recommend to do it? |
created PR - #1629 |
…tus (#1242) (#1629) * use objx to read value from Rollout manifest Signed-off-by: Noam Gal <[email protected]> * handle `[]` annotation correcly in BuildArgumentsForRolloutAnalysisRun Signed-off-by: Noam Gal <[email protected]> * validate valueFrom correctly Signed-off-by: Noam Gal <[email protected]> * use jsonpath instead of objx return err if path is inavlid in runtime (don't check in validation time) Signed-off-by: Noam Gal <[email protected]> * parse path in code, instead of using jsonPath Signed-off-by: Noam Gal <[email protected]> * fixed test Signed-off-by: Noam Gal <[email protected]> * updated documentation Signed-off-by: Noam Gal <[email protected]> * added tests for coverage Signed-off-by: Noam Gal <[email protected]> * fixed lint Signed-off-by: Noam Gal <[email protected]> * added another test case Signed-off-by: Noam Gal <[email protected]> * fixed case when path ends with "]" Signed-off-by: Noam Gal <[email protected]> * removed objx dependency Signed-off-by: Noam Gal <[email protected]>
Fixed |
Summary
Currently, we can pass arguments to AnalysisTemplates from
metadata
labels and annotations, e.g.We should also allow passing arguments to AnalysisTemplates whose value is derived from fields in the rollout status.
Use Cases
As part of #1241, we will be surfacing ALB information under the rollout status. For example:
Once that is available, it would then be useful to pass that information to an AnalysisTemplate, so that argo rollouts could perform CloudWatch queries against the canary targetgroup vs. stable targetgroup, like so:
Message from the maintainers:
Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.
The text was updated successfully, but these errors were encountered: