Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat( logc, persistentevent ): support es auth #903

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

breakliu
Copy link
Contributor

@breakliu breakliu commented Nov 12, 2020

Fixes #804

  1. logagent-api support es detection
  2. logc, persistentevent support es auth
  3. webui ( tke-gateway )
  4. merged to tkestack/log-manager:fluentd


this.esDetection = this.esDetection.bind(this);

/** checkESStatus
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better way is use enum,but it's ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@jo-hnny
Copy link
Collaborator

jo-hnny commented Nov 12, 2020

+1

@huxiaoliang
Copy link
Contributor

please help fix conflict issue, then I will get it merged

[+] add domain regex, es auth

add(logc): es password base64

add(persistentevent): UI support ES Auth

 add(persistentevent): psw encode, %{} to fluentd

add(persistentevent): fixed input style width

ES: es detection

add(web): logc es detection, http request timeout

add(web): persistentEvent es detection

add(web): ES detection button disabled

add(web): es host and index required

feat(es auth): update pb
@breakliu
Copy link
Contributor Author

please help fix conflict issue, then I will get it merged

done

return nil, fmt.Errorf("es detection: unable to generate request")
}

client := &http.Client{Timeout: time.Second * 5}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't creat http.Client in method, this may cause handle leak.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it, but can't find memory leak here. Any examples? THX

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/questions/62904351/singleton-http-client
Create customized client may happen in multiple goroutine, the client won't reuse other clients' connection.
At worst, tcp sockets will be exhausted.s
In your cause, this method may just runs in single goroutine. But in the future, it may be used by someone in multiple goroutines

@huxiaoliang huxiaoliang merged commit 02b5b3b into tkestack:master Nov 17, 2020
willemswang pushed a commit to willemswang/tke that referenced this pull request Dec 3, 2020
…on (tkestack#903)

[+] add domain regex, es auth

add(logc): es password base64

add(persistentevent): UI support ES Auth

 add(persistentevent): psw encode, %{} to fluentd

add(persistentevent): fixed input style width

ES: es detection

add(web): logc es detection, http request timeout

add(web): persistentEvent es detection

add(web): ES detection button disabled

add(web): es host and index required

feat(es auth): update pb

Co-authored-by: yiwenshao <shaoyiwenet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants