mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-05-18 23:29:40 +00:00
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m26s
Post / coverage (push) Failing after 39m1s
Post / images (amd64) (push) Failing after 8m21s
Post / images (arm64) (push) Failing after 7m47s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 47s
Signed-off-by: Jian Qiu <jqiu@redhat.com>
21 lines
553 B
Go
21 lines
553 B
Go
package webhook
|
|
|
|
import "github.com/spf13/pflag"
|
|
|
|
// Config contains the server (the webhook) cert and key.
|
|
type Options struct {
|
|
ManifestLimit int
|
|
}
|
|
|
|
// NewOptions constructs a new set of default options for webhook.
|
|
func NewOptions() *Options {
|
|
return &Options{
|
|
ManifestLimit: 500 * 1024, // the default manifest limit is 500k.
|
|
}
|
|
}
|
|
|
|
func (c *Options) AddFlags(fs *pflag.FlagSet) {
|
|
fs.IntVar(&c.ManifestLimit, "manifestLimit", c.ManifestLimit,
|
|
"ManifestLimit is the max size of manifests in a manifestWork. If not set, the default is 500k.")
|
|
}
|