Skip to content

Commit 145dcaf

Browse files
committed
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.
1 parent c6d0cdf commit 145dcaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/kubemark/hollow_kubelet.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package kubemark
1818

1919
import (
20+
"fmt"
2021
"time"
2122

2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -121,6 +122,7 @@ func GetHollowKubeletConfig(
121122
f.MaxPerPodContainerCount = 2
122123
f.RegisterNode = true
123124
f.RegisterSchedulable = true
125+
f.ProviderID = fmt.Sprintf("kubemark://%v", nodeName)
124126

125127
// Config struct
126128
c, err := options.NewKubeletConfiguration()

0 commit comments

Comments
 (0)