Skip to content

Commit

Permalink
feat(reload/enable): add options for services
Browse files Browse the repository at this point in the history
  • Loading branch information
mdschmitt committed Aug 26, 2022
1 parent d5cfeb0 commit 81fe75f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ prometheus:
service:
args:
web.listen-address: 0.0.0.0:9090
# Enable the service on startup (default: true)
enable: true
# Reload service if changes occur instead of restarting (default: false)
reload: false
config:
# yamllint disable-line rule:line-length
# ref https://raw.githubusercontent.com/prometheus/prometheus/release-2.10/config/testdata/conf.good.yml
Expand Down
3 changes: 2 additions & 1 deletion prometheus/service/running.sls
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ prometheus-service-running-{{ name }}-unmasked:
prometheus-service-running-{{ name }}:
service.running:
- enable: True
- enable: {{ p.pkg.component[name]['service'].get('enable', True) }}
- reload: {{ p.pkg.component[name]['service'].get('reload', False) }}
- require:
- sls: {{ sls_config_file }}
{%- if grains.kernel|lower == 'linux' %}
Expand Down

0 comments on commit 81fe75f

Please sign in to comment.