feat: accept new SLO specs using the filesystem HTTP api
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
@metalmatze would appreciate your thoughts on this, thank you.
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.
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 wondering if you had any time to action this.
@harmw wondering if you had any time to action this.
runtime switch is added 😅
@metalmatze quick update: just need (time) to resolve the file handling part 😅