Commit e48a3be6 authored by SataQiu's avatar SataQiu
Browse files

define port 44134 as a constant


Signed-off-by: default avatarSataQiu <qiushida@beyondcent.com>
Showing with 9 additions and 5 deletions
+9 -5
......@@ -36,6 +36,7 @@ import (
"k8s.io/helm/pkg/version"
"k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/tiller/environment"
)
// Install uses Kubernetes client to install Tiller.
......@@ -226,7 +227,7 @@ func generateDeployment(opts *Options) (*v1beta1.Deployment, error) {
Image: opts.SelectImage(),
ImagePullPolicy: opts.pullPolicy(),
Ports: []v1.ContainerPort{
{ContainerPort: 44134, Name: "tiller"},
{ContainerPort: environment.DefaultTillerPort, Name: "tiller"},
{ContainerPort: 44135, Name: "http"},
},
Env: []v1.EnvVar{
......@@ -341,7 +342,7 @@ func generateService(namespace string) *v1.Service {
Ports: []v1.ServicePort{
{
Name: "tiller",
Port: 44134,
Port: environment.DefaultTillerPort,
TargetPort: intstr.FromString("tiller"),
},
},
......
......@@ -74,7 +74,7 @@ const (
)
var (
grpcAddr = flag.String("listen", ":44134", "address:port to listen on")
grpcAddr = flag.String("listen", fmt.Sprintf(":%v", environment.DefaultTillerPort), "address:port to listen on")
probeAddr = flag.String("probe-listen", ":44135", "address:port to listen on for probes")
enableTracing = flag.Bool("trace", false, "enable rpc tracing")
store = flag.String("storage", storageConfigMap, "storage driver to use. One of 'configmap', 'memory', or 'secret'")
......
......@@ -27,6 +27,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/helm/pkg/kube"
"k8s.io/helm/pkg/tiller/environment"
)
var (
......@@ -39,8 +40,7 @@ func New(namespace string, client kubernetes.Interface, config *rest.Config) (*k
if err != nil {
return nil, err
}
const tillerPort = 44134
t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, tillerPort)
t := kube.NewTunnel(client.CoreV1().RESTClient(), config, namespace, podName, environment.DefaultTillerPort)
return t, t.ForwardPort()
}
......
......@@ -41,6 +41,9 @@ const (
// DefaultTillerNamespace is the default namespace for Tiller.
DefaultTillerNamespace = "kube-system"
// DefaultTillerPort defines the default port tiller listen on for client traffic
DefaultTillerPort = 44134
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
GoTplEngine = "gotpl"
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment