@@ -77,51 +77,47 @@ tags, and then generate with `hack/update-toc.sh`.
77
77
-->
78
78
79
79
<!-- toc -->
80
- - [ KEP-1645: Multi-Cluster Services API] ( #kep-1645-multi-cluster-services-api )
81
- - [ Release Signoff Checklist] ( #release-signoff-checklist )
82
- - [ Summary] ( #summary )
83
- - [ Motivation] ( #motivation )
84
- - [ Goals] ( #goals )
85
- - [ Non-Goals] ( #non-goals )
86
- - [ Proposal] ( #proposal )
87
- - [ Terminology] ( #terminology )
88
- - [ User Stories (optional)] ( #user-stories-optional )
89
- - [ Different Services Each Deployed to Separate Cluster] ( #different-services-each-deployed-to-separate-cluster )
90
- - [ Single Service Deployed to Multiple Clusters] ( #single-service-deployed-to-multiple-clusters )
91
- - [ Notes/Constraints/Caveats (optional)] ( #notesconstraintscaveats-optional )
92
- - [ Risks and Mitigations] ( #risks-and-mitigations )
93
- - [ Design Details] ( #design-details )
94
- - [ Exporting Services] ( #exporting-services )
95
- - [ Restricting Exports] ( #restricting-exports )
96
- - [ Exported Service Behavior Expectations] ( #exported-service-behavior-expectations )
97
- - [ SuperclusterIP] ( #superclusterip )
98
- - [ DNS] ( #dns )
99
- - [ EndpointSlice] ( #endpointslice )
100
- - [ Endpoint TTL] ( #endpoint-ttl )
101
- - [ Service Types] ( #service-types )
102
- - [ Consumption of EndpointSlice] ( #consumption-of-endpointslice )
103
- - [ Constraints and Conflict Resolution] ( #constraints-and-conflict-resolution )
104
- - [ Global Properties] ( #global-properties )
105
- - [ Service Port] ( #service-port )
106
- - [ IP Family] ( #ip-family )
107
- - [ Component Level Properties] ( #component-level-properties )
108
- - [ Session Affinity] ( #session-affinity )
109
- - [ TopologyKeys] ( #topologykeys )
110
- - [ Publish Not-Ready Addresses] ( #publish-not-ready-addresses )
111
- - [ Test Plan] ( #test-plan )
112
- - [ Graduation Criteria] ( #graduation-criteria )
113
- - [ Alpha -> Beta Graduation] ( #alpha---beta-graduation )
114
- - [ Beta -> GA Graduation] ( #beta---ga-graduation )
115
- - [ Removing a deprecated flag] ( #removing-a-deprecated-flag )
116
- - [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy )
117
- - [ Version Skew Strategy] ( #version-skew-strategy )
118
- - [ Implementation History] ( #implementation-history )
119
- - [ Drawbacks] ( #drawbacks )
120
- - [ Alternatives] ( #alternatives )
121
- - [ ` ObjectReference ` in ` ServiceExport.Spec ` to directly map to a ` Service ` ] ( #objectreference-in-serviceexportspec-to-directly-map-to-a-service )
122
- - [ Export services via label selector] ( #export-services-via-label-selector )
123
- - [ Export via annotation] ( #export-via-annotation )
124
- - [ Infrastructure Needed (optional)] ( #infrastructure-needed-optional )
80
+ - [ Release Signoff Checklist] ( #release-signoff-checklist )
81
+ - [ Summary] ( #summary )
82
+ - [ Motivation] ( #motivation )
83
+ - [ Goals] ( #goals )
84
+ - [ Non-Goals] ( #non-goals )
85
+ - [ Proposal] ( #proposal )
86
+ - [ Terminology] ( #terminology )
87
+ - [ User Stories (optional)] ( #user-stories-optional )
88
+ - [ Different Services Each Deployed to Separate Cluster] ( #different-services-each-deployed-to-separate-cluster )
89
+ - [ Single Service Deployed to Multiple Clusters] ( #single-service-deployed-to-multiple-clusters )
90
+ - [ Notes/Constraints/Caveats (optional)] ( #notesconstraintscaveats-optional )
91
+ - [ Risks and Mitigations] ( #risks-and-mitigations )
92
+ - [ Design Details] ( #design-details )
93
+ - [ Exporting Services] ( #exporting-services )
94
+ - [ Restricting Exports] ( #restricting-exports )
95
+ - [ Exported Service Behavior Expectations] ( #exported-service-behavior-expectations )
96
+ - [ SuperclusterIP] ( #superclusterip )
97
+ - [ DNS] ( #dns )
98
+ - [ EndpointSlice] ( #endpointslice )
99
+ - [ Endpoint TTL] ( #endpoint-ttl )
100
+ - [ Service Types] ( #service-types )
101
+ - [ Consumption of EndpointSlice] ( #consumption-of-endpointslice )
102
+ - [ Constraints and Conflict Resolution] ( #constraints-and-conflict-resolution )
103
+ - [ Global Properties] ( #global-properties )
104
+ - [ Service Port] ( #service-port )
105
+ - [ IP Family] ( #ip-family )
106
+ - [ Component Level Properties] ( #component-level-properties )
107
+ - [ Session Affinity] ( #session-affinity )
108
+ - [ TopologyKeys] ( #topologykeys )
109
+ - [ Publish Not-Ready Addresses] ( #publish-not-ready-addresses )
110
+ - [ Test Plan] ( #test-plan )
111
+ - [ Graduation Criteria] ( #graduation-criteria )
112
+ - [ Upgrade / Downgrade Strategy] ( #upgrade--downgrade-strategy )
113
+ - [ Version Skew Strategy] ( #version-skew-strategy )
114
+ - [ Implementation History] ( #implementation-history )
115
+ - [ Drawbacks] ( #drawbacks )
116
+ - [ Alternatives] ( #alternatives )
117
+ - [ <code >ObjectReference</code > in <code >ServiceExport.Spec</code > to directly map to a Service] ( #-in--to-directly-map-to-a-service )
118
+ - [ Export services via label selector] ( #export-services-via-label-selector )
119
+ - [ Export via annotation] ( #export-via-annotation )
120
+ - [ Infrastructure Needed (optional)] ( #infrastructure-needed-optional )
125
121
<!-- /toc -->
126
122
127
123
## Release Signoff Checklist
@@ -248,7 +244,7 @@ nitty-gritty.
248
244
association.
249
245
- ** mcsd-controller** - A controller that syncs services across clusters and
250
246
makes them available for multi-cluster service discovery (MCSD) and
251
- connectivitiy . There may be multiple implementations, this doc describes
247
+ connectivity . There may be multiple implementations, this doc describes
252
248
expected common behavior.
253
249
254
250
We propose a new CRD called ` ServiceExport ` , used to specify which services
@@ -375,6 +371,10 @@ type ServiceExport struct {
375
371
// ServiceExportStatus contains the current status of an export.
376
372
type ServiceExportStatus struct {
377
373
// +optional
374
+ // +patchStrategy=merge
375
+ // +patchMergeKey=type
376
+ // +listType=map
377
+ // +listMapKey=type
378
378
Conditions []ServiceExportCondition ` json:"conditions,omitempty"`
379
379
}
380
380
@@ -562,26 +562,44 @@ identifier for the cluster.
562
562
// ServiceImport declares that the specified service should be exported to other clusters.
563
563
type ServiceImport struct {
564
564
metav1.TypeMeta `json:",inline"`
565
+ // +optional
565
566
metav1.ObjectMeta `json:"metadata,omitempty"`
566
-
567
+ // +optional
567
568
Spec ServiceImportSpec `json:"spec,omitempty"`
568
569
}
569
570
570
571
// ServiceImportSpec contains the current status of an imported service and the
571
572
// information necessary to consume it
572
573
type ServiceImportSpec struct {
573
- Ports []ServicePort `json:"ports"`
574
+ // +patchStrategy=merge
575
+ // +patchMergeKey=port
576
+ // +listType=map
577
+ // +listMapKey=port
578
+ // +listMapKey=protocol
579
+ Ports []ServicePort `json:"ports"`
580
+ // +optional
581
+ // +patchStrategy=merge
582
+ // +patchMergeKey=cluster
583
+ // +listType=map
584
+ // +listMapKey=cluster
574
585
Clusters []ClusterSpec `json:"clusters"`
586
+ // +optional
575
587
IPFamily corev1.IPFamily `json:"ipFamily"`
588
+ // +optional
576
589
IP string `json:"ip,omitempty"`
577
590
}
578
591
579
592
// ClusterSpec contains service configuration mapped to a specific cluster
580
593
type ClusterSpec struct {
581
594
Cluster string `json:"cluster"`
595
+ // +optional
596
+ // +listType=set
582
597
TopologyKeys []string `json:"topologyKeys"`
598
+ // +optional
583
599
PublishNotReadyAddresses bool `json:"publishNotReadyAddresses"`
600
+ // +optional
584
601
SessionAffinity corev1.ServiceAffinity `json:"sessionAffinity"`
602
+ // +optional
585
603
SessionAffinityConfig *corev1.SessionAffinityConfig `json:"sessionAffinityConfig"`
586
604
}
587
605
```
@@ -845,7 +863,7 @@ not need to be as detailed as the proposal, but should include enough
845
863
information to express the idea and why it was not acceptable.
846
864
-->
847
865
848
- # ## `ObjectReference` in `ServiceExport.Spec` to directly map to a ` Service`
866
+ # ## `ObjectReference` in `ServiceExport.Spec` to directly map to a Service
849
867
850
868
Instead of name mapping, we could use an explicit `ObjectReference` in a
851
869
` ServiceExport.Spec` . This feels familiar and more explicit, but fundamentally
@@ -862,8 +880,6 @@ The above issues could also be solved via controller logic, but we would risk
862
880
differing implementations. Name mapping enforces behavior at the API.
863
881
864
882
# ## Export services via label selector
865
- ```
866
- <<[ UNRESOLVED still being explored as viable - @thockin @mangelajo ] >>
867
883
868
884
Instead of name mapping, `ServiceExport` could have a
869
885
` ServiceExport.Spec.ServiceSelector` to select matching services for export.
@@ -885,9 +901,6 @@ selector - perhaps by introducing something like a `ServiceExportPolicy`
885
901
resource (out of scope for this KEP). This would solve the above issues but
886
902
retain the flexibility of selectors.
887
903
888
- <<[ /UNRESOLVED] >>
889
- ```
890
-
891
904
# ## Export via annotation
892
905
893
906
` ServiceExport` as described has no spec and seems like it could just be
0 commit comments