various changes
This commit is contained in:
@@ -272,6 +272,12 @@ class K8sConfig implements ConfigScope {
|
||||
""")
|
||||
final int dvfsSchedulingNumTopRuntimes
|
||||
|
||||
@ConfigOption
|
||||
@Description("""
|
||||
If not empty, only nodes with the given label will be used.
|
||||
""")
|
||||
final String nodeLabel
|
||||
|
||||
/* required by extension point -- do not remove */
|
||||
K8sConfig() {
|
||||
this(Collections.emptyMap())
|
||||
@@ -314,7 +320,10 @@ class K8sConfig implements ConfigScope {
|
||||
runtimeEstimator = opts.runtimeEstimator as String ?: "LinearFit"
|
||||
noiseRuntimeEstimatorNoiseMagnitude = opts.noiseRuntimeEstimatorNoiseMagnitude as Duration ?: new Duration(30, TimeUnit.SECONDS)
|
||||
runtimeComparisonEpsilon = opts.runtimeComparisonEpsilon as Duration ?: new Duration(10, TimeUnit.SECONDS)
|
||||
dvfsSchedulingNumTopRuntimes = opts.dvfsSchedulingTopRuntimes as int ?: 3
|
||||
def numTop = opts.dvfsSchedulingNumTopRuntimes
|
||||
dvfsSchedulingNumTopRuntimes = numTop != null && numTop.toString().trim() != '' ? numTop as int : 3
|
||||
|
||||
nodeLabel = opts.nodeLabel as String ?: ""
|
||||
|
||||
// -- shortcut to pod image pull-policy
|
||||
if( imagePullPolicy )
|
||||
@@ -376,6 +385,12 @@ class K8sConfig implements ConfigScope {
|
||||
return DEFAULT_FUSE_PLUGIN
|
||||
}
|
||||
|
||||
String[] getNodeLabelFilter() {
|
||||
if (nodeLabel.empty)
|
||||
return null
|
||||
return nodeLabel.split('=', 2)
|
||||
}
|
||||
|
||||
/**
|
||||
* Whenever the pod should honour the entrypoint defined by the image (default: false)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user