Skip to content

Commit

Permalink
Add custom provider in node creation #358 (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
dciangot authored Feb 3, 2025
2 parents 964ed80 + 8c7dde3 commit 60ce516
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/virtualkubelet/virtualkubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ func NewProviderConfig(
lbls := map[string]string{
"alpha.service-controller.kubernetes.io/exclude-balancer": "true",
"beta.kubernetes.io/os": "linux",
"kubernetes.io/os": "linux",
"kubernetes.io/hostname": nodeName,
"kubernetes.io/role": "agent",
"node.kubernetes.io/exclude-from-external-load-balancers": "true",
"type": "virtual-kubelet",
"virtual-node.interlink/type": "virtual-kubelet",
}

node := v1.Node{
Expand All @@ -257,6 +258,7 @@ func NewProviderConfig(
//Annotations: cfg.ExtraAnnotations,
},
Spec: v1.NodeSpec{
ProviderID: "external:///" + nodeName,
Taints: []v1.Taint{{
Key: "virtual-node.interlink/no-schedule",
Value: strconv.FormatBool(true),
Expand Down

0 comments on commit 60ce516

Please sign in to comment.