From bb876121408725a4a84e1f42b51014ff35946104 Mon Sep 17 00:00:00 2001 From: Nikolai <141064611+nikotih@users.noreply.github.com> Date: Sat, 13 Sep 2025 20:44:17 +0200 Subject: [PATCH] Spire agent helm chart: allow configuring logFormat (#661) * Spire agent helm chart: allow configuring logFormat Signed-off-by: Nikolai Tihhomirov <141064611+nikotih@users.noreply.github.com> * Fixup: wrong doc parameter Signed-off-by: Nikolai Tihhomirov <141064611+nikotih@users.noreply.github.com> --------- Signed-off-by: Nikolai Tihhomirov <141064611+nikotih@users.noreply.github.com> Co-authored-by: kfox1111 --- charts/spire/charts/spire-agent/README.md | 1 + charts/spire/charts/spire-agent/templates/configmap.yaml | 1 + charts/spire/charts/spire-agent/values.yaml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/charts/spire/charts/spire-agent/README.md b/charts/spire/charts/spire-agent/README.md index e71df02..8ba237d 100644 --- a/charts/spire/charts/spire-agent/README.md +++ b/charts/spire/charts/spire-agent/README.md @@ -49,6 +49,7 @@ A Helm chart to install the SPIRE agent. | `affinity` | Node affinity | `{}` | | `authorizedDelegates` | A list of the authorized delegates SPIFFE IDs. See Delegated Identity API for more information. | `[]` | | `logLevel` | The log level, valid values are "debug", "info", "warn", and "error" | `info` | +| `logFormat` | The log format, valid values are "text" and "json" | `text` | | `clusterName` | The name of the Kubernetes cluster (`kubeadm init --service-dns-domain`) | `example-cluster` | | `trustDomain` | The trust domain to be used for the SPIFFE identifiers | `example.org` | | `trustBundleURL` | If set, obtain trust bundle from url instead of Kubernetes ConfigMap | `""` | diff --git a/charts/spire/charts/spire-agent/templates/configmap.yaml b/charts/spire/charts/spire-agent/templates/configmap.yaml index 0956072..e8b0b21 100644 --- a/charts/spire/charts/spire-agent/templates/configmap.yaml +++ b/charts/spire/charts/spire-agent/templates/configmap.yaml @@ -37,6 +37,7 @@ agent: {{- end }} data_dir: "/var/lib/spire" log_level: {{ .Values.logLevel | quote }} + log_format: {{ .Values.logFormat | quote }} retry_bootstrap: true server_address: {{ include "spire-agent.server-address" . | trim | quote }} server_port: {{ .Values.server.port | quote }} diff --git a/charts/spire/charts/spire-agent/values.yaml b/charts/spire/charts/spire-agent/values.yaml index f01871f..13a74c0 100644 --- a/charts/spire/charts/spire-agent/values.yaml +++ b/charts/spire/charts/spire-agent/values.yaml @@ -87,6 +87,8 @@ affinity: {} authorizedDelegates: [] ## @param logLevel The log level, valid values are "debug", "info", "warn", and "error" logLevel: info +## @param logFormat The log format, valid values are "text" and "json" +logFormat: text ## @param clusterName The name of the Kubernetes cluster (`kubeadm init --service-dns-domain`) clusterName: example-cluster ## @param trustDomain The trust domain to be used for the SPIFFE identifiers