diff --git a/scripts/kargo-git-creds b/scripts/kargo-git-creds index 9845427..29bb4e2 100755 --- a/scripts/kargo-git-creds +++ b/scripts/kargo-git-creds @@ -29,7 +29,7 @@ apiVersion: v1 metadata: labels: kargo.akuity.io/cred-type: git - name: holos-local-cluster-git-creds + name: git-creds-gh-app-${GITHUB_APP_INSTALL_ID} namespace: kargo type: Opaque stringData: @@ -39,9 +39,11 @@ stringData: repoURL: "${GITHUB_APP_REPO_URL}" EOF -cp kargo.yaml "${CAROOT}/kargo.yaml" +mkdir -p "${CAROOT}/manifests" +cp kargo.yaml "${CAROOT}/manifests/kargo-gh-app-${GITHUB_APP_INSTALL_ID}.yaml" echo "Secret created, apply with:" >&2 -echo " kubectl apply -f '${CAROOT}/kargo.yaml'" >&2 +echo >&2 +echo ' kubectl apply -f "$(mkcert -CAROOT)/manifests"' >&2 echo >&2 echo "The reset-cluster script will automatically apply this secret going forward." >&2 diff --git a/scripts/reset-cluster b/scripts/reset-cluster index bc36ebc..68df8a5 100755 --- a/scripts/reset-cluster +++ b/scripts/reset-cluster @@ -23,3 +23,7 @@ kubectl apply --server-side=true -n cert-manager -f "${CAROOT}/local-ca.yaml" if [[ -f "${CAROOT}/kargo.yaml" ]]; then kubectl apply --server-side=true -f "${CAROOT}/kargo.yaml" --force-conflicts fi +# Additional manifests to apply after a reset. Useful for credentials +if [[ -d "${CAROOT}/manifests" ]]; then + kubectl apply --server-side=true -f "${CAROOT}/manifests" --force-conflicts +fi