mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
* run registratin/work together Signed-off-by: Jian Qiu <jqiu@redhat.com> * Fix integration test and lint issue Signed-off-by: Jian Qiu <jqiu@redhat.com> * Update operator to deploy singleton mode Signed-off-by: Jian Qiu <jqiu@redhat.com> * Update deps Signed-off-by: Jian Qiu <jqiu@redhat.com> --------- Signed-off-by: Jian Qiu <jqiu@redhat.com>
29 lines
987 B
Go
29 lines
987 B
Go
package spoke
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
// WorkloadAgentOptions defines the flags for workload agent
|
|
type WorkloadAgentOptions struct {
|
|
StatusSyncInterval time.Duration
|
|
AppliedManifestWorkEvictionGracePeriod time.Duration
|
|
}
|
|
|
|
// NewWorkloadAgentOptions returns the flags with default value set
|
|
func NewWorkloadAgentOptions() *WorkloadAgentOptions {
|
|
return &WorkloadAgentOptions{
|
|
StatusSyncInterval: 10 * time.Second,
|
|
AppliedManifestWorkEvictionGracePeriod: 60 * time.Minute,
|
|
}
|
|
}
|
|
|
|
// AddFlags register and binds the default flags
|
|
func (o *WorkloadAgentOptions) AddFlags(fs *pflag.FlagSet) {
|
|
fs.DurationVar(&o.StatusSyncInterval, "status-sync-interval", o.StatusSyncInterval, "Interval to sync resource status to hub.")
|
|
fs.DurationVar(&o.AppliedManifestWorkEvictionGracePeriod, "appliedmanifestwork-eviction-grace-period",
|
|
o.AppliedManifestWorkEvictionGracePeriod, "Grace period for appliedmanifestwork eviction")
|
|
}
|