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 5bd3dca
Showing 1 changed file with 11 additions and 1 deletion.
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 5bd3dca

Please sign in to comment.