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: add log format configuration options through helm chart #346

Merged
merged 11 commits into from
Feb 15, 2023

Conversation

mowies
Copy link
Member

@mowies mowies commented Feb 9, 2023

This PR

  • adds a new sidecarConfiguration.logFormat helm value that is handed over to the operator as an env var
  • sets the default sidecar log format to json both in code and in the CRD itself, as well as the helm chart

Fixes #334

@mowies mowies changed the title feat: Add log format configuration options through helm chart feat: add log format configuration options through helm chart Feb 9, 2023
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
@mowies mowies marked this pull request as ready for review February 13, 2023 11:11
@james-milligan
Copy link
Contributor

The Merge method in apis/core/v1alpha1/flagsourceconfiguration_types.go should be extended to ensure this configuration isn't dropped.

if new.DefaultLogFormat != "" {
	fc.DefaultLogFormat = new.DefaultLogFormat
}

I may also be worthwhile adding this configuration to one of the existing tests in /webhooks/pod_webhook_test.go as this will catch the above issue in future PRs

Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
@mowies
Copy link
Member Author

mowies commented Feb 13, 2023

@james-milligan thanks for the review!
I fixed your remarks, adjusted the mutating webhook tests, and also re-generated the helm chart (not sure if that's needed or not)
pls re-review :)

mowies and others added 2 commits February 13, 2023 14:57
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
@mowies
Copy link
Member Author

mowies commented Feb 13, 2023

the failing test works for me locally... can somebody maybe start a re-run?

@skyerus
Copy link
Contributor

skyerus commented Feb 13, 2023

the failing test work for me locally... can somebody maybe start a re-run?

Done! Note: there's an issue for this flakey test #347

@toddbaert toddbaert self-requested a review February 14, 2023 13:25
@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Merging #346 (99dadd9) into main (56ea082) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #346   +/-   ##
=======================================
  Coverage   61.46%   61.46%           
=======================================
  Files           4        4           
  Lines         532      532           
=======================================
  Hits          327      327           
  Misses        185      185           
  Partials       20       20           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

I didn't manually test this one but it looks good to me; tests are passing now and it looks like @james-milligan 's concerns (including the conversion) have been resolved.

Co-authored-by: James Milligan <75740990+james-milligan@users.noreply.github.com>
Signed-off-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com>
Copy link
Contributor

@skyerus skyerus left a comment

Choose a reason for hiding this comment

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

LGTM, thanks :)

@james-milligan james-milligan merged commit bcef736 into open-feature:main Feb 15, 2023
@mowies mowies deleted the log-format-integration branch February 15, 2023 14:34
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.

[Logging] Customize flagd logger format
5 participants