chore: add prometheus auth vars#141
Conversation
📝 WalkthroughWalkthroughThe Helm chart was bumped to 0.99.0. New ChangesHelm chart release and metrics config
Sequence Diagram(s)Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@charts/multiwoven/templates/multiwoven-config.yaml`:
- Around line 84-85: Move the Prometheus credentials out of the ConfigMap in
multiwoven-config.yaml: the PROMETHEUS_METRICS_USERNAME and
PROMETHEUS_METRICS_PASSWORD entries should be sourced through the same secret
path used for other sensitive values. Update the template around the ConfigMap
generation to gate these keys behind secretsStore.enabled (or equivalent
Secret-backed rendering) and remove direct .Values.multiwovenConfig references
from ConfigMap.data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b1f96eac-871e-46cd-91ce-f66fa2c92028
📒 Files selected for processing (3)
charts/multiwoven/Chart.yamlcharts/multiwoven/templates/multiwoven-config.yamlcharts/multiwoven/values.yaml
| PROMETHEUS_METRICS_PASSWORD: {{ .Values.multiwovenConfig.prometheusMetricsPassword | quote }} | ||
| PROMETHEUS_METRICS_USERNAME: {{ .Values.multiwovenConfig.prometheusMetricsUsername | quote }} |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Avoid exposing Prometheus credentials in ConfigMap.
Line 84 and Line 85 place auth credentials in ConfigMap.data, which is not a secret store and is often broadly readable. These keys should follow the same secret-handling path as other sensitive values (e.g., gated by secretsStore.enabled and sourced from Secret).
Suggested minimal hardening
- PROMETHEUS_METRICS_PASSWORD: {{ .Values.multiwovenConfig.prometheusMetricsPassword | quote }}
- PROMETHEUS_METRICS_USERNAME: {{ .Values.multiwovenConfig.prometheusMetricsUsername | quote }}
+ {{ if not .Values.secretsStore.enabled }}
+ PROMETHEUS_METRICS_PASSWORD: {{ .Values.multiwovenConfig.prometheusMetricsPassword | quote }}
+ PROMETHEUS_METRICS_USERNAME: {{ .Values.multiwovenConfig.prometheusMetricsUsername | quote }}
+ {{ end }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| PROMETHEUS_METRICS_PASSWORD: {{ .Values.multiwovenConfig.prometheusMetricsPassword | quote }} | |
| PROMETHEUS_METRICS_USERNAME: {{ .Values.multiwovenConfig.prometheusMetricsUsername | quote }} | |
| {{ if not .Values.secretsStore.enabled }} | |
| PROMETHEUS_METRICS_PASSWORD: {{ .Values.multiwovenConfig.prometheusMetricsPassword | quote }} | |
| PROMETHEUS_METRICS_USERNAME: {{ .Values.multiwovenConfig.prometheusMetricsUsername | quote }} | |
| {{ end }} |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@charts/multiwoven/templates/multiwoven-config.yaml` around lines 84 - 85,
Move the Prometheus credentials out of the ConfigMap in multiwoven-config.yaml:
the PROMETHEUS_METRICS_USERNAME and PROMETHEUS_METRICS_PASSWORD entries should
be sourced through the same secret path used for other sensitive values. Update
the template around the ConfigMap generation to gate these keys behind
secretsStore.enabled (or equivalent Secret-backed rendering) and remove direct
.Values.multiwovenConfig references from ConfigMap.data.
Summary by CodeRabbit
0.99.0.