Let ks-apiserver optionally support authentication enabled and es without authentication enabled

Signed-off-by: Daniel Hu <farmer.hutao@outlook.com>
This commit is contained in:
Daniel Hu
2021-03-30 03:33:49 +00:00
parent 066dfe7066
commit 3798959eef
11 changed files with 112 additions and 24 deletions

View File

@@ -59,7 +59,7 @@ func NewClient(options *logging.Options) (logging.Client, error) {
c := &client{}
var err error
c.c, err = es.NewClient(options.Host, options.IndexPrefix, options.Version)
c.c, err = es.NewClient(options.Host, options.BasicAuth, options.Username, options.Password, options.IndexPrefix, options.Version)
return c, err
}