Commit 7c4cd86
committed
🐛ec2: instances: fix assigning public IP
In the scenario where the user brings their own VPC, if no subnet ID is
set in the machine spec and PublicIP is true, CAPA will choose one from
the available public subnets. However, if the subnet doesn't have
MapPublicIPOnLaunch == true, the instance will not be assigned a public
IP. As a result, the instance will have no internet access, contrary to
the user's expectation.
This change guarantees an instance will be assigned a public IP even if
the subnet doesn't do it on instance launch. Instead, we set the option
in the instance's network interface.1 parent b62d401 commit 7c4cd86
File tree
8 files changed
+91
-4
lines changed- api
- v1beta1
- v1beta2
- config/crd/bases
- pkg/cloud/services/ec2
8 files changed
+91
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
240 | 244 | | |
241 | 245 | | |
242 | 246 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1135 | 1139 | | |
1136 | 1140 | | |
1137 | 1141 | | |
| |||
2984 | 2988 | | |
2985 | 2989 | | |
2986 | 2990 | | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
2987 | 2995 | | |
2988 | 2996 | | |
2989 | 2997 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1907 | 1907 | | |
1908 | 1908 | | |
1909 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
1910 | 1914 | | |
1911 | 1915 | | |
1912 | 1916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
184 | 199 | | |
185 | 200 | | |
186 | 201 | | |
| |||
538 | 553 | | |
539 | 554 | | |
540 | 555 | | |
| 556 | + | |
541 | 557 | | |
542 | 558 | | |
543 | 559 | | |
544 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
545 | 571 | | |
546 | | - | |
547 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
548 | 575 | | |
549 | 576 | | |
550 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2113 | 2113 | | |
2114 | 2114 | | |
2115 | 2115 | | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
2116 | 2129 | | |
2117 | 2130 | | |
2118 | 2131 | | |
| |||
2361 | 2374 | | |
2362 | 2375 | | |
2363 | 2376 | | |
2364 | | - | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
| 2386 | + | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
2365 | 2390 | | |
2366 | 2391 | | |
2367 | 2392 | | |
| |||
2483 | 2508 | | |
2484 | 2509 | | |
2485 | 2510 | | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
2486 | 2523 | | |
2487 | 2524 | | |
2488 | 2525 | | |
| |||
0 commit comments