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

AnalysisTemplate support build-in now arg #591

Closed
ozooxo opened this issue Jul 20, 2020 · 1 comment
Closed

AnalysisTemplate support build-in now arg #591

ozooxo opened this issue Jul 20, 2020 · 1 comment
Labels
analysis Related to Analysis CRD enhancement New feature or request

Comments

@ozooxo
Copy link

ozooxo commented Jul 20, 2020

For some monitoring framework, their API may need to pass fixed epoch time to and from to specify the range of the monitoring data (e.g. Datadog timeseries endpoint). It is very hard to use together with the current Argo Rollout, as we need to pass a static string spec.metrics.provider.web.url (checked into the gitOps repo as an YAML file) and it cannot be changed every time when we are in canary step and recheck the canary test status.

While it can be a feature request to supporting monitoring framework to add an endpoint with args like &to=now&last=3600, they may not want to add it (as it breaks the idempotency of a RESTful API endpoint), or they may only release it far in their future version.

To add the flexibility of the Argo Rollout framework, could we add a build-in argument now (potentially with the epoch time as the return value), and/or an eval used to calculate e.g. from = now - 3600?


Alternatively, as a workaround, not sure if I can do it by project language (Go?) injection inside of the url string. E.g. in shell:

curl -X GET https://api.datadoghq.com/api/v1/query?from="$(expr $(date +%s) - 3600)"&to="$(date +%s)"...

But if I can, that sounds very dangerous, as the logic is very similar to SQL injection.

@jessesuen jessesuen added analysis Related to Analysis CRD enhancement New feature or request labels Aug 4, 2020
@jessesuen
Copy link
Member

I think we can dup this to #405, where we want to introduce time variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Related to Analysis CRD enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants