@@ -362,10 +362,6 @@ aware routing, but that API is currently in flux. As a result this proposal is
362
362
only suited to same-region multi-cluster services until the topology API
363
363
progresses.
364
364
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
-
369
365
[ Service Topology API] :
370
366
https://kubernetes.io/docs/concepts/services-networking/service-topology/
371
367
@@ -517,6 +513,12 @@ and `spec.exportedAnnotations`. Exporting labels and annotations is optionally
517
513
supported by MCS-API implementations. If supported, annotations or labels must
518
514
not be exported from the `metadata` of the `Service` or `ServiceExport` resources.
519
515
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
+
520
522
Deleting a `ServiceExport` will stop exporting the name-mapped `Service`.
521
523
522
524
# ### Restricting Exports
@@ -590,10 +592,12 @@ const (
590
592
type ServiceImportSpec struct {
591
593
// +listType=atomic
592
594
Ports []ServicePort `json:"ports"`
593
- // +kubebuilder:validation:MaxItems:=1
595
+ // +kubebuilder:validation:MaxItems:=2
594
596
// +optional
595
597
IPs []string `json:"ips,omitempty"`
596
598
// +optional
599
+ IPFamilies []corev1.IPFamily `json:"ipFamilies,omitempty"`
600
+ // +optional
597
601
Type ServiceImportType `json:"type"`
598
602
// +optional
599
603
SessionAffinity corev1.ServiceAffinity `json:"sessionAffinity"`
@@ -655,6 +659,8 @@ metadata:
655
659
spec :
656
660
ips :
657
661
- 42.42.42.42
662
+ ipFamilies :
663
+ - IPv4
658
664
type : " ClusterSetIP"
659
665
ports :
660
666
- name : http
@@ -708,12 +714,16 @@ this cluster.
708
714
709
715
# ### ClusterSetIP
710
716
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.
717
727
718
728
Note : this doc does not discuss `NetworkPolicy`, which cannot currently be used
719
729
to describe a selector based policy that applies to a multi-cluster service.
0 commit comments