Skip to content

Commit

Permalink
Merge pull request #517 from mfojtik/remove-stale-migrator
Browse files Browse the repository at this point in the history
Bug 1851351: Remove stale EtcdMemberIPMigratorDegraded condition
  • Loading branch information
openshift-merge-robot authored Jan 8, 2021
2 parents 2a22d46 + 5fda1fe commit 7df8310
Show file tree
Hide file tree
Showing 3 changed files with 56 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ github.com/openshift/library-go/pkg/operator/resource/resourceread
github.com/openshift/library-go/pkg/operator/resource/retry
github.com/openshift/library-go/pkg/operator/resourcesynccontroller
github.com/openshift/library-go/pkg/operator/revisioncontroller
github.com/openshift/library-go/pkg/operator/staleconditions
github.com/openshift/library-go/pkg/operator/staticpod
github.com/openshift/library-go/pkg/operator/staticpod/certsyncpod
github.com/openshift/library-go/pkg/operator/staticpod/controller/backingresource
Expand Down

0 comments on commit 7df8310

Please sign in to comment.