Commit 90db698
committed
refactor(dstack-ingress): let the provider choose the gateway record, as it already did
DELEGATION_GATEWAY_RECORD reimplemented an extension point that was
already there. set_alias_record means "point this name at that target, in
whatever form this provider allows beside a CAA" -- Linode overrides it to
publish an address record, with a docstring saying exactly why: it refuses
a CAA next to a CNAME, which is the conflict delegation runs into.
So there were two mechanisms deciding the same thing: the per-provider
override, and a `case cloudflare) cname ;; *) a ;;` of my own a layer up.
They agreed on Linode by coincidence and would have disagreed on any
provider that added an override later, since the shell branch never
consulted it.
Worse, the previous commit made the `cname` branch call set_cname
specifically to bypass Linode's override -- treating the correct
provider-specific behaviour as the bug.
Delegation now asks for an alias and takes what it gets. Gone with the
switch: the provider-detection action, the set_a action, dnsguide's
--resolve, and the README section explaining which providers get which.
A provider that needs a form other than CNAME overrides set_alias_record,
which is one place to look instead of two.
The cross-type clearing that review found stays, moved to where it
belongs: set_alias_record removes address records before writing a CNAME,
Linode's override removes a CNAME before writing an address record. Every
caller benefits, not just delegation, and the rule sits next to the
knowledge of which form this provider uses.
Route53 is worth a look separately -- it takes the base CNAME path, and
if it also refuses a CAA beside a CNAME it needs the same override Linode
has. Untested either way.1 parent 0a91c91 commit 90db698
6 files changed
Lines changed: 43 additions & 134 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
| |||
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
258 | 240 | | |
259 | 241 | | |
260 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
142 | 123 | | |
143 | 124 | | |
144 | 125 | | |
| |||
148 | 129 | | |
149 | 130 | | |
150 | 131 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 132 | + | |
182 | 133 | | |
183 | 134 | | |
184 | 135 | | |
| |||
Lines changed: 24 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
163 | 180 | | |
164 | 181 | | |
165 | 182 | | |
166 | 183 | | |
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 187 | + | |
174 | 188 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
180 | 192 | | |
181 | | - | |
182 | | - | |
| 193 | + | |
| 194 | + | |
183 | 195 | | |
| 196 | + | |
184 | 197 | | |
185 | 198 | | |
186 | 199 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
295 | 296 | | |
296 | 297 | | |
297 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 494 | | |
501 | 495 | | |
502 | 496 | | |
| |||
506 | 500 | | |
507 | 501 | | |
508 | 502 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
523 | 509 | | |
524 | 510 | | |
525 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 33 | | |
41 | 34 | | |
42 | 35 | | |
| |||
78 | 71 | | |
79 | 72 | | |
80 | 73 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 74 | | |
99 | 75 | | |
100 | 76 | | |
| |||
0 commit comments