Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add a Annotations filed in Consul Service Definition #3811

Closed
weiwei04 opened this issue Jan 17, 2018 · 1 comment
Closed

Comments

@weiwei04
Copy link
Contributor

weiwei04 commented Jan 17, 2018

Current service definition is like

{
  "redis": {
    "ID": "redis",
    "Service": "redis",
    "Tags": [],
    "Address": "",
    "Port": 8000
  }
}

How about add a Annotations filed, so user can store some metadata in service definition, and consul needn't to interpret.

{
  "redis": {
    "ID": "redis",
    "Service": "redis",
    "Tags": [],
    "Annotations": {
        "weights": "1"
    },
    "Address": "",
    "Port": 8000
  }
}

In our use case, we use nginx + lua_module to get service instances from consul. We'd like to store the instance's weight into Annotations when register service, so that, the nginx + lua_module can set instance's weight by interpret the Annotations filed.

@slackpad
Copy link
Contributor

Hi @weiwei04 thanks for opening an issue - I'm going to close this in favor of #1107, which we can hopefully address pretty soon. We are planning on adding a limited KV field for services, like we did for nodes via https://www.consul.io/docs/agent/options.html#node_meta, which should hit your use case as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants