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

Dualstack Support #202

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
66 changes: 31 additions & 35 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.9.4"
manifest_format = "2.0"
project_hash = "b182086074f51fa1e19e5e1f5eda1fdee8437e80"
project_hash = "b0f09345e310ad334e655211d18cff18f898d622"

[[deps.ANSIColoredPrinters]]
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
Expand All @@ -25,21 +25,21 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.BitFlags]]
git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b"
git-tree-sha1 = "0691e34b3bb8be9307330f88d1a3c3f25466c24d"
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
version = "0.1.8"
version = "0.1.9"

[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "59939d8a997469ee05c4b4944560a820f9ba0d73"
git-tree-sha1 = "bce6804e5e6044c6daab27bb533d1295e4a2e759"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.4"
version = "0.7.6"

[[deps.ConcurrentUtilities]]
deps = ["Serialization", "Sockets"]
git-tree-sha1 = "9c4708e3ed2b799e6124b5673a712dda0b596a9b"
git-tree-sha1 = "ea32b83ca4fefa1768dc84e504cc0a94fb1ab8d1"
uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb"
version = "2.3.1"
version = "2.4.2"

[[deps.Dates]]
deps = ["Printf"]
Expand All @@ -59,9 +59,9 @@ version = "0.1.0"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "CodecZlib", "Dates", "DocStringExtensions", "Downloads", "Git", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "TOML", "Test", "Unicode"]
git-tree-sha1 = "4a40af50e8b24333b9ec6892546d9ca5724228eb"
git-tree-sha1 = "5a1ee886566f2fa9318df1273d8b778b9d42712d"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "1.3.0"
version = "1.7.0"

[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
Expand All @@ -76,9 +76,9 @@ version = "0.1.10"

[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c"
git-tree-sha1 = "1c6317308b9dc757616f0b5cb379db10494443a7"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.5.0+0"
version = "2.6.2+0"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
Expand All @@ -91,31 +91,31 @@ version = "1.3.1"

[[deps.Git_jll]]
deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"]
git-tree-sha1 = "12945451c5d0e2d0dca0724c3a8d6448b46bbdf9"
git-tree-sha1 = "ea372033d09e4552a04fd38361cd019f9003f4f4"
uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb"
version = "2.44.0+1"
version = "2.46.2+0"

[[deps.HTTP]]
deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
git-tree-sha1 = "db864f2d91f68a5912937af80327d288ea1f3aee"
git-tree-sha1 = "d1d712be3164d61d1fb98e7ce9bcbc6cc06b45ed"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "1.10.3"
version = "1.10.8"

[[deps.IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "8b72179abc660bfab5e28472e019392b97d0985c"
git-tree-sha1 = "b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.4"
version = "0.2.5"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JLLWrappers]]
deps = ["Artifacts", "Preferences"]
git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca"
git-tree-sha1 = "be3dc50a92e5a386872a493a10050136d4703f9b"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.5.0"
version = "1.6.1"

[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
Expand Down Expand Up @@ -199,15 +199,15 @@ version = "1.2.0"

[[deps.OpenSSL]]
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
git-tree-sha1 = "af81a32750ebc831ee28bdaaba6e1067decef51e"
git-tree-sha1 = "38cb508d080d21dc1128f7fb04f20387ed4c0af4"
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
version = "1.4.2"
version = "1.4.3"

[[deps.OpenSSL_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "60e3045590bd104a16fefb12836c00c0ef8c7f8c"
git-tree-sha1 = "7493f61f55a6cce7325f197443aa80d32554ba10"
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
version = "3.0.13+0"
version = "3.0.15+1"

[[deps.PCRE2_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -227,9 +227,9 @@ version = "1.9.2"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f"
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.2.0"
version = "1.2.1"

[[deps.Preferences]]
deps = ["TOML"]
Expand Down Expand Up @@ -263,9 +263,9 @@ version = "0.7.0"
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.SimpleBufferStream]]
git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1"
git-tree-sha1 = "f305871d2f381d21527c770d4788c06c097c9bc1"
uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7"
version = "1.1.0"
version = "1.2.0"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
Expand All @@ -291,13 +291,9 @@ deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.TranscodingStreams]]
git-tree-sha1 = "3caa21522e7efac1ba21834a03734c57b4611c7e"
git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
version = "0.10.4"
weakdeps = ["Random", "Test"]

[deps.TranscodingStreams.extensions]
TestExt = ["Test", "Random"]
version = "0.11.3"

[[deps.URIs]]
git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b"
Expand All @@ -313,9 +309,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.YAML]]
deps = ["Base64", "Dates", "Printf", "StringEncodings"]
git-tree-sha1 = "e6330e4b731a6af7959673621e91645eb1356884"
git-tree-sha1 = "dea63ff72079443240fbd013ba006bcbc8a9ac00"
uuid = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
version = "0.4.9"
version = "0.4.12"

[[deps.Zlib_jll]]
deps = ["Libdl"]
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Docs = "e1c13cdf-5c0d-472c-a597-c85aecc67ad6"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "1.3.0"
Documenter = "1.7.0"
94 changes: 94 additions & 0 deletions docs/src/development/proposals/MEP13/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# IPv6 Support

IPv6 support is required to be able to create Kubernetes clusters with either IPv6 single- or dual-stack enabled.
With immanent shortage of IPv4 addresses the need to be able to use IPv6 increased.

Full IPv6 dual-stack Support was added to Kubernetes with v1.23 as stable.

Gardener on the other hand does not yet have full IPv6 dual-stack support. See: [https://github.com/gardener/gardener/issues/7051](https://github.com/gardener/gardener/issues/7051)

metal-stack manages CIDRs and IP addresses with the [go-ipam](https://github.com/metal-stack/go-ipam) library, which gained full IPv6 Support already in 2021 (see [https://metal-stack.io/blog/2021/02/ipv6-part1](https://metal-stack.io/blog/2021/02/ipv6-part1) ).
But this was only the foundation, to get full IPv6 support for all aspects which are managed by metal-stack.io, further work needs to be done.

## General Decisions

### Networks

Currently, metal-stack organizes CIDRs/prefixes into a `network' resource in the metal-api. A network can consist of multiple CIDRs from the same address family. For example, if an operator wants to provide Internet connectivity to provisioned machines, they can start with small network CIDRs. The number of managed network prefixes can then be expanded as needed over time.

With IPv6 we have to choose between two options:

#### Network per Address Family

This means that we allow networks with CIDRs from one address family only, one for IPv4 and one for IPv6.

The machine creation process will not change if the machine only needs to be either IPv4 or IPv6 addressable.
But if on the other side, the machine need to be able to connect to both address families, the machine creation needs to specify two networks, one for IPv4 and one for IPv6.
Also there will be 2 distinct VRF IDs for every network with a different address family.

#### Network with both Address Families

Make a network dual address family capable, that means that you can add multiple cidrs from both address families to one network
Then the machine creation will stay the same for the single stack and dual-stack case, but the ip address allocation from one network must return a pair of ip addresses if the network is dual-stack.
It would also be possible to return by default only the IPv4 ip address when allocate one, but add the possibility to specify the addressfamily. With this the ip address allocation can be called for both addressfamilies if the machine needs to be dual-stack attached. This would not break the existing api, but enables existing extensions to add dual-stack support in a easy way.
To prevent additional checking what addressfamilies are available in this network during a ip allocation call, we could store the addressfamilies in the network.

### Not considered

- isolated clusters

### Examples

Simple case dual-stack cluster with private tenant networks for both address families, internet network from a shared customer address space e.g. 2002:a::/48.

tenant super network:

- 10.0.0.0/12
- 2001::/48

tenant network: was allocated with: metalctl network allocate --partition fra --project bla --name tenant-nw

- name tenant-nw
- 10.214.0.0/22
- 2001:a:/64

machine:

- 10.214.0.1/32: was allocated with: metalctl network ip allocate --network tenant-nw
- 2001:a::1/128: was allocated with: metalctl network ip allocate --network tenant-nw --addressfamily ipv6

firewall:

- 10.214.0.2/32
- 2002:a::1/128

Firewall and Worker Nodes get their own dedicated IPv6 cidr.

Internet Super Network IPv6

- name: internetv6
- 2002:a::/48

Internet Shared Network

- 212.34.85.0/24

tenant super network:

- 10.0.0.0/12
- 2001::/48

internet tenant network:

- name: tenant-internet-v6
- 2002:a:1:/58: metalctl network allocate --network internetv6

machine: no nat for ipv6

- 10.214.0.1/32: was allocated with: metalctl network ip allocate --network tenant-nw
- 2002:a:1:1/128: was allocated with: metalctl network ip allocate --network tenant-internet-v6

firewall:

- 10.214.0.2/32: was allocated with: metalctl network ip allocate --network tenant-nw
- 2002:a:1:2/128: was allocated with: metalctl network ip allocate --network tenant-internet-v6
3 changes: 2 additions & 1 deletion docs/src/development/proposals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Possible states are:
Once a proposal was accepted, an issue should be raised and the implementation should be done in a separate PR.

| Name | Description | State |
| :------------------------ | :--------------------------------------------- | :-------------: |
|:--------------------------|:-----------------------------------------------|:---------------:|
| [MEP-1](MEP1/README.md) | Distributed Control Plane Deployment | `In Discussion` |
| [MEP-2](MEP2/README.md) | Two Factor Authentication | `Aborted` |
| [MEP-3](MEP3/README.md) | Machine Re-Installation to preserve local data | `Completed` |
Expand All @@ -30,4 +30,5 @@ Once a proposal was accepted, an issue should be raised and the implementation s
| [MEP-10](MEP10/README.md) | SONiC Support | `Completed` |
| [MEP-11](MEP11/README.md) | Auditing of metal-stack resources | `Completed` |
| [MEP-12](MEP12/README.md) | Rack Spreading | `Completed` |
| [MEP-13](MEP13/README.md) | IPv6 | `In Discussion` |
| [MEP-14](MEP14/README.md) | Independence from external sources | `In Discussion` |
2 changes: 1 addition & 1 deletion docs/src/installation/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In order to build up your deployment, we recommend to make use of the same Ansib

In order to wrap up deployment dependencies there is a special [deployment base image](https://github.com/metal-stack/metal-deployment-base/pkgs/container/metal-deployment-base) hosted on GitHub that you can use for running the deployment. Using this Docker image eliminates a lot of moving parts in the deployment and should keep the footprints on your system fairly small and maintainable.

This document will from now on assume that you want to use our Ansible deployment roles for setting up metal-stack. We will also use the deployment base image, so you should also have [Docker](https://docs.docker.com/get-docker/) installed. It is in the nature of software deployments to differ from site to site, company to company, user to user. Therefore, we can only describe you the way of how the deployment works for us. It is up to you to tweak the deployment described in this document to your requirements.
This document will from now on assume that you want to use our Ansible deployment roles for setting up metal-stack. We will also use the deployment base image, so you should also have [Docker](https://docs.docker.com/get-started/get-docker/) installed. It is in the nature of software deployments to differ from site to site, company to company, user to user. Therefore, we can only describe you the way of how the deployment works for us. It is up to you to tweak the deployment described in this document to your requirements.

```@contents
Pages = ["deployment.md"]
Expand Down
Loading