Skip to content

Commit 092d90e

Browse files
committed
KEP-1645: define dual stack policies and fields
Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
1 parent a55eefc commit 092d90e

File tree

1 file changed

+21
-11
lines changed
  • keps/sig-multicluster/1645-multi-cluster-services-api

1 file changed

+21
-11
lines changed

keps/sig-multicluster/1645-multi-cluster-services-api/README.md

+21-11
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,6 @@ aware routing, but that API is currently in flux. As a result this proposal is
362362
only suited to same-region multi-cluster services until the topology API
363363
progresses.
364364

365-
As the plan for dual stack support is finalized, the Multi-Cluster Services API
366-
will follow dual stack Service design. Until then, dual stack will not be
367-
supported.
368-
369365
[Service Topology API]:
370366
https://kubernetes.io/docs/concepts/services-networking/service-topology/
371367

@@ -517,6 +513,12 @@ and `spec.exportedAnnotations`. Exporting labels and annotations is optionally
517513
supported by MCS-API implementations. If supported, annotations or labels must
518514
not be exported from the `metadata` of the `Service` or `ServiceExport` resources.
519515

516+
An implementation may use the `ipFamilies` field from the exported Services as
517+
a hint to influence the `IPs` and `ipFamilies` of the ServiceImport object,
518+
the exact mechanism for determining those field is still implementation defined.
519+
Also note that even in a dual stack cluster regular Services are by default SingleStack
520+
([ref](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#dual-stack-options-on-new-services)).
521+
520522
Deleting a `ServiceExport` will stop exporting the name-mapped `Service`.
521523

522524
#### Restricting Exports
@@ -590,10 +592,12 @@ const (
590592
type ServiceImportSpec struct {
591593
// +listType=atomic
592594
Ports []ServicePort `json:"ports"`
593-
// +kubebuilder:validation:MaxItems:=1
595+
// +kubebuilder:validation:MaxItems:=2
594596
// +optional
595597
IPs []string `json:"ips,omitempty"`
596598
// +optional
599+
IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"`
600+
// +optional
597601
Type ServiceImportType `json:"type"`
598602
// +optional
599603
SessionAffinity corev1.ServiceAffinity `json:"sessionAffinity"`
@@ -655,6 +659,8 @@ metadata:
655659
spec:
656660
ips:
657661
- 42.42.42.42
662+
ipFamilies:
663+
- IPv4
658664
type: "ClusterSetIP"
659665
ports:
660666
- name: http
@@ -708,12 +714,16 @@ this cluster.
708714

709715
#### ClusterSetIP
710716

711-
A non-headless `ServiceImport` is expected to have an associated IP address, the
712-
clusterset IP, which may be accessed from within an importing cluster. This IP
713-
may be a single IP used clusterset-wide or assigned on a per-cluster basis, but
714-
is expected to be consistent for the life of a `ServiceImport` from the
715-
perspective of the importing cluster. Requests to this IP from within a cluster
716-
will route to backends for the aggregated Service.
717+
A non-headless `ServiceImport` is expected to have associated IP addresses, the
718+
clusterset IPs, which may be accessed from within an importing cluster. These IPs
719+
may be used clusterset-wide or assigned on a per-cluster basis, but is expected
720+
to be consistent for the life of a `ServiceImport` from the perspective of the
721+
importing cluster. Requests to these IPs from within a cluster will route to
722+
backends for the aggregated Service. The `IPs` field must correspond to the
723+
protocol defined in the `ipFamilies` field if defined. How the `ipFamilies`
724+
field is set is implementation defined, for instance it might correspond to what
725+
IP protocol the local cluster support or globally reconciled like other
726+
ServiceImport fields.
717727

718728
Note: this doc does not discuss `NetworkPolicy`, which cannot currently be used
719729
to describe a selector based policy that applies to a multi-cluster service.

0 commit comments

Comments
 (0)