Skip to content

Commit 00c70da

Browse files
committed
apis: add ServiceImport condition
Signed-off-by: Arthur Outhenin-Chalandre <[email protected]>
1 parent a23ff80 commit 00c70da

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

pkg/apis/v1alpha1/serviceimport.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ type ServiceImportStatus struct {
120120
// +listType=map
121121
// +listMapKey=cluster
122122
Clusters []ClusterStatus `json:"clusters,omitempty"`
123+
// +optional
124+
// +patchStrategy=merge
125+
// +patchMergeKey=type
126+
// +listType=map
127+
// +listMapKey=type
128+
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"`
123129
}
124130

125131
// ClusterStatus contains service configuration mapped to a specific source cluster
@@ -141,3 +147,46 @@ type ServiceImportList struct {
141147
// +listType=set
142148
Items []ServiceImport `json:"items"`
143149
}
150+
151+
const (
152+
// ServiceImportConditionReady is true when the Service Import is ready.
153+
//
154+
//
155+
// Possible reasons for this condition to be true are:
156+
//
157+
// * "Ready"
158+
// * "PartialIPFamilyCompatibility"
159+
//
160+
// Possible reasons for this condition to be False are:
161+
//
162+
// * "Progressing"
163+
// * "PartialIPFamilyCompatibility"
164+
// * "IPFamilyNotSupported"
165+
//
166+
// Possible reasons for this condition to be Unknown are:
167+
//
168+
// * "Progressing"
169+
//
170+
// Controllers may raise this condition with other reasons,
171+
// but should prefer to use the reasons listed above to improve
172+
// interoperability.
173+
ServiceImportConditionReady = "Ready"
174+
175+
// ServiceImportReasonReady is used with the "Ready" condition when the
176+
// condition is True.
177+
ServiceImportReasonReady = "Ready"
178+
179+
// ServiceExportReasonPartialIPFamilyCompatibility is used with the "Ready"
180+
// condition when the local cluster partially supports the imported service
181+
// IP families.
182+
ServiceExportReasonPartialIPFamilyCompatibility = "PartialIPFamilyCompatibility"
183+
184+
// ServiceExportReasonProgressing is used with the "Ready" condition when
185+
// the ServiceImport is in the process of being created or updated.
186+
ServiceExportReasonProgressing = "Progressing"
187+
188+
// ServiceExportReasonIPFamilyNotSupported is used with the "Ready"
189+
// condition when the service can not be imported due to IP families
190+
// mismatch.
191+
ServiceExportReasonIPFamilyNotSupported = "IPFamilyNotSupported"
192+
)

0 commit comments

Comments
 (0)