saltstack-formulas / prometheus-formula

Manage a Prometheus installation
Other
27 stars 51 forks source link

Manage unofficial exporters #52

Closed lagooj closed 4 years ago

lagooj commented 4 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Support "unofficial" exporter with archive as upstream

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

Taking care of "unofficial exporter" as postgresql, php-fpm ...

Pillar / config required to test the proposed changes

Under pkg:component:name:archive adding official: true/false ( default => true) tar: true/false ( default => true)

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

lagooj commented 4 years ago

LGTM mostly. I also need this feature. I am not sure tar: boolean is needed because the archive dict is always an archive. So file.managed will work for both official and unofficial exporters. There is probably no need to introduce archive.extracted as well since file.managed handles archives too? Just check the extra code is actually needed.

Hi, I kept the original mechanism, to be sure to break nothing, as it's kind of trivial modification. Not all opensource exporter deliver an archive, some as php-fpm provide only binary file, that's why I implemented tar: bool, in order to be able to switch to file managed if needed. archive.extracted, extracts on fly, I didn't find the same behavior for file.managed in salt documentation, but I could be wrong :)

noelmcloughlin commented 4 years ago

Get Travis CI passing and I'll merge. thanks @lagooj

saltstack-formulas-travis commented 4 years ago

:tada: This PR is included in version 5.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: