Skip to content

Commit 67e1f87

Browse files
committed
KEP 1645: fix ServiceExport conditions example
Add missing reason in the ServiceExport conditions example and adjust the KEP to the reasons defined in the mcs-api repo. Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
1 parent 63d4f6f commit 67e1f87

File tree

1 file changed

+12
-23
lines changed
  • keps/sig-multicluster/1645-multi-cluster-services-api

1 file changed

+12
-23
lines changed

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

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -437,22 +437,8 @@ type ServiceExportStatus struct {
437437
// +listMapKey=type
438438
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
439439
}
440-
441-
const (
442-
// ServiceExportValid means that the service referenced by this
443-
// service export has been recognized as valid by an mcs-controller.
444-
// This will be false if the service is found to be unexportable
445-
// (ExternalName, not found).
446-
ServiceExportValid = "Valid"
447-
// ServiceExportConflict means that there is a conflict between two
448-
// exports for the same Service. When "True", the condition message
449-
// should contain enough information to diagnose the conflict:
450-
// field(s) under contention, which cluster won, and why.
451-
// Users should not expect detailed per-cluster information in the
452-
// conflict message.
453-
ServiceExportConflict = "Conflict"
454-
)
455440
```
441+
456442
```yaml
457443
apiVersion: multicluster.k8s.io/v1alpha1
458444
kind: ServiceExport
@@ -461,17 +447,20 @@ metadata:
461447
namespace: my-ns
462448
status:
463449
conditions:
464-
- type: Ready
450+
- type: Valid
465451
status: "True"
466-
message: "Service export is ready"
467452
lastTransitionTime: "2020-03-30T01:33:51Z"
468-
- type: Valid
453+
reason: Valid
454+
message: "The ServiceExport and its Service is exportable."
455+
- type: Ready
469456
status: "True"
470-
message: "Service export is valid"
471457
lastTransitionTime: "2020-03-30T01:33:55Z"
458+
reason: Exported
459+
message: "The service has been exported"
472460
- type: Conflict
473461
status: "True"
474462
lastTransitionTime: "2020-03-30T01:33:55Z"
463+
reason: TypeConflict
475464
message: "Conflicting type. Using \"ClusterSetIP\" from oldest service export in \"cluster-1\". 2/5 clusters disagree."
476465
```
477466
@@ -686,8 +675,8 @@ this cluster.
686675
complicate deployments by even attempting to stretch them across clusters.
687676
Instead, regular `ExternalName` type `Services` should be created in each
688677
cluster individually. If a `ServiceExport` is created for an `ExternalName`
689-
service, a condition type `Valid` with a `false` status will be set on the
690-
`ServiceExport`.
678+
service, a condition type `Valid` with reason `InvalidServiceType` and
679+
status `false` will be set on the `ServiceExport`.
691680

692681
#### ClusterSetIP
693682

@@ -986,8 +975,8 @@ services. If these properties are out of sync for a subset of exported services,
986975
there is no clear way to determine how a service should be accessed.
987976
988977
Conflict resolution policy: **If any properties have conflicting values that can
989-
not simply be merged, a `ServiceExportConflict` condition will be set on all
990-
`ServiceExport`s for the conflicted service with a description of the conflict.
978+
not simply be merged, a `Conflict` condition with a `true` status will be set
979+
on all `ServiceExport`s for the conflicted service with a description of the conflict.
991980
The conflict will be resolved by assigning precedence based on each
992981
`ServiceExport`'s `creationTimestamp`, from oldest to newest.**
993982

0 commit comments

Comments
 (0)