@@ -28,6 +28,7 @@ type InstallPlanSpec struct {
28
28
ClusterServiceVersionNames []string `json:"clusterServiceVersionNames"`
29
29
Approval Approval `json:"approval"`
30
30
Approved bool `json:"approved"`
31
+ Generation int `json:"generation"`
31
32
}
32
33
33
34
// InstallPlanPhase is the current status of a InstallPlan as a whole.
@@ -251,6 +252,8 @@ type BundleLookup struct {
251
252
// Path refers to the location of a bundle to pull.
252
253
// It's typically an image reference.
253
254
Path string `json:"path"`
255
+ // Identifier is the catalog-unique name of the operator (the name of the CSV for bundles that contain CSVs)
256
+ Identifier string `json:"identifier"`
254
257
// Replaces is the name of the bundle to replace with the one found at Path.
255
258
Replaces string `json:"replaces"`
256
259
// CatalogSourceRef is a reference to the CatalogSource the bundle path was resolved from.
@@ -305,39 +308,6 @@ func (b *BundleLookup) SetCondition(cond BundleLookupCondition) BundleLookupCond
305
308
return cond
306
309
}
307
310
308
- // ManifestsMatch returns true if the CSV manifests in the StepResources of the given list of steps
309
- // matches those in the InstallPlanStatus.
310
- func (s * InstallPlanStatus ) CSVManifestsMatch (steps []* Step ) bool {
311
- if s .Plan == nil && steps == nil {
312
- return true
313
- }
314
- if s .Plan == nil || steps == nil {
315
- return false
316
- }
317
-
318
- manifests := make (map [string ]struct {})
319
- for _ , step := range s .Plan {
320
- resource := step .Resource
321
- if resource .Kind != ClusterServiceVersionKind {
322
- continue
323
- }
324
- manifests [resource .Manifest ] = struct {}{}
325
- }
326
-
327
- for _ , step := range steps {
328
- resource := step .Resource
329
- if resource .Kind != ClusterServiceVersionKind {
330
- continue
331
- }
332
- if _ , ok := manifests [resource .Manifest ]; ! ok {
333
- return false
334
- }
335
- delete (manifests , resource .Manifest )
336
- }
337
-
338
- return len (manifests ) == 0
339
- }
340
-
341
311
func (s * Step ) String () string {
342
312
return fmt .Sprintf ("%s: %s (%s)" , s .Resolving , s .Resource , s .Status )
343
313
}
0 commit comments