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: allow for log-level to be independently configured #2389

Merged
merged 5 commits into from
Dec 21, 2022
Merged

feat: allow for log-level to be independently configured #2389

merged 5 commits into from
Dec 21, 2022

Conversation

congiv
Copy link
Contributor

@congiv congiv commented Nov 7, 2022

Signed-off-by: Connor Given givencp@gmail.com

What this PR does / why we need it:
This adds functionality to allow the log level of the audit and controller manager Pods to be independently configured.

Which issue(s) this PR fixes :
Fixes #2262

Special notes for your reviewer: kept .Values.logLevel for backward compatibility. This value will still be used if the new, workload specific, values aren't specified.

Signed-off-by: Connor Given <givencp@gmail.com>
@@ -76,7 +76,7 @@ spec:
- --logtostderr
- --log-denies={{ .Values.logDenies }}
- --emit-admission-events={{ .Values.emitAdmissionEvents }}
- --log-level={{ .Values.logLevel }}
- --log-level={{ (.Values.controllerManager.logLevel | empty | not) | ternary .Values.controllerManager.logLevel .Values.logLevel }}
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can if you want, but from the helm perspective, I don't think it's necessary.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added: 938c308

Copy link
Member

Choose a reason for hiding this comment

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

@congiv can you pls run make manifests again to get the README changes into manifest_staging? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -76,7 +76,7 @@ spec:
- --logtostderr
- --log-denies={{ .Values.logDenies }}
- --emit-admission-events={{ .Values.emitAdmissionEvents }}
- --log-level={{ .Values.logLevel }}
- --log-level={{ (.Values.controllerManager.logLevel | empty | not) | ternary .Values.controllerManager.logLevel .Values.logLevel }}
Copy link
Member

Choose a reason for hiding this comment

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

is this backwards compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if these new values aren't specified, these manifests will still get the value from .Values.logLevel.

image

@congiv congiv requested a review from sozercan November 13, 2022 18:44
Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh merged commit 253124e into open-policy-agent:master Dec 21, 2022
@congiv congiv deleted the log-level-helm-vals branch December 21, 2022 02:03
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.

Make logLevel independently configurable for the auditor vs the controller-manager in Gatekeeper helm chart
4 participants