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

[proposal] add an API POST /daemon/update to update metadata of Pouch Daemon #983

Closed
allencloud opened this issue Mar 28, 2018 · 0 comments · Fixed by #987
Closed

[proposal] add an API POST /daemon/update to update metadata of Pouch Daemon #983

allencloud opened this issue Mar 28, 2018 · 0 comments · Fixed by #987

Comments

@allencloud
Copy link
Collaborator

allencloud commented Mar 28, 2018

Ⅰ. Issue Description

We are meeting such a case:

Scheduling system need to update Pouch daemon's metadata to update the role of a node.
We usually use label to identify the role or feature of a node, such as storage=ssd, zone=shanghai and so on. However, sometimes situation happens on node, for example: one node's disk breaks, user needs to isolated some suspicious nodes and so on.

So how to make others know this information? Others usually fetches labels of a Pouch daemon to get what their exact role. And when role change, we need to provide an API to make administrators to set new role of daemon via labels.

URL: POST /update or POST /daemon/update

Request Body: currently we only support labels and proxy update

type DaemonUpdateConfig stuct
{
    Labels []string
    ImageProxy string
}

Response: status code 200, 400, 500

ImageProxy in DaemonUpdateConfig would overwrite the original one.

Labels in DaemonUpdateConfig would update original labels in daemon. And if the label has never been in the original ones, it will be added in config. If the label has a key with an already existent key in original ones, it will overwrite the original one. If it has already been in daemon, new label in update config will be ignored.

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

Successfully merging a pull request may close this issue.

2 participants