summaryrefslogtreecommitdiff
path: root/pkg/specgenutil
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-21 18:45:07 +0100
committerGitHub <noreply@github.com>2021-11-21 18:45:07 +0100
commit2f6cdd353f50e6c26b34f0b1bff028e8393d2580 (patch)
tree473c73e16b14752f3c205d4182400a51b902f128 /pkg/specgenutil
parenta6976c9ca8346331001dfade295173ad1482c2f6 (diff)
parentd173ebc067e912a1f0d272fab19fa0b3db4d4c05 (diff)
downloadpodman-2f6cdd353f50e6c26b34f0b1bff028e8393d2580.tar.gz
podman-2f6cdd353f50e6c26b34f0b1bff028e8393d2580.tar.bz2
podman-2f6cdd353f50e6c26b34f0b1bff028e8393d2580.zip
Merge pull request #12305 from colinbendell/add-expose-port-range
Support EXPOSE with port ranges
Diffstat (limited to 'pkg/specgenutil')
-rw-r--r--pkg/specgenutil/specgen.go2
-rw-r--r--pkg/specgenutil/util.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go
index c110b9e97..7a572e730 100644
--- a/pkg/specgenutil/specgen.go
+++ b/pkg/specgenutil/specgen.go
@@ -314,7 +314,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions
s.Pod = podID
}
- expose, err := createExpose(c.Expose)
+ expose, err := CreateExpose(c.Expose)
if err != nil {
return err
}
diff --git a/pkg/specgenutil/util.go b/pkg/specgenutil/util.go
index b47082b7f..534374e71 100644
--- a/pkg/specgenutil/util.go
+++ b/pkg/specgenutil/util.go
@@ -53,11 +53,11 @@ func ParseFilters(filter []string) (map[string][]string, error) {
return filters, nil
}
-// createExpose parses user-provided exposed port definitions and converts them
+// CreateExpose parses user-provided exposed port definitions and converts them
// into SpecGen format.
// TODO: The SpecGen format should really handle ranges more sanely - we could
// be massively inflating what is sent over the wire with a large range.
-func createExpose(expose []string) (map[uint16]string, error) {
+func CreateExpose(expose []string) (map[uint16]string, error) {
toReturn := make(map[uint16]string)
for _, e := range expose {