Skip to content

Commit

Permalink
make remote optional in preparation to deprecate it. set remote to lo…
Browse files Browse the repository at this point in the history
…cal until then
  • Loading branch information
eveld committed Oct 9, 2023
1 parent d01d131 commit 10444fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/config/resources/container/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (c *Provider) internalCreate(sidecar bool) error {
for _, p := range c.config.Ports {
new.Ports = append(new.Ports, types.Port{
Local: p.Local,
Remote: p.Remote,
Remote: p.Local,
Host: p.Host,
Protocol: p.Protocol,
OpenInBrowser: p.OpenInBrowser,
Expand Down Expand Up @@ -244,7 +244,7 @@ func (c *Provider) internalCreate(sidecar bool) error {
for i, net := range c.config.Networks {
if net.ID == n.ID {
// remove the netmask
ip,_,_ := strings.Cut(n.IPAddress, "/")
ip, _, _ := strings.Cut(n.IPAddress, "/")

// set the assigned address and name
c.config.Networks[i].AssignedAddress = ip
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/resources/container/resource_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package container
// Port is a port mapping
type Port struct {
Local string `hcl:"local" json:"local"` // Local port in the container
Remote string `hcl:"remote" json:"remote"` // Remote port of the service
Remote string `hcl:"remote,optional" json:"remote"` // Remote port of the service
Host string `hcl:"host,optional" json:"host,omitempty"` // Host port
Protocol string `hcl:"protocol,optional" json:"protocol,omitempty"` // Protocol tcp, udp
OpenInBrowser string `hcl:"open_in_browser,optional" json:"open_in_browser" mapstructure:"open_in_browser"` // When a host port is defined open this port with the given path in a browser
Expand Down

0 comments on commit 10444fe

Please sign in to comment.