Skip to content

Commit 7f4ad2f

Browse files
authored
Merge pull request kubernetes#3898 from danwinship/cloud-node-ips-alpha1
KEP-3705: simplify initial alpha, discuss possible changes to plan
2 parents ece249d + dd4fcdf commit 7f4ad2f

File tree

2 files changed

+72
-7
lines changed

2 files changed

+72
-7
lines changed

keps/sig-network/3705-cloud-node-ips/README.md

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
- [Changes to the <code>provided-node-ip</code> annotation](#changes-to-the--annotation)
1515
- [Changes to cloud providers](#changes-to-cloud-providers)
1616
- [Example of <code>--node-ip</code> possibilities](#example-of--possibilities)
17+
- [UPDATE: Late-breaking change for 1.27...](#update-late-breaking-change-for-127)
1718
- [Test Plan](#test-plan)
1819
- [Prerequisite testing updates](#prerequisite-testing-updates)
1920
- [Unit tests](#unit-tests)
2021
- [Integration tests](#integration-tests)
2122
- [e2e tests](#e2e-tests)
2223
- [Graduation Criteria](#graduation-criteria)
23-
- [Alpha](#alpha)
24+
- [Alpha (1?)](#alpha-1)
25+
- [Alpha 2?](#alpha-2)
2426
- [Beta](#beta)
2527
- [GA](#ga)
2628
- [Deprecation](#deprecation)
@@ -229,12 +231,12 @@ a long time. We should fix this. So:
229231
whether the feature gate is enabled or not, to avoid problems
230232
with rollback and skew).
231233

232-
2. When the `CloudNodeIPs` feature is enabled and `--node-ip` is
234+
2. When the `CloudDualStackNodeIPs` feature is enabled and `--node-ip` is
233235
set, kubelet will set both the legacy annotation and the new
234236
annotation. (It always sets them both to the same value, even if
235237
that's a value that old cloud providers won't understand).
236238

237-
2. When the `CloudNodeIPs` feature is enabled, the cloud provider
239+
2. When the `CloudDualStackNodeIPs` feature is enabled, the cloud provider
238240
will use the new `kubernetes.io/provided-node-ip` annotation _if
239241
the legacy alpha annotation is not set_. (But if both annotations
240242
are set, it will prefer the legacy annotation, so as to handle
@@ -339,6 +341,62 @@ In this case, kubelet would be even more confused in the
339341
`--node-ip ::` case, and some things would likely not work.
340342
By contrast, with `--node-ip IPv6`, the user would get a clear error.
341343

344+
### UPDATE: Late-breaking change for 1.27...
345+
346+
While implementing the above behavior, it became clear that retaining
347+
backward compatibility with old `--node-ip` values means the overall
348+
behavior is idiosyncratic and full of loopholes. For example, given
349+
the initial NodeAddress list:
350+
351+
```yaml
352+
addresses:
353+
- type: InternalIP
354+
address: 10.0.0.1
355+
- type: InternalIP
356+
address: 10.0.0.2
357+
- type: InternalIP
358+
address: fd00::1
359+
- type: InternalIP
360+
address: fd00::2
361+
- type: ExternalIP
362+
address: 192.168.0.1
363+
```
364+
365+
You can request to get a single-stack IPv4 cluster with any of the
366+
three IPv4 IPs as the node IP (`--node-ip 10.0.0.1`, `--node-ip
367+
10.0.0.2`, `--node-ip 192.168.0.1`); a dual-stack IPv4-primary cluster
368+
with any combination of the IPv4 and IPv6 IPs (`--node-ip
369+
10.0.0.2,fd00::2`, etc); a dual-stack IPv6-primary cluster with any
370+
combination of IPs (`--node-ip fd00::1,192.168.0.1`, etc); or an IPv6
371+
single-stack cluster using the _first_ IPv6 IP (`--node-ip IPv6`).
372+
373+
But there is no way to get a single-stack IPv6 cluster using the
374+
second IPv6 IP, because passing `--node-ip fd00::2` results in a
375+
_dual-stack_ cluster, because the current, backward-compatible
376+
semantics of single-valued `--node-ip` values means that the IPv4
377+
`ExternalIP` will be preserved.
378+
379+
There are various ways this might be fixed (assuming we want to fix
380+
it), but we might decide that the best way is something incompatible
381+
with (or redundant with) the proposal above. Given that there is
382+
already an UNRESOLVED section about the behavior of the `"IPv4"` and
383+
`"IPv6"` literals anyway, I have decided to ignore them for the
384+
(first?) alpha release, and implement _only_ the "two specific IPs"
385+
behavior for now (since it is more straightforward, and already
386+
implemented for non-cloud-provider clusters anyway).
387+
388+
Likewise, if we decide that the best way forward is to deprecate
389+
`--node-ip` in favor of a new `--node-ips` option with better
390+
semantics, then we might also have different ideas about the best way
391+
to move forward with changing the annotation name (and semantics), so
392+
I am ignoring the "new annotation" part of the KEP for now as well.
393+
394+
<<[UNRESOLVED]>>
395+
396+
Figure out the plan.
397+
398+
<<[/UNRESOLVED]>>
399+
342400
### Test Plan
343401

344402
<!--
@@ -434,21 +492,28 @@ test job should fail.
434492
435493
### Graduation Criteria
436494
437-
#### Alpha
495+
#### Alpha (1?)
496+
497+
- Dual-stack `--node-ip` handling implemented behind a feature flag
438498
439-
- New `--node-ip` handling and annotation implemented behind a feature flag
440499
- Unit tests updated
441500
442501
- Initial e2e tests completed and enabled? Unless maybe the e2e tests
443502
will take a bunch of development work on either kind or the
444503
cloud-provider CI infrastructure, in which case we might decide to
445504
pass on e2e testing in Alpha?
446505
506+
#### Alpha 2?
507+
508+
- Depending on discussions during the 1.28 cycle there may be another
509+
Alpha release with additional changes, or we may proceed directly to
510+
Beta...
511+
447512
#### Beta
448513
449514
- Positive feedback / no bugs
450515
- At least one release after Alpha
451-
- Decision made about whether `--node-ip IPv4` means 1 IPv4 IP or all IPv4 IPs
516+
- No UNRESOLVED sections in the KEP
452517
- e2e tests definitely completed and enabled if they weren't already in Alpha
453518
- e2e test that new annotation gets cleared on rollback
454519

keps/sig-network/3705-cloud-node-ips/kep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ milestone:
3939
# The following PRR answers are required at alpha release
4040
# List the feature gate name and the components for which it must be enabled
4141
feature-gates:
42-
- name: CloudNodeIPs
42+
- name: CloudDualStackNodeIPs
4343
components:
4444
- kubelet
4545
- cloud-controller-manager

0 commit comments

Comments
 (0)