Skip to content

Commit

Permalink
report both old and new styles of OS information
Browse files Browse the repository at this point in the history
  • Loading branch information
allxiao committed Mar 8, 2023
1 parent 7a1ac4d commit 53df87a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/provider/vk_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package provider
import (
"context"
"os"
"strings"

"github.com/virtual-kubelet/virtual-kubelet/trace"
v1 "k8s.io/api/core/v1"
Expand All @@ -26,6 +27,11 @@ func (p *ACIProvider) ConfigureNode(ctx context.Context, node *v1.Node) {
node.ObjectMeta.Labels["alpha.service-controller.kubernetes.io/exclude-balancer"] = "true"
node.ObjectMeta.Labels["node.kubernetes.io/exclude-from-external-load-balancers"] = "true"

// report both old and new styles of OS information
os := strings.ToLower(p.operatingSystem)
node.ObjectMeta.Labels["beta.kubernetes.io/os"] = os
node.ObjectMeta.Labels["kubernetes.io/os"] = os

// Virtual node would be skipped for cloud provider operations (e.g. CP should not add route).
node.ObjectMeta.Labels["kubernetes.azure.com/managed"] = "false"
}
Expand Down

0 comments on commit 53df87a

Please sign in to comment.