Skip to content

Commit

Permalink
add finalizer for mcs and fix some bug
Browse files Browse the repository at this point in the history
Signed-off-by: duanmengkk <[email protected]>
  • Loading branch information
duanmengkk committed Dec 24, 2023
1 parent 6f78efd commit d6380bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/clustertree/cluster-manager/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
componentbaseconfig "k8s.io/component-base/config"
"k8s.io/component-base/config/options"
componentbaseconfigv1alpha1 "k8s.io/component-base/config/v1alpha1"
"time"

Check failure on line 9 in cmd/clustertree/cluster-manager/app/options/options.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s Standard -s Default -s Prefix(github.com/kosmos.io/kosmos) (gci)

"github.com/kosmos.io/kosmos/pkg/utils/flags"
)
Expand Down Expand Up @@ -46,6 +47,8 @@ type Options struct {
RateLimiterOpts flags.Options

BackoffOpts flags.BackoffOptions

SyncPeriod time.Duration
}

type KubernetesOptions struct {
Expand Down Expand Up @@ -88,6 +91,7 @@ func (o *Options) AddFlags(flags *pflag.FlagSet) {
flags.BoolVar(&o.OnewayStorageControllers, "oneway-storage-controllers", false, "Turn on or off oneway storage controllers.")
flags.StringSliceVar(&o.AutoCreateMCSPrefix, "auto-mcs-prefix", []string{}, "The prefix of namespace for service to auto create mcs resources")
flags.StringSliceVar(&o.ReservedNamespaces, "reserved-namespaces", []string{"kube-system"}, "The namespaces protected by Kosmos that the controller-manager will skip.")
flags.DurationVar(&o.SyncPeriod, "sync-period", 0, "the sync period for informer to resync.")
o.RateLimiterOpts.AddFlags(flags)
o.BackoffOpts.AddFlags(flags)
options.BindLeaderElectionFlags(&o.LeaderElection, flags)
Expand Down

0 comments on commit d6380bf

Please sign in to comment.