Don't redeclare Kubernetes host address
This commit is contained in:
+2
-3
@@ -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",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user