@@ -258,21 +258,21 @@ a `ServiceExport` in a cluster will signify that the `Service` with the same
258
258
name and namespace as the export should be visible to other clusters in the
259
259
supercluster.
260
260
261
- Another CRD called ` ImportedService ` will be introduced to store information
261
+ Another CRD called ` ServiceImport ` will be introduced to store information
262
262
about the services exported from each cluster, e.g. topology. This is analogous
263
263
to the traditional ` Service ` type in Kubernetes. Each cluster will have a
264
- coresponding ` ImportedService ` for each uniquely named ` Service ` that has been
264
+ coresponding ` ServiceImport ` for each uniquely named ` Service ` that has been
265
265
exported within the supercluster, referenced by namespaced name.
266
266
267
267
If multiple clusters export a ` Service ` with the same namespaced name, they will
268
268
be recognized as a single combined service. For example, if 5 clusters export
269
- ` my-svc.my-ns ` , there will be one ` ImportedService ` named ` my-svc ` in the
269
+ ` my-svc.my-ns ` , there will be one ` ServiceImport ` named ` my-svc ` in the
270
270
` my-ns ` namespace and it will be associated with endpoints from all exporting
271
- clusters. Properties of the ` ImportedService ` (e.g. ports, topology) will be
271
+ clusters. Properties of the ` ServiceImport ` (e.g. ports, topology) will be
272
272
derived from a merger of component ` Service ` properties.
273
273
274
274
Existing implementations of Kubernetes Service API (e.g. kube-proxy) can be
275
- extended to present ` ImportedServices ` alongside traditional ` Services ` .
275
+ extended to present ` ServiceImports ` alongside traditional ` Services ` .
276
276
277
277
278
278
### User Stories (optional)
@@ -536,40 +536,40 @@ that cluster’s lease expires.
536
536
537
537
To consume a supercluster service, users will use the domain name associated
538
538
with their `ServiceExport`. When the mcsd-controller sees a `ServiceExport`, a
539
- `ImportedService ` will be introduced, which can be largely ignored by the user.
539
+ `ServiceImport ` will be introduced, which can be largely ignored by the user.
540
540
541
- An `ImportedService ` is a service that may have endpoints in other clusters.
541
+ An `ServiceImport ` is a service that may have endpoints in other clusters.
542
542
This includes 3 scenarios:
543
543
1. This service is running entirely in different cluster(s)
544
544
1. This service has endpoints in other cluster(s) and in this cluster
545
545
1. This service is running entirely in this cluster, but is exported to other cluster(s) as well
546
546
547
547
For each exported service, one `ServiceExport` will exist in each cluster that
548
548
runs the service. The mcsd-controller will create and maintain a derived
549
- `ImportedService ` in each cluster within the supercluster (see: [constraints and
549
+ `ServiceImport ` in each cluster within the supercluster (see: [constraints and
550
550
conflict resolution](#constraints-and-conflict-resolution)). If all `ServiceExport` instances are deleted, each
551
- `ImportedService ` will also be deleted from all clusters.
551
+ `ServiceImport ` will also be deleted from all clusters.
552
552
553
- Since a given `ImportedService ` may be backed by multiple `EndpointSlices`, a
554
- given `EndpointSlice` will reference its `ImportedService ` using the label
553
+ Since a given `ServiceImport ` may be backed by multiple `EndpointSlices`, a
554
+ given `EndpointSlice` will reference its `ServiceImport ` using the label
555
555
`multicluster.kubernetes.io/imported-service-name` similarly to how an
556
556
`EndpointSlice` is associated with its `Service` in a single cluster. Each
557
557
imported `EndpointSlice` will also have a
558
558
`multicluster.kubernetes.io/source-cluster` label with a registry-scoped unique
559
559
identifier for the cluster.
560
560
561
561
```golang
562
- // ImportedService declares that the specified service should be exported to other clusters.
563
- type ImportedService struct {
562
+ // ServiceImport declares that the specified service should be exported to other clusters.
563
+ type ServiceImport struct {
564
564
metav1.TypeMeta `json:",inline"`
565
565
metav1.ObjectMeta `json:"metadata,omitempty"`
566
566
567
- Spec ImportedServiceSpec `json:"spec,omitempty"`
567
+ Spec ServiceImportSpec `json:"spec,omitempty"`
568
568
}
569
569
570
- // ImportedServiceSpec contains the current status of an imported service and the
570
+ // ServiceImportSpec contains the current status of an imported service and the
571
571
// information necessary to consume it
572
- type ImportedServiceSpec struct {
572
+ type ServiceImportSpec struct {
573
573
Ports []ServicePort `json:"ports"`
574
574
Clusters []ClusterSpec `json:"clusters"`
575
575
IPFamily corev1.IPFamily `json:"ipFamily"`
@@ -587,7 +587,7 @@ type ClusterSpec struct {
587
587
```
588
588
``` yaml
589
589
apiVersion : multicluster.k8s.io/v1alpha1
590
- kind : ImportedService
590
+ kind : ServiceImport
591
591
metadata :
592
592
name : my-svc
593
593
namespace : my-ns
@@ -615,7 +615,7 @@ metadata:
615
615
ownerReferences :
616
616
- apiVersion : multicluster.k8s.io/v1alpha1
617
617
controller : false
618
- kind : ImportedService
618
+ kind : ServiceImport
619
619
name : my-svc
620
620
addressType : IPv4
621
621
ports :
@@ -631,7 +631,7 @@ endpoints:
631
631
topology.kubernetes.io/zone : us-west2-a
632
632
` ` `
633
633
634
- The ` ImportedService .Spec.IP` (VIP) can be used to access this service from within this cluster.
634
+ The ` ServiceImport .Spec.IP` (VIP) can be used to access this service from within this cluster.
635
635
636
636
# # Constraints and Conflict Resolution
637
637
@@ -650,7 +650,7 @@ there is no clear way to determine how a service should be accessed. **If any
650
650
global properties have conflicts that can not be resolved, a condition will be
651
651
set on the `ServiceExport` with a description of the conflict. The service will
652
652
not be synced, and an error will be set on the status of each affected
653
- ` ServiceExport` and any previously-derived `ImportedServices ` will be deleted
653
+ ` ServiceExport` and any previously-derived `ServiceImports ` will be deleted
654
654
from each cluster in the supercluster.**
655
655
656
656
@@ -700,7 +700,7 @@ from applying affinity on a per-slice basis so we will carry it forward.
700
700
A `Service`’s `topologyKeys` dictate how endpoints in all `EndpointSlices`
701
701
associated with a given service should be applied to each node. While a single
702
702
` Service` may have multiple `EndpointSlices`, each `EndpointSlice` will only
703
- ever originate from a single `Service`. `ImportedService ` will contain
703
+ ever originate from a single `Service`. `ServiceImport ` will contain
704
704
label-mapped lists of `topologyKeys` synced from each originating exported
705
705
service. Kube-proxy will filter endpoints in each slice based only on the
706
706
` topologyKeys` defined on the slice’s specific source `Service`.
@@ -894,7 +894,7 @@ retain the flexibility of selectors.
894
894
replaced with an annotation, e.g. `multicluster.kubernetes.io/export`. When a
895
895
service is found with the annotation, it would be considered marked for export
896
896
to the supercluster. The controller would then create `EndpointSlices` and an
897
- `ImportedService ` in each cluster exactly as described above. Unfortunately,
897
+ `ServiceImport ` in each cluster exactly as described above. Unfortunately,
898
898
`Service` does not have an extensible status and there is no way to represent
899
899
the state of the export on the annotated `Service`. We could extend
900
900
`Service.Status` to include `Conditions` and provide the flexibility we need,
0 commit comments