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

Adding dry-run mode. #454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jsargiot
Copy link

This mode allows to process template resources and run check_cmd on the result without updating target files nor running reload_cmd. This mode is useful to run monitoring checks where it's nice to be able to detect problems with the templates at rendering and application level.

Example usage:

Confd is configured to update nginx.conf file and you need a way to detect problems with template. Right now -noop is ok to test template rendering but it won't catch problems in the nginx configuration (like duplicated upstreams), so this new command allows to render the template and run nginx template check.

@bacongobbler
Copy link
Collaborator

Hey @jsargiot! So essentially this is just a dry run? Perhaps --dry-run would be a better name to call this flag to follow the convention of other projects. This sounds like a handy feature to support.

@jsargiot
Copy link
Author

Perhaps --dry-run would be a better name to call this flag to follow the convention of other projects.

To me --dry-run means "pretend you are doing things" in this case the template is being rendered and check_cmd is actually executed... so it would feel a bit akward to me but I don't really have a strong opposition to it.

This mode allows to process template resources and run check_cmd on the result without updating target files nor running reload_cmd. This mode is useful to run monitoring checks where it's nice to be able to detect problems with the templates at rendering and application level.
@jsargiot jsargiot changed the title Adding check-only mode. Adding dry-run mode. May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants