Don't redeclare Kubernetes host address

This commit is contained in:
James Munnelly
2015-09-07 23:04:00 +01:00
parent ef62a509cd
commit 399ee5f44e
2 changed files with 3 additions and 3 deletions
+2 -3
View File
@@ -7,16 +7,15 @@ import (
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
) )
const kubernetesHost = "http://10.20.40.254:8080/"
type Job struct { type Job struct {
Host string
Pod *api.Pod Pod *api.Pod
} }
func (t Job) kubernetesClient() (*client.Client, error) { func (t Job) kubernetesClient() (*client.Client, error) {
client, err := client.New( client, err := client.New(
&client.Config{ &client.Config{
Host: kubernetesHost, Host: t.Host,
Version: "v1", Version: "v1",
}) })
+1
View File
@@ -26,6 +26,7 @@ func main() {
job := job.Job{ job := job.Job{
Host: kubernetesHost,
Pod: Pod:
&api.Pod{ &api.Pod{
TypeMeta: api.TypeMeta{ TypeMeta: api.TypeMeta{