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

Container stop event and etcd backend #266

Open
imacks opened this issue Dec 11, 2017 · 1 comment
Open

Container stop event and etcd backend #266

imacks opened this issue Dec 11, 2017 · 1 comment

Comments

@imacks
Copy link

imacks commented Dec 11, 2017

stopped or removed containers are not removed from etcd backend. I had to hack together a bash script to remove all container data everytime, which is terrifying bad practice.

my fork

What I want to do here is to export all the data available from docker-gen to etcd, and keep it in sync. Then I am using confd to watch for changes.

Would it be possible to have a builtin way to export all docker api data to etcd effectively? Specifically, we need to generate a script that makes the necessary modifications to etcd data, such that it conforms to the current docker state (think dsc), and only do so when docker state changes.

@imacks
Copy link
Author

imacks commented Dec 11, 2017

For anyone with similar requirements, here's an updated solution.

Now it only update things that have changed.

Caveats:

  • etcd complains about key not found. It doesn't affect the end result but just isn't pretty.
  • sortObject doesn't work for port...probably need to implement int sort @rse

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

1 participant