Skip to content
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
13 changes: 13 additions & 0 deletions topo/topo.go
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,19 @@ func (m *Manager) topologySpecs(ctx context.Context) ([]*topologyv1.Topology, er
// replace node name with pod name, for peer pod attribute in each link
for nodeName, specs := range nodeSpecs {
for _, spec := range specs {
// Skip Topology CRs with no links: meshnetd's Get RPC
// treats a missing `spec.links` field as an error
// (`could not find 'Link' array in pod's spec`) and the
// CNI plugin then aborts pod sandbox creation with a
// misleading `meshnetd provided no HOST_IP` message.
// For unconnected nodes we simply don't create the CR;
// the meshnet CNI plugin already handles "no Topology
// CR" gracefully and falls through to the next plugin
// in the chain.
if len(spec.Spec.Links) == 0 {
log.V(1).Infof("Skipping empty Topology spec for node %s (no links)", nodeName)
continue
}
for l := range spec.Spec.Links {
link := &spec.Spec.Links[l]
peerSpecs, ok := nodeSpecs[link.PeerPod]
Expand Down
Loading