-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 annotation and helm value #4620
Conversation
4434296
to
cf5d490
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naseemkullah Thanks! I see this is still a draft, but just as a note, I assume you are going to make it so LINKERD2_PROXY_LOG_FORMAT
on the proxy is actually set. Also, we would ideally want a default value for that and an entry in values.yaml so we do not get a null in the config map
487e014
to
c887835
Compare
@naseemkullah I think initially we should leave this out of the CLI flags and only support this via Helm & workload annotation. We may consider adding it there later, but for now I think we'd prefer to minimize configuration CLI code. |
f948a64
to
e08a5f3
Compare
Sure, np! cli flag removed @olix0r ✅ ...ooc are there other options that are configurable via env var/helm value and/or annotation but not cli flag? |
@olix0r this sounds good to me. i wonder however, instead of leaving this out of the CLI (much like dst get networks), would it make sense to just put it as a hidden flag? |
@naseemkullah to answer your question, yes there is for example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @naseemkullah !
A LogFormat
entry is missing in the pb.Proxy
struct returned in install.go
's proxyConfig()
that allows picking the default value from values.yaml
when installing through the CLI.
Also it appears you didn't push your changes to config.proto
as it's missing LogFormat
. By looking at config.pb.go
it seems you declared a new protobuf struct to house that, but I think a bare string is enough (I don't understand why we did that with LogLevel before 🤷♂️ )
@naseemkullah one more thing: |
... aaaand also missing in |
@naseemkullah I also realized the support for the webhook injector is missing. That should live under the |
True! edit: @alpeb I see no mention of proxy log level which I'm using as a reference in |
It's here |
Can someone please help me get tests to pass?
|
@naseemkullah it seems there are some issues with the latest protobuf lib update that happened in the main branch. I'll give that a look and let you know. |
Regenerated protobuf files, using version 1.4.2 that was upgraded from 1.3.2 with the proxy-api update in #4614. As of v1.4 protobuf messages are disallowed to be copied (because they hold a mutex), so whenever a message is passed to or returned from a function we need to use a pointer. This affects _mostly_ test files. This is required to unblock #4620 which is adding a field to the config protobuf.
Regenerated protobuf files, using version 1.4.2 that was upgraded from 1.3.2 with the proxy-api update in #4614. As of v1.4 protobuf messages are disallowed to be copied (because they hold a mutex), so whenever a message is passed to or returned from a function we need to use a pointer. This affects _mostly_ test files. This is required to unblock #4620 which is adding a field to the config protobuf.
@naseemkullah you may now merge the changes from the |
Json log formatting has been added via linkerd/linkerd2-proxy#500 but wiring the option through as an annotation/helm value is still necessary. This PR adds the annotation and helm value to configure log format. Closes linkerd#2491 Signed-off-by: Naseem <naseem@transit.app>
4c4368a
to
c4213d2
Compare
Signed-off-by: Naseem <naseem@transit.app>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @naseemkullah , this looks good to me!
Thanks for your help as always @alpeb! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Tested overriding both at namespace and pod level
Json log formatting has been added via linkerd/linkerd2-proxy#500
but wiring the option through as an annotation/helm value is still
necessary.
This PR adds the annotation and helm value to configure log format.
Closes #2491
Signed-off-by: Naseem naseem@transit.app