-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix url parse #11470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix url parse #11470
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,7 @@ import ( | |||||||||
| "encoding/json" | ||||||||||
| "fmt" | ||||||||||
| "io" | ||||||||||
| "net" | ||||||||||
| "os" | ||||||||||
| "runtime" | ||||||||||
| "strconv" | ||||||||||
|
|
@@ -478,7 +479,7 @@ kind: Config | |||||||||
| clusters: | ||||||||||
| - name: local | ||||||||||
| cluster: | ||||||||||
| server: __KUBERNETES_SERVICE_PROTOCOL__://[__KUBERNETES_SERVICE_HOST__]:__KUBERNETES_SERVICE_PORT__ | ||||||||||
| server: __KUBERNETES_SERVICE_PROTOCOL__://__KUBERNETES_HOST_PORT__ | ||||||||||
| __TLS_CFG__ | ||||||||||
| users: | ||||||||||
| - name: calico | ||||||||||
|
|
@@ -502,8 +503,7 @@ current-context: calico-context` | |||||||||
| } | ||||||||||
| data = strings.Replace(data, "TOKEN", tu.Token, 1) | ||||||||||
| data = strings.ReplaceAll(data, "__KUBERNETES_SERVICE_PROTOCOL__", getEnv("KUBERNETES_SERVICE_PROTOCOL", "https")) | ||||||||||
| data = strings.ReplaceAll(data, "__KUBERNETES_SERVICE_HOST__", getEnv("KUBERNETES_SERVICE_HOST", "")) | ||||||||||
| data = strings.ReplaceAll(data, "__KUBERNETES_SERVICE_PORT__", getEnv("KUBERNETES_SERVICE_PORT", "")) | ||||||||||
| data = strings.ReplaceAll(data, "__KUBERNETES_HOST_PORT__", net.JoinHostPort(getEnv("KUBERNETES_SERVICE_HOST", ""), getEnv("KUBERNETES_SERVICE_PORT", ""))) | ||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think we need to leave the existing replace statements - some users provide their own CNI configuration templates and may be relying on this replacement. Just because they aren't used by the default config template doesn't mean they might not be used elsewhere. Let's also call it |
||||||||||
|
|
||||||||||
| skipTLSVerify := os.Getenv("SKIP_TLS_VERIFY") | ||||||||||
| if skipTLSVerify == "true" { | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.