feat: add metrics auth RBAC, metrics-reader, and ServiceMonitor#168
Open
daanvinken wants to merge 1 commit into
Open
feat: add metrics auth RBAC, metrics-reader, and ServiceMonitor#168daanvinken wants to merge 1 commit into
daanvinken wants to merge 1 commit into
Conversation
- Add metrics-auth ClusterRole/ClusterRoleBinding (tokenreviews, subjectaccessreviews) gated on metrics.secure - Add metrics-reader ClusterRole for /metrics endpoint access - Add Prometheus ServiceMonitor template gated on prometheus.serviceMonitor.enabled - Add metrics.secure toggle to switch between HTTP and HTTPS metrics - Toggle service port name and ServiceMonitor scheme based on metrics.secure - Remove resolved TODOs from values.yaml Signed-off-by: Daan Vinken <daanvinken@tythus.com>
Collaborator
|
It seems that we also need to update the crd's from valkey-operator:v0.1.0, maybe can be included in this PR? |
Collaborator
|
I added a #174 since the update can be done separately. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #162. Adds the bits needed for secure metrics and Prometheus scraping.
New
metrics.securetoggle (defaults tofalse). When flipped totrueit creates the tokenreviews/subjectaccessreviews RBAC the operator needs for--metrics-secure=true, and switches the service port name tohttps. Also adds ametrics-readerClusterRole for/metricsaccess.ServiceMonitor template behind
prometheus.serviceMonitor.enabled, picks up the right scheme/port based on the secure flag.Cleaned up the TODOs in values.yaml that this covers.
Testing
Linted, templated, deployed on kind with both secure on and off. RBAC resources show up when expected, operator args are correct.