Skip to content

expand_keys support for JSON arrays #71

Closed
@juicedM3

Description

@juicedM3

I loaded the sample git2consul configuration file into git.

{
  "version": "1.0",
  "repos" : [{
    "name" : "sample_configuration",
    "url" : "https://github.com/ryanbreen/git2consul_data.git",
    "branches" : ["dev"],
    "hooks": [{
      "type" : "polling",
      "interval" : "1"
    }]
  }]
}

I configured git2consul to monitor this file and the end result in Consul is only version makes it into Consul:

$ curl "consul.service.consul:8500/v1/kv/poc/master/config/git2consul.json/?recurse&pretty&token=$CONSUL_TOKEN"
[
    {
        "LockIndex": 0,
        "Key": "poc/master/config/git2consul.json/version",
        "Flags": 0,
        "Value": "MS4w",
        "CreateIndex": 1297420,
        "ModifyIndex": 1297420
    }
]
{
  "version": "1.0",
  "local_store": "/tmp/git2consul_cache",
  "halt_on_change": true,
  "logger" : {
    "name" : "git2consul",
    "streams" : [
      {
        "level":  "trace",
        "stream": "process.stdout"
      },
      {
        "level": "debug",
        "type": "rotating-file",
        "path": "/tmp/git2consul.log"
      }
    ]
  },
  "repos": [{
    "name": "poc",
    "url":  "ssh://[email protected]/git2consul.git",
    "expand_keys": true,
    "source_root": "config",
    "branches": ["master"],
    "hooks": [{
      "type": "stash",
      "port": "5051",
      "url": "/gitpoke"
    },
    {
      "type": "polling",
      "interval": "1"
    }]
  }]
}

It would be nice if git2consul could handle arrays. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions