Skip to content

Commit 5061d51

Browse files
authored
Merge pull request kubernetes#1931 from JeremyOT/clusterset
MCS-API: Rename supercluster -> clusterset
2 parents 4bcce78 + 1167e88 commit 5061d51

File tree

1 file changed

+56
-51
lines changed
  • keps/sig-multicluster/1645-multi-cluster-services-api

1 file changed

+56
-51
lines changed

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

Lines changed: 56 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ tags, and then generate with `hack/update-toc.sh`.
9393
- [Exporting Services](#exporting-services)
9494
- [Restricting Exports](#restricting-exports)
9595
- [Importing Services](#importing-services)
96-
- [Supercluster Service Behavior Expectations](#supercluster-service-behavior-expectations)
96+
- [ClusterSet Service Behavior Expectations](#clusterset-service-behavior-expectations)
9797
- [Service Types](#service-types)
98-
- [SuperclusterIP](#superclusterip)
98+
- [ClusterSetIP](#clustersetip)
9999
- [DNS](#dns)
100100
- [EndpointSlice](#endpointslice)
101101
- [Endpoint TTL](#endpoint-ttl)
@@ -236,14 +236,14 @@ nitty-gritty.
236236
-->
237237
#### Terminology
238238

239-
- **supercluster** - A placeholder name for a group of clusters with a high
239+
- **clusterset** - A placeholder name for a group of clusters with a high
240240
degree of mutual trust and shared ownership that share services amongst
241-
themselves. Membership in a supercluster is symmetric and transitive. The set
241+
themselves. Membership in a clusterset is symmetric and transitive. The set
242242
of member clusters are mutually aware, and agree about their collective
243-
association. Within a supercluster, [namespace sameness] applies and all
243+
association. Within a clusterset, [namespace sameness] applies and all
244244
namespaces with a given name are considered to be the same namespace.
245245
Implementations of this API are responsible for defining and tracking
246-
membership in a supercluster. The specific mechanism is out of scope of this
246+
membership in a clusterset. The specific mechanism is out of scope of this
247247
proposal.
248248
- **mcs-controller** - A controller that syncs services across clusters and
249249
makes them available for multi-cluster service discovery and connectivity.
@@ -255,27 +255,27 @@ nitty-gritty.
255255
- **cluster name** - A unique name or identifier for the cluster, scoped to the
256256
implementation's cluster registry. We do not attempt to define the registry.
257257
Each cluster must have a name that can uniquely identify it within the
258-
supercluster. A cluster name must be a valid [RFC
258+
clusterset. A cluster name must be a valid [RFC
259259
1123](https://tools.ietf.org/html/rfc1123) DNS label.
260260

261261
The cluster name should be consistent for the life of a cluster and its
262-
membership in the supercluster. Implementations should treat name mutation as
262+
membership in the clusterset. Implementations should treat name mutation as
263263
a delete of the membership followed by recreation with the new name.
264264

265265
[namespace sameness]: https://github.com/kubernetes/community/blob/master/sig-multicluster/namespace-sameness-position-statement.md
266266

267267
We propose a new CRD called `ServiceExport`, used to specify which services
268-
should be exposed across all clusters in the supercluster. `ServiceExports` must
268+
should be exposed across all clusters in the clusterset. `ServiceExports` must
269269
be created in each cluster that the underlying `Service` resides in. Creation of
270270
a `ServiceExport` in a cluster will signify that the `Service` with the same
271271
name and namespace as the export should be visible to other clusters in the
272-
supercluster.
272+
clusterset.
273273

274274
Another CRD called `ServiceImport` will be introduced to act as the in-cluster
275275
representation of a multi-cluster service in each importing cluster. This is
276276
analogous to the traditional `Service` type in Kubernetes. Importing clusters
277277
will have a corresponding `ServiceImport` for each uniquely named `Service` that
278-
has been exported within the supercluster, referenced by namespaced name.
278+
has been exported within the clusterset, referenced by namespaced name.
279279
`ServiceImport` resources will be managed by the MCS implementation's
280280
mcs-controller.
281281

@@ -366,7 +366,7 @@ proposal will be implemented, this is the place to discuss them.
366366
-->
367367
### Exporting Services
368368

369-
Services will not be visible to other clusters in the supercluster by default.
369+
Services will not be visible to other clusters in the clusterset by default.
370370
They must be explicitly marked for export by the user. This allows users to
371371
decide exactly which services should be visible outside of the local cluster.
372372

@@ -377,7 +377,7 @@ should be automatically exported by default. In that case, a `ServiceExport`
377377
could be automatically created for all `Services`. This tooling will be designed
378378
in a separate doc, and is secondary to the main API proposed here.
379379

380-
To mark a service for export to the supercluster, a user will create a
380+
To mark a service for export to the clusterset, a user will create a
381381
ServiceExport CR:
382382

383383
```golang
@@ -453,21 +453,21 @@ status:
453453
- type: Conflict
454454
status: "True"
455455
lastTransitionTime: "2020-03-30T01:33:55Z"
456-
message: "Conflicting type. Using \"SuperclusterIP\" from oldest service export in \"cluster-1\". 2/5 clusters disagree."
456+
message: "Conflicting type. Using \"ClusterSetIP\" from oldest service export in \"cluster-1\". 2/5 clusters disagree."
457457
```
458458
459459
To export a service, a `ServiceExport` should be created within the cluster and
460460
namespace that the service resides in, name-mapped to the service for export -
461461
that is, they reference the `Service` with the same name as the export. If
462-
multiple clusters within the supercluster have `ServiceExports` with the same
462+
multiple clusters within the clusterset have `ServiceExports` with the same
463463
name and namespace, these will be considered the same service and will be
464-
combined at the supercluster level.
464+
combined at the clusterset level.
465465

466466
_Note: A `Service` without a corresponding `ServiceExport` in its local cluster
467467
will not be exported even if other clusters are exporting a `Service` with the
468468
same namespaced name._
469469

470-
This requires that within a supercluster, a given namespace is governed by a
470+
This requires that within a clusterset, a given namespace is governed by a
471471
single authority across all clusters. It is that authority’s responsibility to
472472
ensure that a name is shared by multiple services within the namespace if and
473473
only if they are instances of the same service.
@@ -489,11 +489,11 @@ unless there is a clear use case.
489489

490490
### Importing Services
491491

492-
To consume a supercluster service, the domain name associated with the
492+
To consume a clusterset service, the domain name associated with the
493493
mutli-cluster service should be used (see [DNS](#dns)). When the mcs-controller
494494
sees a `ServiceExport`, a `ServiceImport` will be introduced in each importing
495495
cluster to represent the imported service. Users are primarily expected to
496-
consume the service via domain name and supercluster VIP, but the
496+
consume the service via domain name and clusterset VIP, but the
497497
`ServiceImport` may be used for imported service discovery via the K8s API and
498498
will be used internally as the source of truth for routing and DNS
499499
configuration.
@@ -518,7 +518,7 @@ the lifecycle of a `ServiceImport`.
518518

519519
For each exported service, one `ServiceExport` will exist in each cluster that
520520
exports the service. The mcs-controller will create and maintain a derived
521-
`ServiceImport` in each cluster within the supercluster so long as the service's
521+
`ServiceImport` in each cluster within the clusterset so long as the service's
522522
namespace exists (see: [constraints and conflict
523523
resolution](#constraints-and-conflict-resolution)). If all `ServiceExport`
524524
instances are deleted, each `ServiceImport` will also be deleted from all
@@ -539,7 +539,7 @@ cluster.
539539
The mcs-controller is responsible for managing imported `EndpointSlice`s.
540540

541541
```golang
542-
// ServiceImport describes a service imported from clusters in a supercluster.
542+
// ServiceImport describes a service imported from clusters in a clusterset.
543543
type ServiceImport struct {
544544
metav1.TypeMeta `json:",inline"`
545545
// +optional
@@ -554,8 +554,8 @@ type ServiceImport struct {
554554
type ServiceImportType string
555555

556556
const (
557-
// SuperclusterIP are only accessible via the Supercluster IP.
558-
SuperclusterIP ServiceImportType = "SuperclusterIP"
557+
// ClusterSetIP are only accessible via the ClusterSet IP.
558+
ClusterSetIP ServiceImportType = "ClusterSetIP"
559559
// Headless services allow backend pods to be addressed directly.
560560
Headless ServiceImportType = "Headless"
561561
)
@@ -626,7 +626,7 @@ metadata:
626626
namespace: my-ns
627627
spec:
628628
ip: 42.42.42.42
629-
type: "SuperclusterIP"
629+
type: "ClusterSetIP"
630630
ports:
631631
- name: http
632632
protocol: TCP
@@ -666,15 +666,15 @@ endpoints:
666666
The `ServiceImport.Spec.IP` (VIP) can be used to access this service from within
667667
this cluster.
668668

669-
### Supercluster Service Behavior Expectations
669+
### ClusterSet Service Behavior Expectations
670670

671671
#### Service Types
672672

673673
- `ClusterIP`: This is the straightforward case most of the proposal assumes.
674674
Each `EndpointSlice` associated with the exported service is combined with
675-
slices from other clusters to make up the supercluster service. They will be
676-
imported to the cluster behind the supercluster IP, with a `ServiceImport` of
677-
type `SuperclusterIP`. [Details](#EndpointSlice)
675+
slices from other clusters to make up the clusterset service. They will be
676+
imported to the cluster behind the clusterset IP, with a `ServiceImport` of
677+
type `ClusterSetIP`. [Details](#EndpointSlice)
678678
- `ClusterIP: none` (Headless): Headless services are supported and will be
679679
imported with a `ServiceImport` and `EndpointSlices` like any other
680680
`ClusterIP` service, but do not configure a VIP and must be consumed via
@@ -684,15 +684,15 @@ this cluster.
684684
policy](#constraints-and-conflict-resolution).
685685

686686
_Exporting a non-headless service to an otherwise headless service can
687-
dynamically change the supercluster service type when an old export is
687+
dynamically change the clusterset service type when an old export is
688688
removed, potentially breaking existing consumers. This is likely the result of
689689
a deployment error. Conditions and events on the `ServiceExport` will be used
690690
to communicate conflicts to the user._
691691
- `NodePort` and `LoadBalancer`: These create `ClusterIP` services that would
692692
sync as expected. For example If you export a `NodePort` service, the
693-
resulting cross-cluster service will still be a supercluster IP type. The
693+
resulting cross-cluster service will still be a clusterset IP type. The
694694
local service will not be affected. Node ports can still be used to access the
695-
cluster-local service in the source cluster, and only the supercluster IP will
695+
cluster-local service in the source cluster, and only the clusterset IP will
696696
route to endpoints in remote clusters.
697697
- `ExternalName`: It doesn't make sense to export an `ExternalName` service.
698698
They can't be merged with other exports, and it seems like it would only
@@ -701,11 +701,11 @@ this cluster.
701701
cluster individually. If a `ServiceExport` is created for an `ExternalName`
702702
service, an `InvalidService` condition will be set on the export.
703703

704-
#### SuperclusterIP
704+
#### ClusterSetIP
705705

706706
A non-headless `ServiceImport` is expected to have an associated IP address, the
707-
supercluster IP, which may be accessed from within an importing cluster. This IP
708-
may be a single IP used supercluster-wide or assigned on a per-cluster basis,
707+
clusterset IP, which may be accessed from within an importing cluster. This IP
708+
may be a single IP used clusterset-wide or assigned on a per-cluster basis,
709709
but is expected to be consistent for the life of a `ServiceImport` from the
710710
perspective of the importing cluster. Requests to this IP from within a cluster
711711
will route to backends for the aggregated Service.
@@ -727,20 +727,20 @@ https://github.com/kubernetes/dns/blob/master/docs/specification.md
727727
<<[UNRESOLVED]>>
728728
```
729729
When a `ServiceExport` is created, this will cause a domain name for the
730-
multi-cluster service to become accessible from within the supercluster. The
731-
domain name will be `<service>.<ns>.svc.supercluster.local`.
730+
multi-cluster service to become accessible from within the clusterset. The
731+
domain name will be `<service>.<ns>.svc.clusterset.local`.
732732
733-
**SuperclusterIP services:** Requests to this domain name from within an importing
734-
cluster will resolve to the supercluster IP, which points to endpoints for pods
735-
within the underlying `Service`(s) across the supercluster.
733+
**ClusterSetIP services:** Requests to this domain name from within an importing
734+
cluster will resolve to the clusterset IP, which points to endpoints for pods
735+
within the underlying `Service`(s) across the clusterset.
736736
737-
**Headless services:** Within an importing cluster, the supercluster domain name
737+
**Headless services:** Within an importing cluster, the clusterset domain name
738738
will have multiple `A`/`AAAA` records, each containing the address of a ready
739-
endpoint of the headless service. `<service>.<ns>.svc.supercluster.local` will
739+
endpoint of the headless service. `<service>.<ns>.svc.clusterset.local` will
740740
resolve to the set of all ready pod IPs for the service.
741741
742-
Pods backing a supercluster service may be addressed individually using the
743-
`<hostname>.<clustername>.<svc>.<ns>.svc.supercluster.local` format. Necessary
742+
Pods backing a clusterset service may be addressed individually using the
743+
`<hostname>.<clustername>.<svc>.<ns>.svc.clusterset.local` format. Necessary
744744
records will be created based on each ready endpoint's hostname and the
745745
`multicluster.kubernetes.io/source-cluster` label on the `EndpointSlice`. This
746746
allows naming collisions to be avoided for headless services backed by identical
@@ -750,24 +750,24 @@ _Note: the total length of a FQDN is limited to 253 characters. Each label is
750750
independently limited to 63 characters, so users must choose host/cluster/service
751751
names to avoid hitting this upper bound._
752752
753-
All service consumers must use the `*.svc.supercluster.local` name to enable
754-
supercluster routing, even if there is a matching `Service` with the same
753+
All service consumers must use the `*.svc.clusterset.local` name to enable
754+
clusterset routing, even if there is a matching `Service` with the same
755755
namespaced name in the local cluster. This name allows service consumers to
756756
opt-in to multi-cluster behavior. There will be no change to existing behavior
757757
of the `cluster.local` zone.
758758
759-
_It is expected that the `.supercluster.local` zone is standard and available in
759+
_It is expected that the `.clusterset.local` zone is standard and available in
760760
all implementations, but customization and/or alising can be explored if there's
761761
demand._
762762
763763
#### EndpointSlice
764764
765765
When a `ServiceExport` is created, this will cause `EndpointSlice` objects for
766-
the underlying `Service` to be created in each importing cluster within the supercluster,
766+
the underlying `Service` to be created in each importing cluster within the clusterset,
767767
associated with the derived `ServiceImport`. One or more `EndpointSlice`
768768
resources will exist for the exported `Service`, with each `EndpointSlice`
769769
containing only endpoints from a single source cluster. These `EndpointSlice`
770-
objects will be marked as managed by the supercluster service controller, so
770+
objects will be marked as managed by the clusterset service controller, so
771771
that the endpoint slice controller doesn’t delete them. `EndpointSlices` will
772772
have an owner reference to their associated `ServiceImport`.
773773
@@ -814,9 +814,9 @@ The conflict will be resolved by assigning precedence based on each
814814
815815
#### Service Port
816816
817-
A derived service will be accessible with the supercluster IP at the ports
817+
A derived service will be accessible with the clusterset IP at the ports
818818
dictated by child services. If the external properties of service ports for a
819-
set of exported services don’t match, the supercluster service will expose the
819+
set of exported services don’t match, the clusterset service will expose the
820820
union of service ports declared on its constituent services. Should a port name
821821
be used for multiple non-identical (`port`, `protocol`, `appProtocol`) service
822822
ports by different constituent services, the conflict resolution policy will
@@ -978,6 +978,11 @@ enhancement:
978978
979979
## Implementation History
980980
981+
- 2020-02-05 - Initial Proposal
982+
- 2020-05-10 - Merged as provisional
983+
- 2020-06-22 - Moved to implementable
984+
- 2020-08-04 - ClusterSet name finalized
985+
- 2020-08-10 - Alpha implementation available at [sigs.k8s.io/mcs-api](http://sigs.k8s.io/mcs-api)
981986
<!--
982987
Major milestones in the life cycle of a KEP should be tracked in this section.
983988
Major milestones might include
@@ -1046,7 +1051,7 @@ retain the flexibility of selectors.
10461051
`ServiceExport` as described has no spec and seems like it could just be
10471052
replaced with an annotation, e.g. `multicluster.kubernetes.io/export`. When a
10481053
service is found with the annotation, it would be considered marked for export
1049-
to the supercluster. The controller would then create `EndpointSlices` and an
1054+
to the clusterset. The controller would then create `EndpointSlices` and an
10501055
`ServiceImport` in each cluster exactly as described above. Unfortunately,
10511056
`Service` does not have an extensible status and there is no way to represent
10521057
the state of the export on the annotated `Service`. We could extend

0 commit comments

Comments
 (0)