Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: report both old and new styles of node OS information #479

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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