Installer: Move port forwarding config into the apps
Change-Id: I6d70c8ce72d21ebe74d126a680fa66ba6c3f2857
diff --git a/core/installer/app.go b/core/installer/app.go
index 1bf632c..612f2e5 100644
--- a/core/installer/app.go
+++ b/core/installer/app.go
@@ -95,13 +95,15 @@
}
type PortForward struct {
- Allocator string `json:"allocator"`
- ReserveAddr string `json:"reservator"`
- RemoveAddr string `json:"deallocator"`
- Protocol string `json:"protocol"`
- SourcePort int `json:"sourcePort"`
- TargetService string `json:"targetService"`
- TargetPort int `json:"targetPort"`
+ Allocator string `json:"allocator"`
+ ReserveAddr string `json:"reservator"`
+ RemoveAddr string `json:"deallocator"`
+ Protocol string `json:"protocol"`
+ Port int `json:"port"`
+ Service struct {
+ Name string `json:"name"`
+ Port int `json:"port"`
+ } `json:"service"`
}
type AppType int
@@ -363,7 +365,7 @@
if err := res.LookupPath(cue.ParsePath("namespaces")).Decode(&ret.Namespaces); err != nil {
return rendered{}, err
}
- if err := res.LookupPath(cue.ParsePath("portForward")).Decode(&ret.Ports); err != nil {
+ if err := res.LookupPath(cue.ParsePath("output.openPort")).Decode(&ret.Ports); err != nil {
return rendered{}, err
}
{