Skip to content

Commit 0884814

Browse files
author
Jan Lieskovsky
committed
Update
Signed-off-by: Jan Lieskovsky <[email protected]>
1 parent 35f605f commit 0884814

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

os-sso72/added/openshift-launch.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function clean_shutdown() {
1515
function wait_for_service() {
1616
local -r curl_conn_refused_exit_code="7"
1717
if [ -n "${SERVICE_WAIT_NAME}" ]; then
18-
local -r connect_retry_message="${SERVICE_WAIT_MESSAGE:-"Waiting for the \"${SERVICE_WAIT_NAME}\" service to become available ..."}"
18+
local -r connect_retry_message="${SERVICE_WAIT_RETRY_MESSAGE:-"Waiting for the \"${SERVICE_WAIT_NAME}\" service to become available ..."}"
1919
local service="${SERVICE_WAIT_NAME/-/_}"
2020
local -r service_host="${service^^}_SERVICE_HOST"
2121
local -r service_port="${service^^}_SERVICE_PORT"
@@ -27,9 +27,9 @@ function wait_for_service() {
2727
log_warning "Unable to determine target host or port of the \"${SERVICE_WAIT_NAME}\" service. The RH-SSO pod will start without waiting the \"${SERVICE_WAIT_NAME}\" service to be reachable over network. Please make sure you specified correct service name in SERVICE_WAIT_NAME"
2828
else
2929
until ( echo > /dev/tcp/"${!service_host}"/"${!service_port}" ) &> /dev/null; do
30-
if [ -n "${SERVICE_WAIT_CLAIM_MESSAGE}" ]; then
31-
log_warning "${SERVICE_WAIT_CLAIM_MESSAGE}"
32-
unset SERVICE_WAIT_CLAIM_MESSAGE
30+
if [ -n "${SERVICE_WAIT_INTRO_MESSAGE}" ]; then
31+
log_warning "${SERVICE_WAIT_INTRO_MESSAGE}"
32+
unset SERVICE_WAIT_INTRO_MESSAGE
3333
fi
3434
log_info "${connect_retry_message}"
3535
sleep "${SERVICE_WAIT_RETRY_PERIOD_SECONDS:-10}s"

os-sso72/module.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,27 @@ run:
2323
user: 185
2424
cmd:
2525
- "/opt/eap/bin/openshift-launch.sh"
26+
27+
envs:
28+
- name: "SERVICE_WAIT_NAME"
29+
example: "sso-mysql"
30+
description: "Name of the OpenShift service, the RH-SSO pod should wait for to become reachable over network, prior starting the RH-SSO server. Not set by default."
31+
- name: "SERVICE_WAIT_RETRY_MESSAGE"
32+
example: "Waiting for the \"${SERVICE_WAIT_NAME}\" service to become available ..."
33+
description: "Message to be displayed in connect-retry loop, in which the RH-SSO pod is waiting for the SERVICE_WAIT_NAME to become reachable over network. Not set by default."
34+
- name: "SERVICE_WAIT_INTRO_MESSAGE"
35+
example: "Ensure a persistent volume is available for the \"${APPLICATION_NAME}-mysql-claim\" or a storage class is set."
36+
description: "Message to be displayed prior starting the connect-retry loop, in which the RH-SSO pod is waiting for the SERVICE_WAIT_NAME to become reachable over network. Typically describes additional requirements in order the connect-retry loop of the RH-SSO pod successfully to finish. Not set by default."
37+
- name: "SSO_ADMIN_USERNAME"
38+
example: "admin"
39+
description: "Username of the administrator account for the 'master' realm of the RH-SSO server. Required. If no value is specified, it is auto generated and displayed as an OpenShift Instructional message when the template is instantiated."
40+
- name: "SSO_ADMIN_PASSWORD"
41+
example: "hardtoguess"
42+
description: "Password of the administrator account for the 'master' realm of the RH-SSO server. Required. If no value is specified, it is auto generated and displayed as an OpenShift Instructional message when the template is instantiated."
43+
- name: "SSO_SERVICE_USERNAME"
44+
example: "username"
45+
description: "RH-SSO Server service username with rights to create Client configurations in SSO_REALM. This user is created if this ENV is provided"
46+
- name: "SSO_SERVICE_PASSWORD"
47+
example: "password"
48+
description: "Password for SSO_SERVICE_USERNAME"
49+

0 commit comments

Comments
 (0)