Skip to content

Commit

Permalink
operator: remove EtcdMemberIPMigratorDegraded stale condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Jan 7, 2021
1 parent 9285f6c commit 5fda1fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/operator/starter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/openshift/library-go/pkg/controller/controllercmd"
"github.com/openshift/library-go/pkg/operator/genericoperatorclient"
"github.com/openshift/library-go/pkg/operator/resource/resourceapply"
"github.com/openshift/library-go/pkg/operator/staleconditions"
"github.com/openshift/library-go/pkg/operator/staticpod"
"github.com/openshift/library-go/pkg/operator/staticpod/controller/revision"
"github.com/openshift/library-go/pkg/operator/staticresourcecontroller"
Expand Down Expand Up @@ -223,11 +224,21 @@ func RunOperator(ctx context.Context, controllerContext *controllercmd.Controlle
controllerContext.EventRecorder,
)

staleConditions := staleconditions.NewRemoveStaleConditionsController(
[]string{
// IP migrator was removed in 4.5, however older clusters can still have this condition set and it might prevent upgrades
"EtcdMemberIPMigratorDegraded",
},
operatorClient,
controllerContext.EventRecorder,
)

operatorInformers.Start(ctx.Done())
kubeInformersForNamespaces.Start(ctx.Done())
configInformers.Start(ctx.Done())
dynamicInformers.Start(ctx.Done())

go staleConditions.Run(ctx, 1)
go fsyncMetricController.Run(ctx, 1)
go staticResourceController.Run(ctx, 1)
go targetConfigReconciler.Run(ctx, 1)
Expand Down

0 comments on commit 5fda1fe

Please sign in to comment.