Skip to content

Commit 7e504c6

Browse files
authored
Add polling proxy to register script (#1132)
1 parent f48ef39 commit 7e504c6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docker/kubernetes-agent-tentacle/scripts/register.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@ function getStatusOfRegistration() {
199199
cut -d'"' -f4)
200200
}
201201

202+
function setPollingProxy() {
203+
local ARGS=()
204+
ARGS+=('polling-proxy'
205+
'--instance' "$instanceName")
206+
207+
if [[ -n "$TentaclePollingProxyHost" ]]; then
208+
echo "Using polling proxy at $TentaclePollingProxyHost:$TentaclePollingProxyPort"
209+
ARGS+=(
210+
'--proxyEnable' 'true'
211+
'--proxyHost' "$TentaclePollingProxyHost"
212+
'--proxyPort' "$TentaclePollingProxyPort"
213+
'--proxyUsername' "$TentaclePollingProxyUsername"
214+
'--proxyPassword' "$TentaclePollingProxyPassword")
215+
else
216+
echo "Disabling polling proxy"
217+
ARGS+=('--proxyEnable' 'false')
218+
fi
219+
220+
tentacle "${ARGS[@]}"
221+
}
222+
202223
function registerTentacle() {
203224
echo "Registering with server ..."
204225

@@ -320,6 +341,7 @@ else
320341
validateVariables
321342

322343
configureTentacle
344+
setPollingProxy
323345
registerTentacle
324346
echo "Configuration successful"
325347
fi

0 commit comments

Comments
 (0)