add audit components

Signed-off-by: wanjunlei <wanjunlei@yunify.com>

debug

add test

add test

add test
This commit is contained in:
wanjunlei
2020-06-10 15:59:09 +08:00
parent 0316223f0d
commit 4cb84de44d
39 changed files with 2669 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ import (
)
type Options struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Host string `json:"host" yaml:"host"`
IndexPrefix string `json:"indexPrefix,omitempty" yaml:"indexPrefix"`
Version string `json:"version" yaml:"version"`
@@ -47,6 +48,7 @@ func (s *Options) Validate() []error {
}
func (s *Options) AddFlags(fs *pflag.FlagSet, c *Options) {
fs.BoolVar(&s.Enabled, "auditing-enabled", c.Enabled, "Enable auditing component or not. ")
fs.StringVar(&s.Host, "auditing-elasticsearch-host", c.Host, ""+
"Elasticsearch service host. KubeSphere is using elastic as auditing store, "+
"if this filed left blank, KubeSphere will use kubernetes builtin event API instead, and"+