Skip to content

Commit

Permalink
Merge pull request #260 from weaveworks/lili/disable-cri-endpoint
Browse files Browse the repository at this point in the history
bootstrap: Disable cri-endpoint flag
  • Loading branch information
lilic authored Aug 24, 2018
2 parents fdb1317 + f2995f0 commit 59a4fcc
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ import (
)

const (
agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml" +
"{{if .CRIEndpoint}}" +
"?cri-endpoint={{.CRIEndpoint}}" +
"{{end}}"
agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml"
)

type options struct {
Expand All @@ -39,7 +36,6 @@ type options struct {
GKE bool `long:"gke" description:"Create clusterrolebinding for GKE instances"`
ReportErrors bool `long:"report-errors" description:"Should install errors be reported to sentry"`
SkipChecks bool `long:"skip-checks" description:"Skip pre-flight checks"`
CRIEndpoint string `long:"cri-endpoint" description:"Set custom CRI container runtime endpoint. e.g.: 'unix:///var/run/crio/crio.sock'"`
}

func init() {
Expand Down Expand Up @@ -76,18 +72,6 @@ func mainImpl() {
exitWithCapture(opts, "Could not find kubectl in PATH, please install it: https://kubernetes.io/docs/tasks/tools/install-kubectl/\n")
}

// If the user has not passed the container runtime endpoint
// we try our best to guess and log it.
if opts.CRIEndpoint == "" {
opts.CRIEndpoint, err = matchContainerRuntimeEndpoint(kubectlClient)
if err != nil {
log.Fatal("error detecting container runtime endpoint: ", err)
}
if opts.CRIEndpoint != "" {
fmt.Printf("Detected container runtime endpoint: %s. To override the container runtime endpoint set the '--cri-endpoint=<ENDPOINT>' flag.\n", opts.CRIEndpoint)
}
}

agentK8sURL, err := text.ResolveString(agentK8sURLTemplate, opts)
if err != nil {
log.Fatal("invalid URL template:", err)
Expand Down

0 comments on commit 59a4fcc

Please sign in to comment.