Skip to content

Commit b2a44bd

Browse files
fixed app-proxy installer (#183)
* fixed app-proxy installer * bump * wip
1 parent 8e599fd commit b2a44bd

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

venona/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.22
1+
1.4.23

venonactl/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.22
1+
1.4.23

venonactl/pkg/plugins/app-proxy.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ Loop:
5858
if err == nil {
5959
ips := service.Status.LoadBalancer.Ingress
6060
if len(ips) > 0 {
61-
ingressIP = ips[0].IP
61+
if ips[0].IP != "" {
62+
ingressIP = ips[0].IP
63+
} else {
64+
ingressIP = ips[0].Hostname
65+
}
6266
break Loop
6367
}
6468
}
@@ -67,8 +71,12 @@ Loop:
6771
return v, fmt.Errorf("Failed to get app-proxy-service internal ip")
6872
}
6973
}
74+
u.logger.Info(fmt.Sprintf("app proxy has ingress ip: %v\n", ingressIP))
7075
// update IPC
7176
file := os.NewFile(3, "pipe")
77+
if file == nil {
78+
return v, nil
79+
}
7280
data := map[string]interface{}{
7381
"ingressIP": ingressIP,
7482
}
@@ -79,8 +87,7 @@ Loop:
7987
u.logger.Error("Failed to write to stream", err)
8088
return v, fmt.Errorf("Failed to write to stream")
8189
}
82-
u.logger.Info(fmt.Sprintf("%s bytes were written to stream", n))
83-
fmt.Sprintf(" ip : %s", ingressIP)
90+
u.logger.Debug(fmt.Sprintf("%v bytes were written to stream\n", n))
8491
return v, err
8592

8693
}

0 commit comments

Comments
 (0)