@@ -47,12 +47,6 @@ import (
47
47
olmvariables "github.com/operator-framework/operator-controller/internal/resolution/variables"
48
48
)
49
49
50
- // BundleProvider provides the way to retrieve a list of Bundles from a source,
51
- // generally from a catalog client of some kind.
52
- type BundleProvider interface {
53
- Bundles (ctx context.Context ) ([]* catalogmetadata.Bundle , error )
54
- }
55
-
56
50
// ClusterExtensionReconciler reconciles a ClusterExtension object
57
51
type ClusterExtensionReconciler struct {
58
52
client.Client
@@ -492,91 +486,6 @@ func mapBundleMediaTypeToBundleProvisioner(mediaType string) (string, error) {
492
486
}
493
487
}
494
488
495
- // setResolvedStatusConditionSuccess sets the resolved status condition to success.
496
- func setResolvedStatusConditionSuccess (conditions * []metav1.Condition , message string , generation int64 ) {
497
- apimeta .SetStatusCondition (conditions , metav1.Condition {
498
- Type : ocv1alpha1 .TypeResolved ,
499
- Status : metav1 .ConditionTrue ,
500
- Reason : ocv1alpha1 .ReasonSuccess ,
501
- Message : message ,
502
- ObservedGeneration : generation ,
503
- })
504
- }
505
-
506
- // setResolvedStatusConditionFailed sets the resolved status condition to failed.
507
- func setResolvedStatusConditionFailed (conditions * []metav1.Condition , message string , generation int64 ) {
508
- apimeta .SetStatusCondition (conditions , metav1.Condition {
509
- Type : ocv1alpha1 .TypeResolved ,
510
- Status : metav1 .ConditionFalse ,
511
- Reason : ocv1alpha1 .ReasonResolutionFailed ,
512
- Message : message ,
513
- ObservedGeneration : generation ,
514
- })
515
- }
516
-
517
- // setResolvedStatusConditionUnknown sets the resolved status condition to unknown.
518
- func setResolvedStatusConditionUnknown (conditions * []metav1.Condition , message string , generation int64 ) {
519
- apimeta .SetStatusCondition (conditions , metav1.Condition {
520
- Type : ocv1alpha1 .TypeResolved ,
521
- Status : metav1 .ConditionUnknown ,
522
- Reason : ocv1alpha1 .ReasonResolutionUnknown ,
523
- Message : message ,
524
- ObservedGeneration : generation ,
525
- })
526
- }
527
-
528
- // setInstalledStatusConditionSuccess sets the installed status condition to success.
529
- func setInstalledStatusConditionSuccess (conditions * []metav1.Condition , message string , generation int64 ) {
530
- apimeta .SetStatusCondition (conditions , metav1.Condition {
531
- Type : ocv1alpha1 .TypeInstalled ,
532
- Status : metav1 .ConditionTrue ,
533
- Reason : ocv1alpha1 .ReasonSuccess ,
534
- Message : message ,
535
- ObservedGeneration : generation ,
536
- })
537
- }
538
-
539
- // setInstalledStatusConditionFailed sets the installed status condition to failed.
540
- func setInstalledStatusConditionFailed (conditions * []metav1.Condition , message string , generation int64 ) {
541
- apimeta .SetStatusCondition (conditions , metav1.Condition {
542
- Type : ocv1alpha1 .TypeInstalled ,
543
- Status : metav1 .ConditionFalse ,
544
- Reason : ocv1alpha1 .ReasonInstallationFailed ,
545
- Message : message ,
546
- ObservedGeneration : generation ,
547
- })
548
- }
549
-
550
- // setInstalledStatusConditionUnknown sets the installed status condition to unknown.
551
- func setInstalledStatusConditionUnknown (conditions * []metav1.Condition , message string , generation int64 ) {
552
- apimeta .SetStatusCondition (conditions , metav1.Condition {
553
- Type : ocv1alpha1 .TypeInstalled ,
554
- Status : metav1 .ConditionUnknown ,
555
- Reason : ocv1alpha1 .ReasonInstallationStatusUnknown ,
556
- Message : message ,
557
- ObservedGeneration : generation ,
558
- })
559
- }
560
-
561
- func setDeprecationStatusesUnknown (conditions * []metav1.Condition , message string , generation int64 ) {
562
- conditionTypes := []string {
563
- ocv1alpha1 .TypeDeprecated ,
564
- ocv1alpha1 .TypePackageDeprecated ,
565
- ocv1alpha1 .TypeChannelDeprecated ,
566
- ocv1alpha1 .TypeBundleDeprecated ,
567
- }
568
-
569
- for _ , conditionType := range conditionTypes {
570
- apimeta .SetStatusCondition (conditions , metav1.Condition {
571
- Type : conditionType ,
572
- Reason : ocv1alpha1 .ReasonDeprecated ,
573
- Status : metav1 .ConditionUnknown ,
574
- Message : message ,
575
- ObservedGeneration : generation ,
576
- })
577
- }
578
- }
579
-
580
489
// Generate reconcile requests for all cluster extensions affected by a catalog change
581
490
func clusterExtensionRequestsForCatalog (c client.Reader , logger logr.Logger ) handler.MapFunc {
582
491
return func (ctx context.Context , _ client.Object ) []reconcile.Request {
0 commit comments