Skip to content

Commit 188d5e1

Browse files
committed
move to a top level. it's more of an all or nothing setting
Signed-off-by: lemonprogis <edward.briggler@gmail.com>
1 parent b710340 commit 188d5e1

3 files changed

Lines changed: 20 additions & 30 deletions

File tree

deployment/chainloop/templates/cas/service-metrics.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ Copyright Chainloop, Inc. All Rights Reserved.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
{{- if .Values.cas.metrics.enabled }}
6+
{{- if .Values.metrics.enabled }}
77
apiVersion: v1
88
kind: Service
99
metadata:
1010
name: {{ include "chainloop.cas.fullname" . }}-metrics
1111
namespace: {{ include "common.names.namespace" . | quote }}
1212
labels: {{ include "chainloop.cas.labels" . | nindent 4 }}
13-
{{- if or .Values.cas.metrics.service.annotations .Values.commonAnnotations }}
14-
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.cas.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
13+
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
14+
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
1515
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
1616
{{- end }}
1717
spec:
1818
type: ClusterIP
1919
ports:
2020
- name: metrics
21-
port: {{ .Values.cas.metrics.service.port }}
21+
port: {{ .Values.metrics.service.port }}
2222
targetPort: metrics
2323
protocol: TCP
2424
selector: {{ include "chainloop.cas.selectorLabels" . | nindent 4 }}

deployment/chainloop/templates/controlplane/service-metrics.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ Copyright Chainloop, Inc. All Rights Reserved.
33
SPDX-License-Identifier: APACHE-2.0
44
*/}}
55

6-
{{- if .Values.controlplane.metrics.enabled }}
6+
{{- if .Values.metrics.enabled }}
77
apiVersion: v1
88
kind: Service
99
metadata:
1010
name: {{ include "chainloop.controlplane.fullname" . }}-metrics
1111
namespace: {{ include "common.names.namespace" . | quote }}
1212
labels: {{- include "chainloop.controlplane.labels" . | nindent 4 }}
13-
{{- if or .Values.controlplane.metrics.service.annotations .Values.commonAnnotations }}
14-
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.controlplane.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
13+
{{- if or .Values.metrics.service.annotations .Values.commonAnnotations }}
14+
{{- $annotations := include "common.tplvalues.merge" (dict "values" (list .Values.metrics.service.annotations .Values.commonAnnotations) "context" .) }}
1515
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
1616
{{- end }}
1717
spec:
1818
type: ClusterIP
1919
ports:
2020
- name: metrics
21-
port: {{ .Values.controlplane.metrics.service.port }}
21+
port: {{ .Values.metrics.service.port }}
2222
targetPort: metrics
2323
protocol: TCP
2424
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.controlplane.podLabels .Values.commonLabels) "context" .) | fromYaml }}

deployment/chainloop/values.yaml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,18 @@ commonLabels: {}
5151
##
5252
extraDeploy: []
5353

54+
## @section Prometheus Metrics
55+
## @extra metrics Prometheus metrics configuration for controlplane and CAS
56+
## @param metrics.enabled Enable metrics services for both controlplane and CAS
57+
metrics:
58+
enabled: false
59+
## @extra metrics.service Metrics service configuration
60+
service:
61+
## @param metrics.service.port Metrics service port
62+
port: 5000
63+
## @param metrics.service.annotations Additional custom annotations for metrics services
64+
annotations: {}
65+
5466
## @section Secrets Backend
5567
##
5668

@@ -338,17 +350,6 @@ controlplane:
338350
##
339351
sessionAffinityConfig: {}
340352

341-
## @extra controlplane.metrics Prometheus metrics configuration
342-
## @param controlplane.metrics.enabled Enable metrics service
343-
metrics:
344-
enabled: false
345-
## @extra controlplane.metrics.service Metrics service configuration
346-
service:
347-
## @param controlplane.metrics.service.port Metrics service port
348-
port: 5000
349-
## @param controlplane.metrics.service.annotations Additional custom annotations for metrics service
350-
annotations: {}
351-
352353
serviceAPI:
353354
## @param controlplane.serviceAPI.type Service type
354355
type: ClusterIP
@@ -1103,17 +1104,6 @@ cas:
11031104
##
11041105
sessionAffinityConfig: {}
11051106

1106-
## @extra cas.metrics Prometheus metrics configuration
1107-
## @param cas.metrics.enabled Enable metrics service
1108-
metrics:
1109-
enabled: false
1110-
## @extra cas.metrics.service Metrics service configuration
1111-
service:
1112-
## @param cas.metrics.service.port Metrics service port
1113-
port: 5000
1114-
## @param cas.metrics.service.annotations Additional custom annotations for metrics service
1115-
annotations: {}
1116-
11171107
serviceAPI:
11181108
## @param cas.serviceAPI.type Service type
11191109
type: ClusterIP

0 commit comments

Comments
 (0)