From 1a8c7cfad11a65551e5dbb33d0dfff36b237253a Mon Sep 17 00:00:00 2001 From: Menghua Xiao Date: Mon, 6 Mar 2023 13:58:44 +0800 Subject: [PATCH] report both old and new styles of OS information --- pkg/provider/vk_node.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/provider/vk_node.go b/pkg/provider/vk_node.go index b4b3c43c..907997d4 100644 --- a/pkg/provider/vk_node.go +++ b/pkg/provider/vk_node.go @@ -7,6 +7,7 @@ package provider import ( "context" "os" + "strings" "github.com/virtual-kubelet/virtual-kubelet/trace" v1 "k8s.io/api/core/v1" @@ -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" }