diff --git a/deployment/chainloop/Chart.yaml b/deployment/chainloop/Chart.yaml index bfcced42d..b011622c8 100644 --- a/deployment/chainloop/Chart.yaml +++ b/deployment/chainloop/Chart.yaml @@ -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 diff --git a/deployment/chainloop/templates/cas/service-metrics.yaml b/deployment/chainloop/templates/cas/service-metrics.yaml new file mode 100644 index 000000000..7ec97e90c --- /dev/null +++ b/deployment/chainloop/templates/cas/service-metrics.yaml @@ -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 }} diff --git a/deployment/chainloop/templates/controlplane/service-metrics.yaml b/deployment/chainloop/templates/controlplane/service-metrics.yaml new file mode 100644 index 000000000..aa29f0f52 --- /dev/null +++ b/deployment/chainloop/templates/controlplane/service-metrics.yaml @@ -0,0 +1,25 @@ +{{- /* +Copyright Chainloop, Inc. All Rights Reserved. +SPDX-License-Identifier: APACHE-2.0 +*/}} + +{{- if .Values.controlplane.metrics.enabled }} +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 }} diff --git a/deployment/chainloop/values.yaml b/deployment/chainloop/values.yaml index 2ef89925b..5447b7e16 100644 --- a/deployment/chainloop/values.yaml +++ b/deployment/chainloop/values.yaml @@ -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 @@ -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