pyrra icon indicating copy to clipboard operation
pyrra copied to clipboard

feat: accept new SLO specs using the filesystem HTTP api

Open harmw opened this issue 2 years ago • 6 comments

Implement an HTTP endpoint at which new SLO specs may be published when using the filesystem operating mode.

Accept files over HTTP at /specs/create and writes them to disk, creates new rules and reloads prometheus.

Available (bare) endpoints:

/specs/create
/specs/remove
/specs/list

Sadly, the fsnotify watcher never managed to see any of the newly uploaded files so I had to force the rules creation a bit 🤔

~It seems to work, likely a little rough on the edges~ includes tests now

harmw avatar Sep 15 '23 14:09 harmw

@metalmatze would appreciate your thoughts on this, thank you.

harmw avatar Nov 01 '23 10:11 harmw

Thank you for the contribution, and I am sorry for the long silence.

I'm still wondering if we should have this as part of Pyrra directly or if this will be a separate component people can install. I would only add this to Pyrra by disabling this feature by default. I fear that opening this up by default isn't a sane default without any authn/authz.

metalmatze avatar Jan 16 '24 12:01 metalmatze

Thank you for the contribution, and I am sorry for the long silence.

I'm still wondering if we should have this as part of Pyrra directly or if this will be a separate component people can install. I would only add this to Pyrra by disabling this feature by default. I fear that opening this up by default isn't a sane default without any authn/authz.

Thanks! Sounds pretty reasonable though, suppose putting it behind a runtime switch shouldn't be too hard 👍

harmw avatar Jan 16 '24 12:01 harmw

@harmw wondering if you had any time to action this.

aaranmcguire avatar Feb 13 '24 23:02 aaranmcguire

@harmw wondering if you had any time to action this.

runtime switch is added 😅

harmw avatar Feb 14 '24 15:02 harmw

@metalmatze quick update: just need (time) to resolve the file handling part 😅

harmw avatar Mar 06 '24 08:03 harmw