Unverified Commit 87369c78 authored by barnettZQG's avatar barnettZQG Committed by GitHub
Browse files

Merge pull request #174 from GLYASAI/V5.0

[FIX] fix bug: push image into registry error: blob upload unknown
parents 1b319583 04ea9bee
Showing with 9 additions and 8 deletions
+9 -8
......@@ -96,7 +96,7 @@ func goodrainMe(cfgPath string, ip string) *model.Server {
{Field: "Host", Value: "$http_host"},
{Field: "X-Real-IP", Value: "$remote_addr"},
{Field: "X-Forwarded-For", Value: "$proxy_add_x_forwarded_for"},
{Field: "X-Forwarded-Proto", Value: "$scheme"},
{Field: "X-Forwarded-Proto", Value: "https"},
},
ProxyReadTimeout: model.Time{
Num: 900,
......@@ -122,24 +122,24 @@ func goodrainMe(cfgPath string, ip string) *model.Server {
func repoGoodrainMe(ip string) *model.Server {
return &model.Server{
Listen: fmt.Sprintf("%s:%d", ip, 80),
Root: "/grdata/services/offline/pkgs/",
Root: "/grdata/services/offline/pkgs/",
ServerName: "repo.goodrain.me",
}
}
func kubeApiserver(ip string) *model.Server {
svr := &model.Server{
Listen: fmt.Sprintf("%s:%d", ip, 6443),
Listen: fmt.Sprintf("%s:%d", ip, 6443),
ProxyPass: "kube_apiserver",
ProxyTimeout: model.Time{
Num: 10,
Num: 10,
Unit: "m",
},
ProxyConnectTimeout: model.Time{
Num: 10,
Num: 10,
Unit: "m",
},
}
return svr
}
\ No newline at end of file
}
......@@ -25,10 +25,11 @@ import (
// BackendName formats the name with weight
func BackendName(name string, ns string) string {
name = fmt.Sprintf("%s_%s", ns , name)
name = fmt.Sprintf("%s_%s", ns, name)
name = strings.Replace(name, ".", "_", -1)
name = strings.Replace(name, "-", "_", -1)
name = strings.Replace(name, ":", "_", -1)
name = strings.Replace(name, "/", "slash", -1)
name = strings.Replace(name, " ", "", -1)
return name
}
\ No newline at end of file
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment