Skip to content

Commit

Permalink
fix: set kubo API port to 5101 (#197)
Browse files Browse the repository at this point in the history
* fix: set kubo API port to 5101

* chore: update tests for kubo API port
  • Loading branch information
dav1do authored Jul 3, 2024
1 parent 0b8f5b4 commit 7b659c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions operator/src/network/ipfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ ipfs config --json Addresses.Gateway '[]'
ipfs config --json PubSub.Enabled true
# Only listen on specific tcp address as nothing else is exposed
ipfs config --json Addresses.Swarm '["/ip4/0.0.0.0/tcp/4101"]'
ipfs config --json Addresses.API '["/ip4/0.0.0.0/tcp/5101"]'
# Set explicit resource manager limits as Kubo computes them based off
# the k8s node resources and not the pods limits.
ipfs config Swarm.ResourceMgr.MaxMemory '400 MB'
Expand Down
2 changes: 1 addition & 1 deletion operator/src/network/testdata/go_ipfs_configmap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Request {
body: {
"apiVersion": "v1",
"data": {
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n"
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\nipfs config --json Addresses.API '[\"/ip4/0.0.0.0/tcp/5101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n"
},
"kind": "ConfigMap",
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion operator/src/network/testdata/go_ipfs_configmap_1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Request {
body: {
"apiVersion": "v1",
"data": {
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n"
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\nipfs config --json Addresses.API '[\"/ip4/0.0.0.0/tcp/5101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n"
},
"kind": "ConfigMap",
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion operator/src/network/testdata/go_ipfs_configmap_commands
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Request {
body: {
"apiVersion": "v1",
"data": {
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n",
"001-config.sh": "#!/bin/sh\nset -ex\n# Do not bootstrap against public nodes\nipfs bootstrap rm all\n# Do not sticky peer with ceramic specific peers\n# We want an isolated network\nipfs config --json Peering.Peers '[]'\n# Disable the gateway\nipfs config --json Addresses.Gateway '[]'\n# Enable pubsub\nipfs config --json PubSub.Enabled true\n# Only listen on specific tcp address as nothing else is exposed\nipfs config --json Addresses.Swarm '[\"/ip4/0.0.0.0/tcp/4101\"]'\nipfs config --json Addresses.API '[\"/ip4/0.0.0.0/tcp/5101\"]'\n# Set explicit resource manager limits as Kubo computes them based off\n# the k8s node resources and not the pods limits.\nipfs config Swarm.ResourceMgr.MaxMemory '400 MB'\nipfs config --json Swarm.ResourceMgr.MaxFileDescriptors 500000\n",
"002-config.sh": "#!/bin/sh\nset -ex\nipfs config Pubsub.SeenMessagesTTL 10m\nipfs config --json Swarm.RelayClient.Enabled false"
},
"kind": "ConfigMap",
Expand Down

0 comments on commit 7b659c0

Please sign in to comment.