File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ type HostInfo struct {
3030}
3131
3232type Backend struct {
33+ Path string `json:"path"`
34+ PathType string `json:"path_type"`
3335 ServiceName string `json:"service_name"`
3436 ServicePort string `json:"service_port"`
3537}
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ func GetIngressHostInfo(ing *v1.Ingress) []resource.HostInfo {
6060
6161 for _ , path := range rule .HTTP .Paths {
6262 backend := resource.Backend {
63+ Path : path .Path ,
64+ PathType : string (* path .PathType ),
6365 ServiceName : path .Backend .Service .Name ,
6466 ServicePort : fmt .Sprintf ("%d" , path .Backend .Service .Port .Number ),
6567 }
@@ -85,7 +87,14 @@ func (ing *ingress) HostInfo() []resource.HostInfo {
8587 }
8688
8789 for _ , path := range rule .HTTP .Paths {
90+ pathType := ""
91+ if path .PathType != nil {
92+ pathType = string (* path .PathType )
93+ }
94+
8895 backend := resource.Backend {
96+ Path : path .Path ,
97+ PathType : pathType ,
8998 ServiceName : path .Backend .ServiceName ,
9099 ServicePort : path .Backend .ServicePort .String (),
91100 }
You can’t perform that action at this time.
0 commit comments