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

Add log-format value to the multicluster-link helm chart #10779

Merged
merged 1 commit into from
Jun 8, 2023

Conversation

bunnybilou
Copy link
Contributor

Make log-format configurable on the multicluster-link helm chart

Signed-off-by: Arnaud Beun arnaud.beun@sorare.com

@bunnybilou bunnybilou requested a review from a team as a code owner April 19, 2023 15:00
@adleong
Copy link
Member

adleong commented Apr 24, 2023

Hi @bunnybilou, you'll need to run go test ./... --update to update the test golden files to reflect this change to the manifests.

@bunnybilou bunnybilou force-pushed the ab/link_json_logs branch 2 times, most recently from 7d084b0 to e83127b Compare April 27, 2023 16:15
@bunnybilou
Copy link
Contributor Author

@adleong did the required changes to add log-format

Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

@bunnybilou
Copy link
Contributor Author

@adleong

Failing test has this dependency. I have modified the multicluster valus.go file but we need to publish it to make it work.

How do I update the library?

@adleong
Copy link
Member

adleong commented May 2, 2023

The tests use the code and charts directly from the repo. No publishing is necessary.

@bunnybilou bunnybilou force-pushed the ab/link_json_logs branch 2 times, most recently from 3f23eda to 05a8e89 Compare May 9, 2023 14:48
@@ -398,6 +401,10 @@ func buildServiceMirrorValues(opts *linkOptions) (*multicluster.Values, error) {
return nil, fmt.Errorf("--log-level must be one of: panic, fatal, error, warn, info, debug")
}

if _, err := log.ParseLevel(opts.logFormat); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

This call will always fail

@alpeb
Copy link
Member

alpeb commented May 17, 2023

Hi @bunnybilou, are you still interested on bringing this one across the finish line? :-)

@bunnybilou
Copy link
Contributor Author

Hi @alpeb thank you for your review.

I have fixed it, let me know if this is ok for you?

Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Comment on lines 404 to 407
if opts.logFormat == "" {
return nil, fmt.Errorf("--log-format must be one of: plain, json")
}

Copy link
Member

Choose a reason for hiding this comment

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

Can you have here a more specific check, that validates that the value is either plain or json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alpeb, I made the change but one test is failing Integration tests / test-multicluster (v1.26) (pull_request) but I don't think it's related to the modification.

Signed-off-by: Arnaud Beun <arnaud.beun@sorare.com>
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

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

Thanks again @bunnybilou , the tests failures were just flakiness. This is ready to go 👍

@alpeb alpeb merged commit 2ebddd3 into linkerd:main Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants