Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1851351: Remove stale EtcdMemberIPMigratorDegraded condition #517

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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