2.77
This commit is contained in:
parent
d53367b5d3
commit
cbb981aad9
|
@ -5,7 +5,7 @@ metadata:
|
|||
namespace: default
|
||||
spec:
|
||||
# Add fields here
|
||||
image: chrislusf/seaweedfs:2.76
|
||||
image: chrislusf/seaweedfs:2.77
|
||||
volumeServerDiskCount: 1
|
||||
hostSuffix: seaweed.abcdefg.com
|
||||
master:
|
||||
|
|
|
@ -16,7 +16,6 @@ func buildFilerStartupScript(m *seaweedv1.Seaweed) string {
|
|||
commands := []string{"weed", "filer"}
|
||||
commands = append(commands, fmt.Sprintf("-port=%d", seaweedv1.FilerHTTPPort))
|
||||
commands = append(commands, fmt.Sprintf("-ip=$(POD_NAME).%s-filer-peer.%s", m.Name, m.Namespace))
|
||||
commands = append(commands, fmt.Sprintf("-peers=%s", getFilerPeersString(m.Name, m.Namespace, m.Spec.Filer.Replicas)))
|
||||
commands = append(commands, fmt.Sprintf("-master=%s", getMasterPeersString(m)))
|
||||
commands = append(commands, "-s3")
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import (
|
|||
|
||||
const (
|
||||
masterPeerAddressPattern = "%s-master-%d.%s-master-peer.%s:9333"
|
||||
filerPeerAddressPattern = "%s-filer-%d.%s-filer-peer.%s:8888"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -50,18 +49,6 @@ func ReconcileResult(err error) (bool, ctrl.Result, error) {
|
|||
return false, ctrl.Result{}, nil
|
||||
}
|
||||
|
||||
func getFilerAddresses(name string, namespace string, replicas int32) []string {
|
||||
peersAddresses := make([]string, 0, replicas)
|
||||
for i := int32(0); i < replicas; i++ {
|
||||
peersAddresses = append(peersAddresses, fmt.Sprintf(filerPeerAddressPattern, name, i, name, namespace))
|
||||
}
|
||||
return peersAddresses
|
||||
}
|
||||
|
||||
func getFilerPeersString(name string, namespace string, replicas int32) string {
|
||||
return strings.Join(getFilerAddresses(name, namespace, replicas), ",")
|
||||
}
|
||||
|
||||
func getMasterAddresses(namespace string, name string, replicas int32) []string {
|
||||
peersAddresses := make([]string, 0, replicas)
|
||||
for i := int32(0); i < replicas; i++ {
|
||||
|
|
|
@ -39,7 +39,7 @@ var _ = Describe("Seaweed Controller", func() {
|
|||
Name: name,
|
||||
},
|
||||
Spec: seaweedv1.SeaweedSpec{
|
||||
Image: "chrislusf/seaweedfs:2.76",
|
||||
Image: "chrislusf/seaweedfs:2.77",
|
||||
VolumeServerDiskCount: 1,
|
||||
Master: &seaweedv1.MasterSpec{
|
||||
Replicas: 3,
|
||||
|
|
Loading…
Reference in New Issue