diff --git a/charts/spire/charts/spire-agent/README.md b/charts/spire/charts/spire-agent/README.md index 69fe8a2..eb346c2 100644 --- a/charts/spire/charts/spire-agent/README.md +++ b/charts/spire/charts/spire-agent/README.md @@ -96,3 +96,6 @@ A Helm chart to install the SPIRE agent. | `extraContainers` | Additional containers to create with Spire Agent pods | `[]` | | `initContainers` | Additional init containers to create with Spire Agent pods | `[]` | | `hostAliases` | Customize /etc/hosts file as described here https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ | `[]` | +| `experimental.enabled` | Allow configuration of experimental features | `false` | +| `experimental.syncInterval` | Sync interval with SPIRE server with exponential backoff | `5s` | +| `experimental.featureFlags` | List of developer feature flags | `[]` | diff --git a/charts/spire/charts/spire-agent/templates/configmap.yaml b/charts/spire/charts/spire-agent/templates/configmap.yaml index bc4fa4e..e19a577 100644 --- a/charts/spire/charts/spire-agent/templates/configmap.yaml +++ b/charts/spire/charts/spire-agent/templates/configmap.yaml @@ -22,6 +22,19 @@ agent: disable_spiffe_cert_validation: {{ .Values.sds.disableSpiffeCertValidation }} {{- end }} + {{- with .Values.experimental }} + {{- if eq (.enabled | toString) "true" }} + experimental: + sync_interval: {{ .syncInterval | quote }} + {{- if gt (len .featureFlags) 0 }} + feature_flags: + {{- range .featureFlags }} + - {{ . | quote }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + plugins: NodeAttestor: - k8s_psat: diff --git a/charts/spire/charts/spire-agent/values.yaml b/charts/spire/charts/spire-agent/values.yaml index 09ea3ad..54d11d6 100644 --- a/charts/spire/charts/spire-agent/values.yaml +++ b/charts/spire/charts/spire-agent/values.yaml @@ -215,3 +215,11 @@ extraContainers: [] initContainers: [] ## @param hostAliases [array] Customize /etc/hosts file as described here https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ hostAliases: [] + +experimental: + ## @param experimental.enabled Allow configuration of experimental features + enabled: false + ## @param experimental.syncInterval Sync interval with SPIRE server with exponential backoff + syncInterval: 5s + ## @param experimental.featureFlags [array] List of developer feature flags + featureFlags: [] diff --git a/charts/spire/templates/NOTES.txt b/charts/spire/templates/NOTES.txt index f1f6983..096b2ba 100644 --- a/charts/spire/templates/NOTES.txt +++ b/charts/spire/templates/NOTES.txt @@ -6,7 +6,7 @@ Installed {{ .Chart.Name }}… Warning: You're using an unsupported plugin. Functionality of this release and future upgrades aren't guaranteed to work smoothly. {{- end }} -{{- if eq ((index .Values "spire-server").experimental.enabled | toString) "true" }} +{{- if or (eq (((index .Values "spire-server").experimental).enabled | toString) "true") (eq (((index .Values "spire-agent").experimental).enabled | toString) "true") }} Warning: You're using an experimental config. Functionality of this release and future upgrades aren't guaranteed to work smoothly. {{- end }}