Skip to content

Commit 2651927

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

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

pkg/apis/v1alpha1/serviceimport.go

Lines changed: 42 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,39 @@ 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+
//
159+
// Possible reasons for this condition to be False are:
160+
//
161+
// * "Pending"
162+
// * "IPFamilyNotSupported"
163+
//
164+
// Possible reasons for this condition to be Unknown are:
165+
//
166+
// * "Pending"
167+
//
168+
// Controllers may raise this condition with other reasons,
169+
// but should prefer to use the reasons listed above to improve
170+
// interoperability.
171+
ServiceImportConditionReady = "Ready"
172+
173+
// ServiceImportReasonReady is used with the "Ready" condition when the
174+
// condition is True.
175+
ServiceImportReasonReady = "Ready"
176+
177+
// ServiceImportReasonPending is used with the "Ready" condition when
178+
// the ServiceImport is in the process of being created or updated.
179+
ServiceImportReasonPending = "Pending"
180+
181+
// ServiceImportReasonIPFamilyNotSupported is used with the "Ready"
182+
// condition when the service can not be imported due to IP families
183+
// mismatch.
184+
ServiceImportReasonIPFamilyNotSupported = "IPFamilyNotSupported"
185+
)

0 commit comments

Comments
 (0)