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

Skip setting node IP annotation if CALICO_NETWORKING_BACKEND=none #7550

Merged
merged 1 commit into from
May 8, 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
9 changes: 7 additions & 2 deletions node/pkg/lifecycle/startup/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,9 @@ func Run() {
}
}

configureAndCheckIPAddressSubnets(ctx, cli, node, k8sNode)

// If Calico is running in policy only mode we don't need to write BGP related details to the Node.
if os.Getenv("CALICO_NETWORKING_BACKEND") != "none" {
configureAndCheckIPAddressSubnets(ctx, cli, node, k8sNode)
// Configure the node AS number.
configureASNumber(node)
}
Expand Down Expand Up @@ -310,6 +309,12 @@ func configureAndCheckIPAddressSubnets(ctx context.Context, cli client.Interface
}

func MonitorIPAddressSubnets() {
// If Calico is running in policy only mode we don't need to write BGP
// related details to the Node.
if os.Getenv("CALICO_NETWORKING_BACKEND") == "none" {
log.Info("Skipped monitoring node IP changes when CALICO_NETWORKING_BACKEND=none")
return
}
ctx := context.Background()
_, cli := calicoclient.CreateClient()
nodeName := utils.DetermineNodeName()
Expand Down