Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
This commit is contained in:
@@ -97,6 +97,12 @@ spec:
|
|||||||
value: {{ $value | quote }}
|
value: {{ $value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.filer.secretExtraEnvironmentVars }}
|
||||||
|
{{- range $key, $value := .Values.filer.secretExtraEnvironmentVars }}
|
||||||
|
- name: {{ $key }}
|
||||||
|
valueFrom: {{ toYaml $value | nindent 16 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- "/bin/sh"
|
- "/bin/sh"
|
||||||
- "-ec"
|
- "-ec"
|
||||||
|
|||||||
@@ -407,6 +407,18 @@ filer:
|
|||||||
# directories under this folder will be automatically creating a separate bucket
|
# directories under this folder will be automatically creating a separate bucket
|
||||||
WEED_FILER_BUCKETS_FOLDER: "/buckets"
|
WEED_FILER_BUCKETS_FOLDER: "/buckets"
|
||||||
|
|
||||||
|
|
||||||
|
# secret env variables
|
||||||
|
secretExtraEnvironmentVars: []
|
||||||
|
# WEED_POSTGRES_USERNAME:
|
||||||
|
# secretKeyRef:
|
||||||
|
# name: postgres-credentials
|
||||||
|
# key: username
|
||||||
|
# WEED_POSTGRES_PASSWORD:
|
||||||
|
# secretKeyRef:
|
||||||
|
# name: postgres-credentials
|
||||||
|
# key: password
|
||||||
|
|
||||||
s3:
|
s3:
|
||||||
enabled: true
|
enabled: true
|
||||||
port: 8333
|
port: 8333
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package stats
|
package stats
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -282,12 +281,21 @@ func LoopPushingMetric(name, instance, addr string, intervalSeconds int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func JoinHostPort(host string, port int) string {
|
||||||
|
portStr := strconv.Itoa(port)
|
||||||
|
if strings.HasPrefix(host, "[") && strings.HasSuffix(host, "]") {
|
||||||
|
return host + ":" + portStr
|
||||||
|
}
|
||||||
|
return net.JoinHostPort(host, portStr)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
func StartMetricsServer(ip string, port int) {
|
func StartMetricsServer(ip string, port int) {
|
||||||
if port == 0 {
|
if port == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
http.Handle("/metrics", promhttp.HandlerFor(Gather, promhttp.HandlerOpts{}))
|
http.Handle("/metrics", promhttp.HandlerFor(Gather, promhttp.HandlerOpts{}))
|
||||||
log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", ip, port), nil))
|
log.Fatal(http.ListenAndServe(JoinHostPort(ip, port), nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
func SourceName(port uint32) string {
|
func SourceName(port uint32) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user