Skip to content

Add a network-scoped mac_address field#435

Merged
glours merged 1 commit intocompose-spec:masterfrom
akerouanton:endpoint-specific-mac-address
Nov 20, 2023
Merged

Add a network-scoped mac_address field#435
glours merged 1 commit intocompose-spec:masterfrom
akerouanton:endpoint-specific-mac-address

Conversation

@akerouanton
Copy link
Contributor

What this PR does / why we need it:

Add a network-scoped mac_address field

Since moby/moby#45905 has been merged (will be part of the upcoming v25 release), it's now possible to specify an endpoint-specific MAC address. Moreover, setting the container-wide MAC address will return a warning.

Deprecate container-wide MAC address

@akerouanton akerouanton changed the title Endpoint specific mac address Add a network-scoped mac_address field Nov 8, 2023
akerouanton added a commit to akerouanton/compose-go that referenced this pull request Nov 20, 2023
@akerouanton akerouanton marked this pull request as ready for review November 20, 2023 09:24
05-services.md Outdated
### mac_address

`mac_address` sets a MAC address for the service container.
_DEPRECATED: use [networks.mac_address](#mac_address)_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't mark it as deprecated if it's not also deprecated on the Docker CLI either

@glours
Copy link
Contributor

glours commented Nov 20, 2023

You also need to update the compose-spec.json according to your changes

@akerouanton akerouanton force-pushed the endpoint-specific-mac-address branch from 87768b6 to 5a74beb Compare November 20, 2023 11:04
akerouanton added a commit to akerouanton/compose-go that referenced this pull request Nov 20, 2023
@akerouanton akerouanton requested a review from glours November 20, 2023 11:21
@glours
Copy link
Contributor

glours commented Nov 20, 2023

@akerouanton I forgot to mention, you need to run make spec to generate the spec.md with the changes you added

@akerouanton akerouanton force-pushed the endpoint-specific-mac-address branch from 5a74beb to e4ad97d Compare November 20, 2023 13:41
@akerouanton
Copy link
Contributor Author

@glours should be good now.

@glours glours force-pushed the endpoint-specific-mac-address branch from e4ad97d to 0b51ba1 Compare November 20, 2023 13:58
Since moby/moby#45905 has been merged (will be
part of the upcoming v25 release), it's now possible to specify an
endpoint-specific MAC address. Moreover, setting the container-wide MAC
address will return a warning.

Signed-off-by: Albin Kerouanton <[email protected]>
@akerouanton akerouanton force-pushed the endpoint-specific-mac-address branch from 0b51ba1 to d1e8613 Compare November 20, 2023 14:06
@glours glours merged commit eb88536 into compose-spec:master Nov 20, 2023
@akerouanton akerouanton deleted the endpoint-specific-mac-address branch November 20, 2023 14:10
akerouanton added a commit to akerouanton/compose-go that referenced this pull request Nov 20, 2023
akerouanton added a commit to akerouanton/compose-go that referenced this pull request Nov 20, 2023
Related to:

- compose-spec/compose-spec#435

Signed-off-by: Albin Kerouanton <[email protected]>
(cherry picked from commit 0282c0c)
Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Nov 20, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Nov 20, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Nov 21, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Nov 21, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Nov 21, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
glours pushed a commit to akerouanton/compose-go that referenced this pull request Nov 21, 2023
Related to:

- compose-spec/compose-spec#435

Signed-off-by: Albin Kerouanton <[email protected]>
(cherry picked from commit 0282c0c)
Signed-off-by: Albin Kerouanton <[email protected]>
glours pushed a commit to compose-spec/compose-go that referenced this pull request Nov 21, 2023
Related to:

- compose-spec/compose-spec#435

Signed-off-by: Albin Kerouanton <[email protected]>
(cherry picked from commit 0282c0c)
Signed-off-by: Albin Kerouanton <[email protected]>
akerouanton added a commit to akerouanton/compose that referenced this pull request Dec 18, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
ndeloof pushed a commit to docker/compose that referenced this pull request Dec 18, 2023
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
temenuzhka-thede pushed a commit to temenuzhka-thede/compose that referenced this pull request Sep 17, 2024
Related to:

- compose-spec/compose-spec#435
- moby/moby#45905

Since API v1.44, Moby supports a per-endpoint MAC address and returns a
warning when the container-wide mac_address field is set.

A corresponding field has been added to compose-spec and compose-go, so
we need to leverage it to set the right API field.

This commit is backward-compatible with compose files that still set the
container-wide mac_address field, and older API versions that don't know
about the endpoint-specific MAC address field.

Signed-off-by: Albin Kerouanton <[email protected]>
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.

3 participants