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

Feature cli component #365

Closed
wants to merge 2 commits into from

Conversation

Gaikanomer9
Copy link

@Gaikanomer9 Gaikanomer9 commented Jul 7, 2022

Hello!

This PR is intended for adding CLI functionality to Pyrra. It works relatively straightforward with minimal refactoring:
Taking SLO Config files -> Converting them to Prometheus Rules/Alerts Files

It doesn't update objectives intended for displaying with UI because this wouldn't fit the purpose of the tool. In this scenario it would usage in CI/CD systems or there where custom UI is not needed.

How to use:

go build
./pyrra generate --config-files="examples/docker-compose/pyrra/*.yaml" --prometheus-folder=.

Closes #314

Signed-off-by: Nikita Zavyalov <nzavyalo@redhat.com>
Signed-off-by: Nikita Zavyalov <nzavyalo@redhat.com>
@@ -21,5 +21,6 @@ bin
*.swp
*.swo
*~
.vscode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to ignore folders system wide rather than per repository: https://stackoverflow.com/a/7335487
Then it's not needed on every repository. ☺️

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the tip 😊

@metalmatze metalmatze mentioned this pull request Jul 11, 2022
@metalmatze
Copy link
Member

Really great work and the filepath.Glob usage is hopefully going to land in #361 👍
In the meantime, let me know if there are other things you want to help and contribute!
Closing as discussed in #361.

@metalmatze metalmatze closed this Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Standalone cli tool able to transform SLO definitions into prom rules
2 participants