@@ -24,10 +24,7 @@ import (
24
24
)
25
25
26
26
const (
27
- agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml" +
28
- "{{if .CRIEndpoint}}" +
29
- "?cri-endpoint={{.CRIEndpoint}}" +
30
- "{{end}}"
27
+ agentK8sURLTemplate = "{{.Scheme}}://{{.LauncherHostname}}/k8s/agent.yaml"
31
28
)
32
29
33
30
type options struct {
@@ -39,7 +36,6 @@ type options struct {
39
36
GKE bool `long:"gke" description:"Create clusterrolebinding for GKE instances"`
40
37
ReportErrors bool `long:"report-errors" description:"Should install errors be reported to sentry"`
41
38
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'"`
43
39
}
44
40
45
41
func init () {
@@ -76,18 +72,6 @@ func mainImpl() {
76
72
exitWithCapture (opts , "Could not find kubectl in PATH, please install it: https://kubernetes.io/docs/tasks/tools/install-kubectl/\n " )
77
73
}
78
74
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
-
91
75
agentK8sURL , err := text .ResolveString (agentK8sURLTemplate , opts )
92
76
if err != nil {
93
77
log .Fatal ("invalid URL template:" , err )
0 commit comments