ipfs / ipfs/kubo

Separate identity values from configuration file

Open
#6,262 17 comments 2 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:
go-ipfs version: 0.4.20-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.4

#### Type:
Enhancement

#### Description:
The `Identity` section of the current configuration file should be moved to a separate file.

```json
{
"Identity": {
"PeerID": ,
"PrivKey":
},
...
}
```

The identity section prevents the simple configuration of ipfs nodes in cloud-native environments, i.e Kubernetes. Fundamentally, I want to be able to have an ipfs config.json in Consul/k8s ConfigMap and have all ipfs nodes spun up to use that, injected via an env var and using `ipfs daemon --init` flag to generate a key pair if one doesn't exist within `IPFS_PATH`. Currently, I have to run a k8s init container, which starts up before every ipfs container, to run `ipfs init` and then make the config changes, which are hardcoded in the script because there are no env vars for config values either. See [here](https://github.com/lanzafame/ipfs-cluster-k8s/blob/master/ipfs-cluster-base/cluster-setup-confmap.yaml#L46-L52) and [here](https://github.com/lanzafame/ipfs-cluster-k8s/blob/master/ipfs-cluster-base/cluster-statefulset.yaml#L16-L19) for code of what I just explained.

Related: #744, #783.

[This](https://github.com/ipfs/go-ipfs/issues/744#issuecomment-168354625) obviously didn't happen or it did and the separation never occurred.

@whyrusleeping how should this move forward? To clearly state my agenda, I am not interested in 'where' the identity information goes per se as long as it is no longer in the configuration file.

Happy to make this change myself, I would just need some assistance in finding where to make this change, I am guessing `go-ipfs-config` but I am not sure about the discussion in #744 about keys being stored in the blockstore or #783 mentioning them going in the repo.

/cc @Stebalien

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.