Skip to content

Commit c56fd7b

Browse files
updated csdp-installer (#2)
1 parent c8cb9ff commit c56fd7b

File tree

2 files changed

+39
-20
lines changed

2 files changed

+39
-20
lines changed

installer/helm/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: csdp-installer
33
description: A Helm chart used for installing a CSDP runtime
44
type: application
5-
version: 0.1.24
6-
appVersion: v0.0.11
5+
version: 0.1.25
6+
appVersion: v0.0.12

installer/install.sh

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,20 @@ create_default_git_source() {
309309
echo ""
310310
}
311311

312+
ping_app_proxy() {
313+
echo " --> Checking connection to app-proxy"
314+
echo "Pinging ${CSDP_RUNTIME_INGRESS_URL}/app-proxy/api/health"
315+
APP_PROXY_PING_RESPONSE=`curl "${CSDP_RUNTIME_INGRESS_URL}/app-proxy/api/readyz" -Ssfl --insecure`
316+
317+
if [[ "$APP_PROXY_PING_RESPONSE" -ne "OK" ]] ; then
318+
echo "Failed to ping app-proxy address"
319+
echo ${GIT_SOURCE_CREATE_RESPONSE}
320+
exit 1
321+
fi
322+
323+
echo " --> App-proxy is ready!"
324+
}
325+
312326
#
313327
# Start here:
314328
#
@@ -348,7 +362,6 @@ else
348362
create_codefresh_secret
349363
fi
350364
echo ""
351-
echo ""
352365

353366
# 2. Check repo creds secret
354367
echo "Checking secret $REPO_CREDS_SECRET_NAME..."
@@ -365,13 +378,8 @@ else
365378
fi
366379
fi
367380
echo ""
368-
echo ""
369-
370-
create_argocd_token_secret
371-
echo ""
372-
echo ""
373381

374-
# 4. Check bootstrap application
382+
# 3. Create the bootstrap application
375383
echo "Checking application $BOOTSTRAP_APP_NAME..."
376384
if kubectl -n "$NAMESPACE" get application "$BOOTSTRAP_APP_NAME"; then
377385
echo " --> Application $BOOTSTRAP_APP_NAME exists"
@@ -382,19 +390,30 @@ else
382390
fi
383391
echo ""
384392

385-
# 5. Check git integration
386-
echo "Checking default git integration..."
387-
echo "Checking application $BOOTSTRAP_APP_NAME..."
388-
if kubectl -n "$NAMESPACE" get secret -l io.codefresh.integration-type=git -l io.codefresh.integration-name=default 2>&1 | grep "No resources found"; then
389-
echo " --> Default git integration doesn't exists."
390-
echo ""
391-
create_git_integration
392-
else
393-
echo " --> Default git integration exists"
394-
fi
393+
# 4. Create argo-cd jwt token for events-reporter event-source
394+
create_argocd_token_secret
395+
echo ""
395396

396-
# 6. Register to git integration
397+
# 4.5. Ping app-proxy to check if it is reachable
398+
ping_app_proxy
399+
echo ""
400+
401+
# Complete installation for non managed runtimes
402+
# a. create default git integration
403+
# b. register user to default git integration
397404
if [[ "$CSDP_MANAGED_RUNTIME" -ne "true" ]] ; then
405+
# 5. Check git integration
406+
echo "Checking default git integration..."
407+
echo "Checking application $BOOTSTRAP_APP_NAME..."
408+
if kubectl -n "$NAMESPACE" get secret -l io.codefresh.integration-type=git -l io.codefresh.integration-name=default 2>&1 | grep "No resources found"; then
409+
echo " --> Default git integration doesn't exists."
410+
echo ""
411+
create_git_integration
412+
else
413+
echo " --> Default git integration exists"
414+
fi
415+
416+
# 6. Register to git integration
398417
register_to_git_integration
399418

400419
if [[ "$CSDP_CREATE_DEFAULT_GIT_SOURCE" == "true" ]]; then

0 commit comments

Comments
 (0)