-
Notifications
You must be signed in to change notification settings - Fork 112
jsonnet/telemeter/server: move whitelist out of secret #131
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
Conversation
This commit removes the whitelist from the Telemeter server secret and places it instead in a series of command line `--whitelist` flags. This is helpful for several reasons: 1. as the whitelist is no longer in a secret it no longer has to be handled manually, preventing potential human error when the whitelist changes; and 2. when the whitelist changes, the DaemonSet spec will also change so the new configuration will automatically be rolled out without needing to manually kick pods.
local secretVolume = volume.fromSecret(secretVolumeName, secretName); | ||
|
||
local whitelist = std.map( | ||
function(rule) "--whitelist='%s'" % std.strReplace(rule, 'ALERTS', 'alerts'), |
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.
does it make sense to do a std.asciiLower(str) here instead?
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.
no it does not make sense here; there may very well be metric names or labels in the whitelist that we do not want completely lowercased. The only one we care about today is the ALERTS
metric name.
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.
agreed
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.
this is super nice 👍 and will reduce skew. just one question regarding lowercasing vs. hardcoding the alert metric.
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: s-urbaniak, squat The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test e2e-aws |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest |
fixes #121 |
This commit removes the whitelist from the Telemeter server secret and
places it instead in a series of command line
--whitelist
flags. Thisis helpful for several reasons:
handled manually, preventing potential human error when the whitelist
changes; and
the new configuration will automatically be rolled out without needing
to manually kick pods.
cc @s-urbaniak @jfchevrette