-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: only allow scheduling first pod
Problem: we currently allow any pod in the group to make the request Solution: Making a BIG assumption that might be wrong, I am adding logic that only allows scheduling (meaning going through PreFilter with AskFlux) given that we see the first pod in the listing. In practice this is the first index (e.g., index 0) which based on our sorting strategy (timestamp then name) I think might work. But I am not 100% on that. The reason we want to do that is so the nodes are chosen for the first pod, and then the group can quickly follow and be actually assigned. Before I did this I kept seeing huge delays in waiting for the queue to move (e.g., 5/6 pods Running and the last one waiting, and then kicking in much later like an old car) and I think with this tweak that is fixed. But this is my subjective evaluation. I am also adding in the hack script for deploying to gke, which requires a push instead of a kind load. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Before running this, you should: | ||
# 1. create the kind cluster (needs more than one node, fluence does not scheduler to the control plane) | ||
# 2. Install cert-manager | ||
# 3. Customize the script to point to your registry if you intend to push | ||
|
||
REGISTRY="${1:-ghcr.io/vsoch}" | ||
HERE=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
ROOT=$(dirname ${HERE}) | ||
|
||
# Go to the script directory | ||
cd ${ROOT} | ||
|
||
# These build each of the images. The sidecar is separate from the other two in src/ | ||
make REGISTRY=${REGISTRY} SCHEDULER_IMAGE=fluence SIDECAR_IMAGE=fluence-sidecar CONTROLLER_IMAGE=fluence-controller | ||
|
||
# This is what it might look like to push | ||
# docker push ghcr.io/vsoch/fluence-sidecar && docker push ghcr.io/vsoch/fluence-controller && docker push ghcr.io/vsoch/fluence:latest | ||
|
||
# We load into kind so we don't need to push/pull and use up internet data ;) | ||
docker push ${REGISTRY}/fluence-sidecar:latest | ||
docker push ${REGISTRY}/fluence-controller:latest | ||
docker push ${REGISTRY}/fluence:latest | ||
|
||
# And then install using the charts. The pull policy ensures we use the loaded ones | ||
cd ${ROOT}/upstream/manifests/install/charts | ||
helm uninstall fluence || true | ||
helm install \ | ||
--set scheduler.image=${REGISTRY}/fluence:latest \ | ||
--set controller.image=${REGISTRY}/fluence-controller:latest \ | ||
--set scheduler.sidecarimage=${REGISTRY}/fluence-sidecar:latest \ | ||
fluence as-a-second-scheduler/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters