Skip to content

Commit

Permalink
Merge pull request #7821 from mercedes-benz/tobiasgiese/fix-nilpointe…
Browse files Browse the repository at this point in the history
…r-policyonly

Fix nilpointer if CALICO_NETWORKING_BACKEND=none
  • Loading branch information
marvin-tigera committed Jun 29, 2023
2 parents 8234b36 + 3740b39 commit f47b692
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node/pkg/lifecycle/startup/startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,11 @@ func evaluateENVBool(envVar string, defaultValue bool) bool {
// in the environment, or is a no-op if not specified.
// Returns true if the node object needs to be updated.
func configureASNumber(node *libapi.Node) bool {
// 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" {
return false
}
// Extract the AS number from the environment
asStr := os.Getenv("AS")
if asStr != "" {
Expand Down

0 comments on commit f47b692

Please sign in to comment.