Skip to content

Commit

Permalink
Ips sync (#21)
Browse files Browse the repository at this point in the history
* feature(main): ips_sync skip

Signed-off-by: cuisongliu <[email protected]>

* feature(main): ips_sync skip

Signed-off-by: cuisongliu <[email protected]>

Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu authored Dec 21, 2022
1 parent e6a5d08 commit 4be5f61
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/apply/infra/mulitipass/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ func (r *MultiPassVirtualMachine) Inspect(name string, role v1.Host, index int)
hostStatus.ImageID, _, _ = unstructured.NestedString(outStruct, "info", hostStatus.ID, "image_hash")
hostStatus.ImageName, _, _ = unstructured.NestedString(outStruct, "info", hostStatus.ID, "release")
hostStatus.IPs, _, _ = unstructured.NestedStringSlice(outStruct, "info", hostStatus.ID, "ipv4")
newIPs := make([]string, 0)
if len(hostStatus.IPs) > 0 {
for _, ip := range hostStatus.IPs {
if strings2.HasPrefix(ip, "172.17") || strings2.HasPrefix(ip, "10.96") {
continue
} else {
newIPs = append(newIPs, ip)
}
}
}
hostStatus.IPs = newIPs
hostStatus.Index = index
mounts, _, _ := unstructured.NestedMap(outStruct, "info", hostStatus.ID, "mounts")
for k := range mounts {
Expand Down

0 comments on commit 4be5f61

Please sign in to comment.