Log Warnings When Peering With Mesh Gateway Mode None (#15304)

warn when mesh gateway mode is set to none for peering
This commit is contained in:
Eric Haberkorn 2022-11-09 11:48:58 -05:00 committed by GitHub
parent 418bd62c44
commit c340922991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -292,6 +292,8 @@ func (s *handlerConnectProxy) setupWatchesForPeeredUpstream(
}
snapConnectProxy.WatchedLocalGWEndpoints.InitWatch(gk.String(), nil)
}
} else if mgwMode == structs.MeshGatewayModeNone {
s.logger.Warn(fmt.Sprintf("invalid mesh gateway mode 'none', defaulting to 'remote' for %q", uid))
}
return nil
}