feat: adding metric configuration and services for cas and controlplane#2897
Conversation
There was a problem hiding this comment.
No issues found across 4 files
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Signed-off-by: lemonprogis <edward.briggler@gmail.com>
Signed-off-by: lemonprogis <edward.briggler@gmail.com>
Code reviewA few concerns about consistency with the rest of the chart: 1. Shared top-level Every other component setting lives under chainloop/deployment/chainloop/values.yaml Lines 54 to 65 in 05478c1 2. Duplicate port default
3. Dead
-- Miguel |
|
also make sure to run sign off the commits, thanks! |
05478c1 to
188d5e1
Compare
… and dead variable reference Signed-off-by: lemonprogis <edward.briggler@gmail.com>
|
Thank you @migmartri for the review! Address the comment above, also adding sign-off as well. What's funny is I had it per one before but thought it made sense as a top level since it's shared :D |
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="deployment/chainloop/templates/controlplane/service-metrics.yaml">
<violation number="1" location="deployment/chainloop/templates/controlplane/service-metrics.yaml:6">
P2: Configuration path changed from `metrics.enabled` to `controlplane.metrics.enabled` without backward-compatibility handling. Existing deployments using the old path will silently have metrics disabled. Consider adding backward compatibility (e.g., `{{- if or .Values.controlplane.metrics.enabled .Values.metrics.enabled }}`) or documenting the migration requirement.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| SPDX-License-Identifier: APACHE-2.0 | ||
| */}} | ||
|
|
||
| {{- if .Values.controlplane.metrics.enabled }} |
There was a problem hiding this comment.
P2: Configuration path changed from metrics.enabled to controlplane.metrics.enabled without backward-compatibility handling. Existing deployments using the old path will silently have metrics disabled. Consider adding backward compatibility (e.g., {{- if or .Values.controlplane.metrics.enabled .Values.metrics.enabled }}) or documenting the migration requirement.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At deployment/chainloop/templates/controlplane/service-metrics.yaml, line 6:
<comment>Configuration path changed from `metrics.enabled` to `controlplane.metrics.enabled` without backward-compatibility handling. Existing deployments using the old path will silently have metrics disabled. Consider adding backward compatibility (e.g., `{{- if or .Values.controlplane.metrics.enabled .Values.metrics.enabled }}`) or documenting the migration requirement.</comment>
<file context>
@@ -3,24 +3,23 @@ Copyright Chainloop, Inc. All Rights Reserved.
*/}}
-{{- if .Values.metrics.enabled }}
+{{- if .Values.controlplane.metrics.enabled }}
apiVersion: v1
kind: Service
</file context>
| {{- if .Values.controlplane.metrics.enabled }} | |
| {{- if or .Values.controlplane.metrics.enabled .Values.metrics.enabled }} |
|
Issue ref: #2900 |
Hey y'all 👋
In our deployments of Chainloop OSS, we have created a couple of services in a config chart to expose the metrics endpoints to be scraped by prometheus via a servicemonitor.
I did a couple of simplifications compared to the http and grpc services. Keeping this one ClusterIP only etc.
It's configurable similarly to the others using the same conventions. This allows prometheus to lookup the endpoints of the pods and scrape every pod as the replicasets scale.