Skip to content

Commit

Permalink
fix agent metrics and align with gitops-helm (#1)
Browse files Browse the repository at this point in the history
* fix agent metrics and align with gitops-helm

Signed-off-by: Mirko <[email protected]>
* fix agent metrics and align with gitops-helm

Signed-off-by: Mirko <[email protected]>
  • Loading branch information
mteodor authored and Harness committed Dec 18, 2024
1 parent 3a31f17 commit 3f9627a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
name: gitops-helm-byoa
description: A Helm chart for Harness GitOps Agent through BYOA installation flows.
version: 1.3.3
version: 1.3.4
3 changes: 1 addition & 2 deletions charts/templates/gitops-agent/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,12 @@ spec:
valueFrom:
secretKeyRef:
name: {{ default "argocd-redis" .Values.externalRedis.existingSecret }}

optional: true
{{- if .Values.externalRedis.host }}
key: redis-password
{{- else }}
key: auth
{{- end }}
optional: true
- name: REDIS_SENTINEL_USERNAME
valueFrom:
secretKeyRef:
Expand Down
6 changes: 3 additions & 3 deletions charts/templates/gitops-agent/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ ".Values.agent.name" }}-metrics
name: {{ .Values.agent.name }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "harness.agentLabels" (dict "context" . "component" .Values.agent.name "name" (printf "%s-metrics" .Values.agent.name)) | nindent 4 }}
{{- with .Values.agent.metrics.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- if or .Values.agent.metrics.service.annotations .Values.global.addPrometheusAnnotations }}
{{- if or .Values.agent.metrics.service.annotations .Values.agent.addPrometheusAnnotations }}
annotations:
{{- if .Values.global.addPrometheusAnnotations }}
{{- if .Values.agent.addPrometheusAnnotations }}
prometheus.io/port: {{ .Values.agent.metrics.service.servicePort | quote }}
prometheus.io/scrape: "true"
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/templates/gitops-agent/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ data:
{{ .Values.harness.secrets.mtlsClientCert }}
client.key: |
{{ .Values.harness.secrets.mtlsClientKey }}
---

0 comments on commit 3f9627a

Please sign in to comment.