opened
petemounce
username_0
We run a multi-tenant system. It would be really handy to be able to "mount" repositories at particular points within the K/V storage, so that one tenant is isolated from another. We plan to have several repositories within each tenant for logically distinct segments of configuration (eg, application-settings, infra-settings, secrets), to end up with something like

```
/kv
  /environment
    /shared-app1
    /shared-app2
  /tenant1
    /application
      /app1
      /app2
    /infrastructure
    /secrets
```

Driven by git2consul configuration that might look similar to this:
```json
{
  "version": "1.0",
  "repos" : [
    {
      "name" : "shared-app1",
      "mount_path": "tenant1/application"
      "url" : "https://my-settings.com/shared-app1",
      "branches" : ["dev"],
      "hooks": [{
        "type" : "polling",
        "interval" : "1"
      }]
    }
  ]
}
```
"Mount" a repo at a particular point within K/V storage
issue
created
ryanbreen
username_1
Yeah, that's a minimal change, and I could see how helpful it would be as an organizational principle. I'll take a look.
comment
created
petemounce
username_0
Thanks! I hope it was clear in the original text, but on re-reading it I'm not sure - I'd particularly like the ability to mount repos at arbitary depths of the K/V store - at which point g2c would need to recursively create the structure above a particular mount point if it didn't exist.

We're migrating from config files to consul, and so consequently not all of our apps and tenants will move at once. Therefore, as they migrate, we'll have ... gaps ... in the structure until it fills itself in.
comment
created
ryanbreen
username_1
Yep, it was clear.  I'm pretty sure Consul doesn't care about intermediate directories in the KV namespace, so setting an arbitrary depth parent should just work.
comment
created
petemounce
username_0
Ah, wonderful. Thanks :)
comment
created
ryanbreen
username_1
I think GH-26 implements this. I'll push a new build if this looks good.
comment
closed
ryanbreen
username_1
issue
created
ryanbreen
username_1
This has been published as v0.10.0.
comment
created
petemounce
username_0
Thanks!

I saw a tiny thing; your example in the readme starts with a /, but your
test forbids that.

--
Sent from my phone. Please excuse typos and brevity, but never text speak.
comment
created
ryanbreen
username_1
Great catch!  Fixed.
comment