bitnami-containers/.vib/valkey-sentinel/goss/valkey-sentinel.yaml

36 lines
1.2 KiB
YAML

# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0
file:
/opt/bitnami/valkey-sentinel/etc/sentinel.conf:
exists: true
contents:
- "port 26379"
- "bind 0.0.0.0"
- /pidfile.*/opt/bitnami/valkey-sentinel/tmp/valkey-sentinel.pid/
- "daemonize no"
- 'logfile ""'
command:
# Remove if sentinel gets updated: https://github.com/valkey-io/valkey/blob/7.2/sentinel.conf
# Requires to update the libvalkeysentinel.sh script
{{ if regexMatch "^7.+" .Env.APP_VERSION }}
check-primary-master-change:
exec: if ! grep "SENTINEL master-reboot-down-after-period" /opt/bitnami/valkey-sentinel/etc/sentinel.conf; then exit 1; fi
exit-status: 0
{{ end }}
check-valkey-server:
exec: timeout --preserve-status 5 valkey-server /opt/bitnami/valkey-sentinel/etc/sentinel.conf --sentinel
exit-status: 0
timeout: 10000
stdout:
- "Configuration loaded"
- /monitor.*quorum/
{{ range $binary := .Vars.binaries }}
check-{{ $binary }}-ssl:
exec: ldd /opt/bitnami/valkey-sentinel/bin/{{ $binary }}
exit-status: 0
stdout:
- "libcrypto.so"
- "libssl.so"
{{ end }}