Skip to content

Commit b1352d3

Browse files
committed
fix(pgw): add v2 prep doc
1 parent e1c6523 commit b1352d3

File tree

1 file changed

+50
-12
lines changed

1 file changed

+50
-12
lines changed

network/public-gateways/reference-content/understanding-v2.mdx

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This document explains what to expect and how to prepare for the upcoming change
1919

2020
## Background: DHCP and IPAM
2121

22-
When Public Gateways were originally introduced, they provided DHCP functionality for resources on attached Private Networks. With the [arrival of Scaleway VPC](/network/vpc/reference-content/vpc-migration/), DHCP was moved from Public Gateways to Private Networks themselves.
22+
When Scaleway originally introduced Public Gateways, they provided DHCP functionality for resources on attached Private Networks. With the [arrival of Scaleway VPC](/network/vpc/reference-content/vpc-migration/), DHCP was moved from Public Gateways to Private Networks themselves.
2323

2424
Scaleway also introduced [IPAM](/network/ipam/concepts/#ipam) to act as a single source of truth for the IP addressing of all Scaleway resources. DHCP uses IPAM to ensure consistent and reliable addressing across all Private Networks.
2525

@@ -31,33 +31,71 @@ Whether you choose a custom or default CIDR block, automatic address assignment
3131

3232
Since the assignment and management of IP addresses on Private Networks is now managed by IPAM and the Private Networks themselves, we must complete the removal of the DHCP functionality from Public Gateways. This means releasing a new version (v2) of the [Public Gateways API](https://www.scaleway.com/en/developers/api/public-gateway/), which has until now retained a number of legacy DHCP functions. From this new version, you can expect:
3333

34+
- IPAM mode becomes default
3435
- Deprecation of the DHCP object
35-
- IPAM mode becoming default
36+
- Deprecation of the `address` field
3637
- Deprecation of DHCP entries
3738

3839
Read on to find out more.
3940

41+
### IPAM mode becomes default
42+
43+
Scaleway Public Gateways are either in **Legacy mode** or **IPAM mode**. You can see the mode of a given gateway by:
44+
45+
- Checking its badge in the gateway listing page of the [Scaleway console](https://console.scaleway.com/public-gateway/public-gateways)
46+
- Checking the value of the `is_legacy` field via the [Public Gateways API](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-get-a-public-gateway).
47+
48+
<Message type="tip">
49+
All Public Gateways created via the Scaleway console since 17 October 2023 are necessarily in IPAM mode.
50+
</Message>
51+
52+
Legacy Public Gateways use a [workaround](/network/vpc/reference-content/vpc-migration/#public-gateways-and-vpc) to ensure IPAM compatibility. IPAM-mode Public Gateways are fully integrated with Scaleway's [IPAM](/network/ipam/concepts/#ipam), which manages the coherent assignment of IP addresses to the gateway itself, and resources on attached Private Networks.
53+
54+
Legacy mode will be deprecated going forward. It will no longer be possible to create legacy-mode Public Gateways, all gateways will necessarily be in IPAM mode and the `is_legacy` parameter will be removed.
55+
4056
### Deprecation of the DHCP object
4157

42-
The [DHCP object](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-list-dhcp-configurations) has, until now, allowed users to define a DHCP configuration, which specified how IP addresses should be assigned to devices on attached Private Networks (parameters including the subnet of the DHCP server, entry validity period and more).
58+
The [DHCP object](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-list-dhcp-configurations) has, until now, allowed users to define a DHCP configuration, which specified how the gateway should assign IP addresses to devices on attached Private Networks (parameters including the subnet of the DHCP server, entry validity period and more).
59+
60+
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)) via the API, you can pass a DHCP object, or the ID of an existing DHCP object.
61+
62+
This functionality will be deprecated going forward. It will no longer be possible to create or attach DHCP objects to Gateway Networks. Instead, IPAM configuration, where auto-configuration of `GatewayNetwork` is managed by IPAM, will become default.
63+
64+
### Deprecation of the `address` field
65+
66+
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)) via the API, you can use the `address` field to define a single static IP address to assign to the Public Gateway on that Private Network.
67+
68+
This functionality will be deprecated going forward. Instead, you can pass an `ipam_ip_id` to specify a reserved IP address to use for the Public Gateway on this Private Network, if you wish. Otherwise, IPAM will auto-assign an IP address from the Private Network's CIDR block to the Public Gateway.
69+
70+
### Deprecation of DHCP entries
71+
72+
[DHCP entries](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-entries-list-dhcp-entries) belong to a specified `GatewayNetwork` (Public Gateway / Private Network attachment) and can hold dynamic DHCP leases or static, user-created DHCP reservations. They effectively allow the Public Gateway to assign certain IP addresses to certain resources on the Private Network.
73+
74+
DHCP entries will be deprecated going forward. Instead, you can rely on the default IPAM/DHCP functionality as described [above](#background-dhcp-and-ipam). The default behavior will auto-assign IP addresses to resources on the Private Network from the network's CIDR block, or you can use the IP reservation functionality to specify the IP address(es) to assign to each resource.
4375

44-
When attaching a Public Gateway to a Private Network (creating a [Gateway Network](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateway-networks-attach-a-public-gateway-to-a-private-network)), via the API, you could either:
45-
- Pass a DHCP object
46-
- Pass a static IP address to use
76+
For custom resources, such as VMs hosted on Elastic Metal servers, you can use the IPAM API's [Attach IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-ip-to-custom-resource) method to assign IP addresses on Private Networks. This lets you associate a [reserved IP](https://www.scaleway.com/en/developers/api/ipam/#path-ips-reserve-a-new-ip) address with a resource name and MAC address.
4777

78+
## Deprecation and removal timeline
4879

80+
The Public Gateway v1 API will be deprecated on [TODO-DATE. OR JUST CERTAIN FIELDS/OBJECTS DEPRECATED?]. Deprecation means that the API will still function, but it is slated for removal and we do not recommended that you keep using it.
4981

82+
We will release v2 of the Public Gateway API on [TODO-DATE - SAME DATE?]. During the period that both versions of the API co-exist, you must migrate your resources from v1 to v2.
5083

51-
These objects define a DHCP configuration, i.e. how IP addresses should be assigned to devices on a Private Network attached to a Public Gateway. Definable parameters include the subnet for the DHCP server, the validity period for DHCP entries, whether to use dynamic pooling, and more. A DHCP configuration object has a DHCP ID, which can then be used as part of a call to create or update a Gateway Network. This lets you attach an existing DHCP configuration to a Public Gateway attached to a Private Network. Similarly, you can use a DHCP ID as a query parameter to list Gateway Networks which use this DHCP configuration object.
84+
[TODO - INSERT INFORMATION ON HOW TO MIGRATE]
5285

86+
[TODO - WHAT WILL THIS ALL LOOK LIKE IN THE CONSOLE?
5387

88+
[TODO - DO USERS WHO DON'T USE LEGACY / DHCP OBJECT / DHCP ENTRIES HAVE ANY ACTION TO TAKE?]
5489

90+
After a period of [TODO - HOW LONG] weeks/months, v1 of the API will be removed. Any resources that have not been migrated to v2 by this time [TODO - WHAT WILL HAPPEN TO THEM?]
5591

56-
The NetProdCore will release a new version of the PGW API, deprecating DHCP entries, DHCP object and setting the IPAM mode as the new default mode when creating a PGW.
92+
## Further help and support
5793

58-
We will need a documentation page explaining:
94+
If you have any questions, get in touch with us on the `#public-gateway` channel on the [Scaleway Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/), or [open a support ticket](https://console.scaleway.com/support/tickets/create).
5995

60-
why we will deprecate the old API
61-
what will be the impacts for the customers
62-
how can they migrate to the new API (using some TF examples that DevTools will provide)
96+
The following documentation resources may be useful to you:
6397

98+
- [Public Gateway API Documentation](https://www.scaleway.com/en/developers/api/public-gateway/)
99+
- [Public Gateway Main Documentation](https://www.scaleway.com/en/docs/network/public-gateways/)
100+
- [IPAM API Documentation](https://www.scaleway.com/en/developers/api/ipam/)
101+
- [IPAM Main Documentation](https://www.scaleway.com/en/docs/network/ipam/)

0 commit comments

Comments
 (0)