Skip to content

Commit

Permalink
Reading password from secret helper in notification-service
Browse files Browse the repository at this point in the history
Signed-off-by: “SanjuPal01” <[email protected]>
  • Loading branch information
SanjuPal01 committed Dec 5, 2024
1 parent 2910d68 commit 5b33ff9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion components/notifications-service/habitat/hooks/run
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ if [[ ! -f "$erl_cookie" ]]; then
chmod 400 "$erl_cookie"
fi

exec "{{pkg.path}}/bin/notifications" start
# exec "{{pkg.path}}/bin/notifications" start
exec secrets-helper exec \
--watch \
--optional-secret userconfig.pg_dbuser_password \
-- "{{pkg.path}}/bin/notifications" start
2 changes: 1 addition & 1 deletion components/notifications-service/habitat/templates/pg-env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export SQERL_DBPORT="{{pg_gateway_port}}"
export SQERL_DBUSER="{{pg_svc_user}}"
{{- if is_external_pg }}
{{- if eq "password" .Platform.GetPlatform.GetExternalPostgresql.GetAuth.GetScheme.GetValue }}
export SQERL_DBPASSWORD="{{ .Platform.GetPlatform.GetExternalPostgresql.GetAuth.GetPassword.GetDbuser.GetPassword.GetValue }}"
export SQERL_DBPASSWORD=$(secrets-helper show userconfig.pg_dbuser_password || echo "")
{{- if .Platform.GetPlatform.GetExternalPostgresql.GetSsl.GetEnable.GetValue }}
export SQERL_NO_SSL_AUTH="true"
export EXTERNAL_PG_ROOT_CA_CERT="{{pg_root_ca_cert_path}}"
Expand Down

0 comments on commit 5b33ff9

Please sign in to comment.