mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Set ProviderID when running kubemark node
Kubemark is very useful tool for exercising various solutions requiring to run many nodes on a small set of physical nodes. E.g. for development and testing of cluster autoscaler where some use cases might require tens or hundreds of nodes to be scalled up and down. Using kubemark saves computation resources. As part of integration of cluster-api project into cluster-autoscaler project, the autoscaler uses the ProviderID field to index nodes through informer. Setting the ProviderID field even by Kubemark allows to autoscale cluster made of hollow nodes.
This commit is contained in:
parent
c6d0cdf309
commit
145dcaf92c
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package kubemark
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
@ -121,6 +122,7 @@ func GetHollowKubeletConfig(
|
||||
f.MaxPerPodContainerCount = 2
|
||||
f.RegisterNode = true
|
||||
f.RegisterSchedulable = true
|
||||
f.ProviderID = fmt.Sprintf("kubemark://%v", nodeName)
|
||||
|
||||
// Config struct
|
||||
c, err := options.NewKubeletConfiguration()
|
||||
|
Loading…
Reference in New Issue
Block a user