Rename Service.ContainerPort to TargetPort in v1b3

Fix all callers and examples.  Part of multi-port service cleanup.
This commit is contained in:
Tim Hockin
2015-03-20 13:50:06 -07:00
parent a8f2cee8c5
commit 4375376e9c
28 changed files with 77 additions and 73 deletions

View File

@@ -27,9 +27,9 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/fsouza/go-dockerclient"
"github.com/google/gofuzz"
"speter.net/go/exp/math/dec/inf"
)
@@ -212,11 +212,11 @@ func FuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer {
},
func(ss *api.ServiceSpec, c fuzz.Continue) {
c.FuzzNoCustom(ss) // fuzz self without calling this function again
switch ss.ContainerPort.Kind {
switch ss.TargetPort.Kind {
case util.IntstrInt:
ss.ContainerPort.IntVal = 1 + ss.ContainerPort.IntVal%65535 // non-zero
ss.TargetPort.IntVal = 1 + ss.TargetPort.IntVal%65535 // non-zero
case util.IntstrString:
ss.ContainerPort.StrVal = "x" + ss.ContainerPort.StrVal // non-empty
ss.TargetPort.StrVal = "x" + ss.TargetPort.StrVal // non-empty
}
},
)