Skip to content

Commit 199ca07

Browse files
committed
agent: add trust feature flag
1 parent 29b94ca commit 199ca07

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

charts/agent/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: cloud-agent
33
description: A Helm chart for Ametnes Platform Agent
44
type: application
5-
version: 0.3.4
5+
version: 0.3.6
66
appVersion: 0.3.4563
77
dependencies:
88
- name: memcached

charts/agent/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Create the Secret from Helm values (one or more CAs):
3636
agent:
3737
tls:
3838
trust:
39+
enabled: true
3940
additionalCAs:
4041
- crt: |
4142
-----BEGIN CERTIFICATE-----
@@ -51,6 +52,7 @@ Or use an existing Secret (all keys in that Secret are appended to the bundle):
5152
agent:
5253
tls:
5354
trust:
55+
enabled: true
5456
additionalCAs: []
5557
secret:
5658
create: false

charts/agent/templates/agent-deploy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{{- with .Values.agent }}
55
{{- $tls := default dict .tls -}}
66
{{- $trust := default dict $tls.trust -}}
7+
{{- $trustEnabled := default false $trust.enabled -}}
78
{{- $additionalCAs := default list $trust.additionalCAs -}}
89
{{- $hasInlineCerts := false -}}
910
{{- range $additionalCAs }}
@@ -14,7 +15,7 @@
1415
{{- $secretCfg := default dict $trust.secret -}}
1516
{{- $shouldCreate := default true $secretCfg.create -}}
1617
{{- $useExistingSecret := and $secretCfg (not $shouldCreate) $secretCfg.name -}}
17-
{{- $TlsTrustActive := or (and $hasInlineCerts $shouldCreate) $useExistingSecret -}}
18+
{{- $TlsTrustActive := and $trustEnabled (or (and $hasInlineCerts $shouldCreate) $useExistingSecret) -}}
1819
{{- $TlsSecretName := "" -}}
1920
{{- if $TlsTrustActive }}
2021
{{- if and $hasInlineCerts $shouldCreate }}

charts/agent/templates/agent-secret.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{{- with .Values.agent }}
44
{{- $tls := default dict .tls -}}
55
{{- $trust := default dict $tls.trust -}}
6+
{{- $trustEnabled := default false $trust.enabled -}}
67
{{- $additionalCAs := default list $trust.additionalCAs -}}
78
{{- $hasInlineCerts := false -}}
89
{{- range $additionalCAs }}
@@ -12,7 +13,7 @@
1213
{{- end }}
1314
{{- $secretCfg := default dict $trust.secret -}}
1415
{{- $shouldCreate := default true $secretCfg.create -}}
15-
{{- if and $hasInlineCerts $shouldCreate }}
16+
{{- if and $trustEnabled $hasInlineCerts $shouldCreate }}
1617
apiVersion: v1
1718
kind: Secret
1819
metadata:

charts/agent/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ agent:
2424
extraVolumeMounts: []
2525
tls:
2626
trust:
27+
enabled: false
2728
# PEM CAs to append to the system bundle (e.g. TLS interception roots). Chart creates a Secret when secret.create is true.
2829
additionalCAs: []
2930
# Example (single CA):

0 commit comments

Comments
 (0)