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

Ensure Traefik service name is consistent #253

Merged
merged 1 commit into from
May 2, 2023
Merged

Ensure Traefik service name is consistent #253

merged 1 commit into from
May 2, 2023

Conversation

kevinmcconnell
Copy link
Collaborator

If we don't specify any service properties when labelling containers, the generated service will be named according to the container. However, we change the container name on every deployment (as it is versioned), which means that the auto-generated service name will be different in each container.

That is a problem for two reasons:

  • Multiple containers share a common router while a deployment is happening. At this point, the router configuration will be different between the containers; Traefik flags this as an error, and stops routing to the containers until it's resolved.
  • We allow custom labels to be set in an app's config. In order to define custom configuration on the service, we'll need to know what it will be called.

Changed to force the service name by setting one of its properties.

If we don't specify any service properties when labelling containers,
the generated service will be named according to the container. However,
we change the container name on every deployment (as it is versioned),
which means that the auto-generated service name will be different in
each container.

That is a problem for two reasons:

- Multiple containers share a common router while a deployment is
  happening. At this point, the router configuration will be different
  between the containers; Traefik flags this as an error, and stops
  routing to the containers until it's resolved.
- We allow custom labels to be set in an app's config. In order to
  define custom configuration on the service, we'll need to know what
  it will be called.

Changed to force the service name by setting one of its properties.
@dhh dhh merged commit 18312f5 into basecamp:main May 2, 2023
@dhh dhh deleted the ensure-consistent-service-name branch May 2, 2023 11:15
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.

2 participants