Skip to content

Commit

Permalink
[controller] force set vtap type is k8s_vm if exist cluster_id
Browse files Browse the repository at this point in the history
  • Loading branch information
SongZhen0704 authored and sharang committed Mar 26, 2024
1 parent 008aec3 commit cfb3560
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -96,7 +96,13 @@ func (e *VTapEvent) generateConfigInfo(c *vtap.VTapCache, clusterID string) *api
ifMacSource := api.IfMacSource(vtapConfig.IfMacSource)
captureSocketType := api.CaptureSocketType(vtapConfig.CaptureSocketType)
vtapID := uint32(c.GetVTapID())
tridentType := common.TridentType(c.GetVTapType())

tridentType := common.TridentType(0)
if clusterID != "" { // if agent report cluster_id, force set tridentType = VTAP_TYPE_POD_VM
tridentType = common.TridentType(VTAP_TYPE_POD_VM)
} else {
tridentType = common.TridentType(c.GetVTapType())
}
podClusterId := uint32(c.GetPodClusterID())
vpcID := uint32(c.GetVPCID())
tapMode := api.TapMode(vtapConfig.TapMode)
Expand Down

0 comments on commit cfb3560

Please sign in to comment.