Skip to content

[wsman-mk2] Schedule on non experimental nodes #17481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions components/ws-manager-mk2/controllers/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ func createDefiniteWorkspacePod(sctx *startWorkspaceContext) (*corev1.Pod, error
Key: "gitpod.io/experimental",
Operator: corev1.NodeSelectorOpExists,
})
} else {
matchExpressions = append(matchExpressions, corev1.NodeSelectorRequirement{
Key: "gitpod.io/experimental",
Operator: corev1.NodeSelectorOpDoesNotExist,
})
}

affinity := &corev1.Affinity{
Expand Down
6 changes: 0 additions & 6 deletions dev/preview/workflow/preview/deploy-gitpod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,4 @@ leeway run components:add-smith-token \
-DPREVIEW_K3S_KUBE_CONTEXT="${PREVIEW_K3S_KUBE_CONTEXT}" \
-DPREVIEW_NAMESPACE="${PREVIEW_NAMESPACE}"

# Add experimental node label if ws-manager-mk2 is enabled.
# Remove once mk2 workspaces no longer run on experimental nodes.
if [[ "${GITPOD_WSMANAGER_MK2}" == "true" ]]; then
kubectl --kubeconfig "${PREVIEW_K3S_KUBE_PATH}" --context "${PREVIEW_K3S_KUBE_CONTEXT}" --namespace="${PREVIEW_NAMESPACE}" label nodes "${PREVIEW_K3S_KUBE_CONTEXT}" gitpod.io/experimental="true" --overwrite
fi

log_success "Installation is happy: https://${DOMAIN}/workspaces"