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

Extended SkyDNS2 registration #641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hildebrand
Copy link

I've added the (short) docker container ID to the SkyDNS2 registration to allow for multiple containers with the same name and service id.

I faced the issue where, when registering scaled services with the same service name (say; exampleimage) and service id (say: acceptance) would result in only one registration that had been overwritten because of the same service path.

By means of this pull request I've added the container id to the service path to differentiate between these scaled containers and allow the SkyDNS resolving to work correctly. Since SkyDNS uses wildcard resolving (see: https://github.com/skynetservices/skydns#wildcards) this pull request won't change behaviour and all examples still remain valid. It does fix the before mentioned bug however and caters for scaling containers using the same image + service label combination, a pattern commonly see in AWS ECS.

Example:
Before the pull request:
2 images with same name + service id would result in the following single SkyDNS registration:

etcdctl ls /skydns/local/skydns/example-image-8080/acceptance
/skydns/local/skydns/example-image-8080/acceptance

After the pull request change:
2 images with same name + service id would result in the following multiple SkyDNS registrations:

etcdctl ls /skydns/local/skydns/example-image-8080/acceptance
/skydns/local/skydns/example-image-8080/acceptance/106c51e5924b9
/skydns/local/skydns/example-image-8080/acceptance/8ac9281d89f5e

…allow for multiple containers with the same name and service id
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

Successfully merging this pull request may close these issues.

None yet

2 participants