Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployment/chainloop/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Chainloop is an open source software supply chain control plane, a

type: application
# Bump the patch (not minor, not major) version on each change in the Chart Source code
version: 1.347.0
version: 1.347.1
# Do not update appVersion, this is handled automatically by the release process
appVersion: v1.83.0

Expand Down
25 changes: 25 additions & 0 deletions deployment/chainloop/templates/cas/service-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- /*
Copyright Chainloop, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if .Values.cas.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "chainloop.cas.fullname" . }}-metrics
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{ include "chainloop.cas.labels" . | nindent 4 }}
{{- if or .Values.cas.metrics.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.cas.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
- name: metrics
port: {{ .Values.cas.containerPorts.metrics }}
targetPort: metrics
protocol: TCP
selector: {{ include "chainloop.cas.selectorLabels" . | nindent 4 }}
{{- end }}
25 changes: 25 additions & 0 deletions deployment/chainloop/templates/controlplane/service-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- /*
Copyright Chainloop, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- if .Values.controlplane.metrics.enabled }}

@cubic-dev-ai cubic-dev-ai Bot Mar 20, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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>
Suggested change
{{- if .Values.controlplane.metrics.enabled }}
{{- if or .Values.controlplane.metrics.enabled .Values.metrics.enabled }}
Fix with Cubic

apiVersion: v1
kind: Service
metadata:
name: {{ include "chainloop.controlplane.fullname" . }}-metrics
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "chainloop.controlplane.labels" . | nindent 4 }}
{{- if or .Values.controlplane.metrics.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.controlplane.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
ports:
- name: metrics
port: {{ .Values.controlplane.containerPorts.metrics }}
targetPort: metrics
protocol: TCP
selector: {{ include "chainloop.controlplane.selectorLabels" . | nindent 4 }}
{{- end }}
18 changes: 18 additions & 0 deletions deployment/chainloop/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,15 @@ controlplane:
##
sessionAffinityConfig: {}

## @extra controlplane.metrics Prometheus metrics configuration
## @param controlplane.metrics.enabled Enable metrics service for controlplane
metrics:
enabled: false
## @extra controlplane.metrics.service Metrics service configuration
service:
## @param controlplane.metrics.service.annotations Additional custom annotations for metrics service
annotations: {}

serviceAPI:
## @param controlplane.serviceAPI.type Service type
type: ClusterIP
Expand Down Expand Up @@ -1092,6 +1101,15 @@ cas:
##
sessionAffinityConfig: {}

## @extra cas.metrics Prometheus metrics configuration
## @param cas.metrics.enabled Enable metrics service for CAS
metrics:
enabled: false
## @extra cas.metrics.service Metrics service configuration
service:
## @param cas.metrics.service.annotations Additional custom annotations for metrics service
annotations: {}

serviceAPI:
## @param cas.serviceAPI.type Service type
type: ClusterIP
Expand Down
Loading