Skip to content

Commit

Permalink
fix: [CDS-97699]: Fix installing agent with custom CA (#29)
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Teodorovic <[email protected]>
  • Loading branch information
mteodor authored Jun 7, 2024
1 parent a559458 commit 766d359
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions templates/gitops-agent/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ stringData:
GITOPS_AGENT_TOKEN: |
{{ .Values.harness.secrets.agentSecret }}
---
{{ if .Values.harness.secrets.caData.enabled }}
{{- if .Values.harness.secrets.caData.enabled }}
apiVersion: v1
kind: Secret
metadata:
labels:
{{- include "harness.agentLabels" (dict "context" . "component" .Values.agent.name "name" "agent-ca") | nindent 4 }}
name: {{ .Values.agent.name }}-ca
namespace: {{ .Release.Namespace }}
stringData:
ca.bundle: |
{{ .Values.harness.secrets.caData.secret }}
type: Opaque
stringData:
ca.bundle: |
{{ .Values.harness.secrets.caData.secret }}
---
{{- end }}
apiVersion: v1
Expand All @@ -30,11 +31,11 @@ metadata:
{{- include "harness.agentLabels" (dict "context" . "component" .Values.agent.name "name" "agent-ssh") | nindent 4 }}
name: {{ .Values.agent.name }}-mtls
namespace: {{ .Release.Namespace }}
type: Opaque
data:
client.crt: |
{{- .Values.harness.secrets.mtlsClientCert | nindent 4}}
{{ .Values.harness.secrets.mtlsClientCert }}
client.key: |
{{- .Values.harness.secrets.mtlsClientKey | nindent 4}}
---
{{ .Values.harness.secrets.mtlsClientKey }}

0 comments on commit 766d359

Please sign in to comment.