Skip to content

Commit 7d7f60f

Browse files
authored
Merge pull request #73 from RobotSail/RobotSail/issue34
Empty AddrFilters and NoAnnounce
2 parents 45aa401 + 357d674 commit 7d7f60f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

controllers/ipfs_util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func newClusterSecret() (string, error) {
2121
return hex.EncodeToString(buf), nil
2222
}
2323

24+
// newKey Generates a new private key and returns that along with the identity.
2425
func newKey() (ci.PrivKey, peer.ID, error) {
2526
const edDSAKeyLen = 4096
2627
priv, pub, err := ci.GenerateKeyPair(ci.Ed25519, edDSAKeyLen)

controllers/scripts/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ func applyIPFSClusterK8sDefaults(conf *config.Config, storageMax string, peers [
244244
conf.Swarm.RelayClient = rc
245245
conf.Peering.Peers = peers
246246
conf.Experimental.AcceleratedDHTClient = true
247+
// make sure that we're not announcing or filtering any addresses to ensure Kubo daemons can connect via LAN
248+
// issue: https://github.com/ipfs-cluster/ipfs-operator/issues/34
249+
conf.Addresses.NoAnnounce = make([]string, 0)
250+
conf.Swarm.AddrFilters = make([]string, 0)
247251
}
248252

249253
// createTemplateConfig Returns a kubo configuration which contains preconfigured

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go 1.18
44

55
require (
66
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
7-
github.com/ipfs/interface-go-ipfs-core v0.7.0
87
github.com/ipfs/kubo v0.14.0
98
github.com/libp2p/go-libp2p v0.20.3
109
github.com/libp2p/go-libp2p-core v0.16.1
@@ -49,6 +48,7 @@ require (
4948
github.com/ipfs/go-merkledag v0.6.0 // indirect
5049
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
5150
github.com/ipfs/go-verifcid v0.0.1 // indirect
51+
github.com/ipfs/interface-go-ipfs-core v0.7.0 // indirect
5252
github.com/ipld/go-codec-dagpb v1.4.0 // indirect
5353
github.com/ipld/go-ipld-prime v0.17.0 // indirect
5454
github.com/jbenet/goprocess v0.1.4 // indirect

0 commit comments

Comments
 (0)