Skip to content

Commit

Permalink
generate server.secretkey for the agents
Browse files Browse the repository at this point in the history
Signed-off-by: John Pitman <[email protected]>
  • Loading branch information
jopit committed Nov 7, 2024
1 parent b5afc9b commit 7c34544
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- 'main'
- 'gitops-5159-e2e-test-framework'
pull_request:
branches:
- 'main'
Expand Down
12 changes: 11 additions & 1 deletion test/e2e2/test-env/setup-vcluster-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,23 @@ apply() {
echo "-> TMP_DIR is $TMP_DIR"
cp -r ${SCRIPTPATH}/* $TMP_DIR

# Comment out 'loadBalancerIP:' lines on OpenShift
# Comment out 'loadBalancerIP:' lines on OpenShift
if [[ "$OPENSHIFT" != "" ]]; then
sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/redis-service.yaml
sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/repo-server-service.yaml
sed -i.bak -e '/loadBalancerIP/s/^/#/' $TMP_DIR/control-plane/server-service.yaml
fi

# Generate the server secret key for the argocd running on the managed and autonomous agent clusters
echo "-> Generate server.secretkey for agent's argocd-secrets"
if ! pwmake=$(which pwmake); then
pwmake=$(which pwgen)
fi
echo "data:" >> $TMP_DIR/agent-managed/argocd-secret.yaml
echo " server.secretkey: $($pwmake 56 | base64)" >> $TMP_DIR/agent-managed/argocd-secret.yaml
echo "data:" >> $TMP_DIR/agent-autonomous/argocd-secret.yaml
echo " server.secretkey: $($pwmake 56 | base64)" >> $TMP_DIR/agent-autonomous/argocd-secret.yaml

echo "-> Create Argo CD on control plane"

cluster=control-plane
Expand Down

0 comments on commit 7c34544

Please sign in to comment.