Skip to content

Commit 2e5b739

Browse files
fix
1 parent 26250c3 commit 2e5b739

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

csdp/managed/COMPONENTS

Lines changed: 0 additions & 1 deletion
This file was deleted.

installer/install.sh

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ REPO_CREDS_SECRET_NAME="autopilot-secret"
2424
ARGOCD_TOKEN_SECRET_NAME="argocd-token"
2525
ARGOCD_INITIAL_TOKEN_SECRET_NAME="argocd-initial-admin-secret"
2626
BOOTSTRAP_APP_NAME="csdp-bootstrap"
27-
ADDITIONAL_COMPONENTS_MANAGED="\nevents-reporter"
28-
ADDITIONAL_COMPONENTS="\nevents-reporter\nrollout-reporter\nworkflow-reporter"
29-
RUNTIME_DEF_URL="https://github.com/codefresh-io/csdp-official-poc/releases/VERSION/download/runtime.yaml"
27+
COMPONENTS_MANAGED="argo-events,app-proxy,argo-cd,events-reporter"
28+
COMPONENTS="argo-events,app-proxy,argo-cd,events-reporter,rollout-reporter,workflow-reporter"
3029

3130
# Params:
3231
check_required_param "namespace" "${NAMESPACE}"
@@ -48,30 +47,18 @@ CSDP_RUNTIME_REPO_CREDS_PATTERN=`echo ${CSDP_RUNTIME_REPO} | grep --color=never
4847
CSDP_MANAGED_RUNTIME="${CSDP_MANAGED_RUNTIME:-false}"
4948

5049
create_codefresh_secret() {
51-
# Download runtime definition
52-
RUNTIME_DEF_URL=`echo "${RUNTIME_DEF_URL}" | sed s/VERSION/${CSDP_RUNTIME_VERSION}/g`
53-
54-
echo " --> Downloading runtime definition..."
55-
echo " --> curl -f -L ${RUNTIME_DEF_URL}"
56-
RUNTIME_DEF=$(curl -SsfL "$RUNTIME_DEF_URL")
57-
RESOLVED_RUNTIME_VERSION=`echo "$RUNTIME_DEF" | yq e '.spec.version' -`
58-
echo " --> Resolved runtime version: ${RESOLVED_RUNTIME_VERSION}"
59-
echo ""
60-
61-
# Prepare components for request
62-
6350
if [[ "$CSDP_MANAGED_RUNTIME" == "true" ]] ; then
64-
ADDITIONAL_COMPONENTS=${ADDITIONAL_COMPONENTS_MANAGED}
51+
COMPONENTS=$COMPONENTS_MANAGED
6552
fi
66-
COMPONENT_NAMES=`echo "$RUNTIME_DEF" | yq e '.spec.components.[].name' -`
67-
COMPONENT_NAMES=`printf "${COMPONENT_NAMES}${ADDITIONAL_COMPONENTS}" | tr '\n' ' '`
68-
COMPONENTS="[\"csdp-argo-cd\""
53+
COMPONENT_NAMES=`echo ${COMPONENTS} | tr ',' ' '`
54+
COMPONENTS=""
6955
for COMPONENT in $COMPONENT_NAMES
7056
do
7157
CUR_COMPONENT=`echo -n "\"csdp-${COMPONENT}\""`
72-
COMPONENTS="${COMPONENTS},${CUR_COMPONENT}"
58+
COMPONENTS="${CUR_COMPONENT} ${COMPONENTS}"
7359
done
74-
COMPONENTS="${COMPONENTS}]"
60+
COMPONENTS=`echo $COMPONENTS | tr ' ' ','`
61+
COMPONENTS="[${COMPONENTS}]"
7562

7663
RUNTIME_CREATE_ARGS="{
7764
\"repo\": \"${CSDP_RUNTIME_REPO}\",
@@ -81,7 +68,7 @@ create_codefresh_secret() {
8168
\"ingressClass\":\"${CSDP_INGRESS_CLASS_NAME}\",
8269
\"ingressController\":\"${CSDP_INGRESS_CONTROLLER}\",
8370
\"componentNames\":${COMPONENTS},
84-
\"runtimeVersion\":\"${RESOLVED_RUNTIME_VERSION}\"
71+
\"runtimeVersion\":\"0.0\"
8572
}"
8673

8774
RUNTIME_CREATE_DATA="{\"operationName\":\"CreateRuntime\",\"variables\":{\"args\":$RUNTIME_CREATE_ARGS}"

0 commit comments

Comments
 (0)