feat: add interactive node configuration for dedicated DataMate nodes#498
Merged
Conversation
- Add node-setup.sh script for interactive node selection with keyboard navigation - Add node-cleanup.sh script to remove labels/taints during uninstall - Add global.nodeSelector and global.tolerations to values.yaml - Add nodeSelector/tolerations placeholders to all deployments: * Helm charts: backend, backend-python, database, frontend, gateway, runtime * Ray cluster: head and worker nodes * NPU/GPU worker groups * Raw K8s YAMLs: data-juicer, mineru-310, mineru-910 - Add Makefile targets: node-setup, node-cleanup - Integrate node setup into datamate-k8s-install workflow Features: - Interactive keyboard navigation (↑/↓ or j/k) - Automatic label application: node-role.kubernetes.io/datamate=true - Optional taint application: node-role.kubernetes.io/datamate=true:NoSchedule - Automatic Helm argument generation - Safe defaults for development (skip option) Fixed terminal handling issue when script runs from Makefile by: - Detecting non-terminal environments - Using temp file for Helm args instead of stdout capture - Adding fallback read mode for Makefile context
The script was missing --namespace argument handling, causing 'Unknown option: --namespace' error during uninstallation.
In stty raw mode, Enter key produces \r (carriage return, \x0d) instead of \n (newline, \x0a). Added conversion to make Enter key detection work in interactive node selection. The issue was that pressing Enter did nothing because the case pattern only matched \x0a but raw mode sends \x0d.
Helm was interpreting 'true' as boolean instead of string, causing
Kubernetes validation errors:
- expected string, got &value.unstructured{Value:true}
Fixed by adding quotes around all values in --set arguments:
- nodeSelector values: "true"
- tolerations values: "true", "Equal", "NoSchedule"
This ensures Helm passes strings to Kubernetes, not boolean types.
Helm --set interprets 'true' as boolean, causing Kubernetes validation
errors for nodeSelector and tolerations value fields.
Changes:
- Changed all --set to --set-string (forces string type)
- Added dot escaping for nodeSelector keys (node-role\.kubernetes\.io)
- Kept toleration key values unescaped (only in value, not in path)
Tested with:
helm template test deployment/helm/datamate/ --set-string backend-python.nodeSelector.node-role\.kubernetes\.io/datamate=true --set-string backend-python.tolerations[0].value=true
Output shows correct string values:
nodeSelector:
node-role.kubernetes.io/datamate: "true" # String, not boolean
tolerations:
value: "true" # String, not boolean
This resolves the error:
'expected string, got &value.valueUnstructured{Value:true}'
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Features:
Fixed terminal handling issue when script runs from Makefile by:
Installation
Uninstallation
Label and Taint
close: #499