Skip to content

Commit

Permalink
Update healthcheck to use configured default ports (#585)
Browse files Browse the repository at this point in the history
* Update healthcheck (goss) to use default configured ports
* gomplate on the `goss.yaml` file to check env vars
  • Loading branch information
mbonsack authored and GitHub committed Jul 27, 2020
1 parent 3d903c7 commit 93c6843
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FROM splunk/scs:base-${BRANCH}

COPY --from=hairyhenderson/gomplate:v3.5.0 /gomplate /usr/local/bin/gomplate

COPY goss.yaml goss.yaml
COPY goss.yaml.tmpl goss.yaml.tmpl

COPY etc/syslog-ng.conf.tmpl /opt/syslog-ng/etc/syslog-ng.conf.tmpl
COPY etc/conf.d /opt/syslog-ng/etc/conf.d
Expand Down
20 changes: 0 additions & 20 deletions package/goss.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions package/sbin/goss.yaml → package/goss.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ process:
syslog-ng:
running: true
port:
tcp:514:
tcp:{{- getenv "SC4S_LISTEN_DEFAULT_TCP_PORT" "514" }}:
listening: true
ip:
- 0.0.0.0
udp:514:
udp:{{- getenv "SC4S_LISTEN_DEFAULT_UDP_PORT" "514" }}:
listening: true
ip:
- 0.0.0.0
tcp:6514:
tcp:{{- getenv "SC4S_LISTEN_DEFAULT_TLS_PORT" "6514" }}:
listening: true
ip:
- 0.0.0.0
2 changes: 2 additions & 0 deletions package/sbin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ echo sc4s version=$(cat /VERSION)
echo sc4s version=$(cat /VERSION) >/opt/syslog-ng/var/log/syslog-ng.out
/opt/syslog-ng/sbin/syslog-ng -s >>/opt/syslog-ng/var/log/syslog-ng.out 2>/opt/syslog-ng/var/log/syslog-ng.err

# Use gomplate to pick up default listening ports for health check
echo starting goss
gomplate --file /goss.yaml.tmpl --out /goss.yaml
goss -g /goss.yaml serve --format json >/dev/null &

echo syslog-ng starting
Expand Down

0 comments on commit 93c6843

Please sign in to comment.