Skip to content

Commit 59a4fcc

Browse files
authored
Merge pull request #260 from weaveworks/lili/disable-cri-endpoint
bootstrap: Disable cri-endpoint flag
2 parents fdb1317 + f2995f0 commit 59a4fcc

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

bootstrap/main.go

+1-17
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ import (
2424
)
2525

2626
const (
27-
agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml" +
28-
"{{if .CRIEndpoint}}" +
29-
"?cri-endpoint={{.CRIEndpoint}}" +
30-
"{{end}}"
27+
agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml"
3128
)
3229

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

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

79-
// If the user has not passed the container runtime endpoint
80-
// we try our best to guess and log it.
81-
if opts.CRIEndpoint == "" {
82-
opts.CRIEndpoint, err = matchContainerRuntimeEndpoint(kubectlClient)
83-
if err != nil {
84-
log.Fatal("error detecting container runtime endpoint: ", err)
85-
}
86-
if opts.CRIEndpoint != "" {
87-
fmt.Printf("Detected container runtime endpoint: %s. To override the container runtime endpoint set the '--cri-endpoint=<ENDPOINT>' flag.\n", opts.CRIEndpoint)
88-
}
89-
}
90-
9175
agentK8sURL, err := text.ResolveString(agentK8sURLTemplate, opts)
9276
if err != nil {
9377
log.Fatal("invalid URL template:", err)

0 commit comments

Comments
 (0)