Update spire-ha-agent (#936)
* Update spire-ha-agent Signed-off-by: Kevin Fox <[email protected]> * Update spire-ha-agent Signed-off-by: Kevin Fox <[email protected]> * Update with new features Signed-off-by: Kevin Fox <[email protected]> * Updates Signed-off-by: Kevin Fox <[email protected]> * Point at release Signed-off-by: Kevin Fox <[email protected]> * Fix version Signed-off-by: Kevin Fox <[email protected]> --------- Signed-off-by: Kevin Fox <[email protected]> Co-authored-by: Faisal Memon <[email protected]>
This commit is contained in:
@@ -3,7 +3,7 @@ name: spire-ha-agent
|
|||||||
description: A Helm chart to install the SPIRE HA agent.
|
description: A Helm chart to install the SPIRE HA agent.
|
||||||
type: application
|
type: application
|
||||||
version: 0.3.1
|
version: 0.3.1
|
||||||
appVersion: "0.4.0"
|
appVersion: "0.5.0"
|
||||||
keywords: ["spiffe", "spire-ha-agent"]
|
keywords: ["spiffe", "spire-ha-agent"]
|
||||||
home: https://github.com/spiffe/helm-charts-hardened/tree/main/charts/spire-ha-agent
|
home: https://github.com/spiffe/helm-charts-hardened/tree/main/charts/spire-ha-agent
|
||||||
sources:
|
sources:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# spire-ha-agent
|
# spire-ha-agent
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
A Helm chart to install the SPIRE HA agent.
|
A Helm chart to install the SPIRE HA agent.
|
||||||
|
|
||||||
@@ -24,67 +24,86 @@ A Helm chart to install the SPIRE HA agent.
|
|||||||
|
|
||||||
### Chart parameters
|
### Chart parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
|
||||||
| `image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `image.repository` | The repository within the registry | `spiffe/spire-ha-agent` |
|
| `image.repository` | The repository within the registry | `spiffe/spire-ha-agent` |
|
||||||
| `image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
||||||
| `mode` | If the spire-ha-agent will run in delegated or broker mode | `delegated` |
|
| `mode` | If the spire-ha-agent will run in delegated or broker mode | `delegated` |
|
||||||
| `singleSocket` | If in singleSocket mode, only one driver is used | `false` |
|
| `trustDomain` | The trust domain to be used for the SPIFFE identifiers | `example.org` |
|
||||||
| `sockets.single.admin.hostPath` | Where the admin socket is on disk when in single socket mode | `/var/run/spire/agent/sockets/main/csi.spiffe.io/admin` |
|
| `singleSocket` | If in singleSocket mode, only one driver is used | `false` |
|
||||||
| `sockets.a.admin.hostPath` | Where the a admin socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/admin` |
|
| `sockets.single.admin.hostPath` | Where the admin socket is on disk when in single socket mode | `/var/run/spire/agent/sockets/main/csi.spiffe.io/admin` |
|
||||||
| `sockets.b.admin.hostPath` | Where the b admin sockets is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/admin` |
|
| `sockets.a.admin.hostPath` | Where the a admin socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/admin` |
|
||||||
| `sockets.single.broker.hostPath` | Where the broker socket is on disk when in single socket mode | `/var/run/spire/agent/sockets/main/csi.spiffe.io/broker` |
|
| `sockets.b.admin.hostPath` | Where the b admin sockets is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/admin` |
|
||||||
| `sockets.a.broker.hostPath` | Where the a broker socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/broker` |
|
| `sockets.single.broker.hostPath` | Where the broker socket is on disk when in single socket mode | `/var/run/spire/agent/sockets/main/csi.spiffe.io/broker` |
|
||||||
| `sockets.b.broker.hostPath` | Where the b broker socket is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/broker` |
|
| `sockets.a.broker.hostPath` | Where the a broker socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/broker` |
|
||||||
| `sockets.single.workload.hostPath` | Where the broker socket is on disk when in single socket mode | `/var/run/spire/agent-sockets` |
|
| `sockets.b.broker.hostPath` | Where the b broker socket is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/broker` |
|
||||||
| `sockets.a.workload.hostPath` | Where the a workload socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/public` |
|
| `sockets.single.workload.hostPath` | Where the broker socket is on disk when in single socket mode | `/var/run/spire/agent-sockets` |
|
||||||
| `sockets.b.workload.hostPath` | Where the b workload socket is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/public` |
|
| `sockets.a.workload.hostPath` | Where the a workload socket is on disk | `/var/run/spire/agent/sockets/a/csi.spiffe.io/public` |
|
||||||
| `vsock` | Use a vsockets to expose the service rather then a unix socket | `false` |
|
| `sockets.b.workload.hostPath` | Where the b workload socket is on disk | `/var/run/spire/agent/sockets/b/csi.spiffe.io/public` |
|
||||||
| `port` | Port number to listen on | `999` |
|
| `vsock` | Use a vsockets to expose the service rather then a unix socket | `false` |
|
||||||
| `imagePullSecrets` | Pull secrets for images | `[]` |
|
| `port` | Port number to listen on | `999` |
|
||||||
| `nameOverride` | Name override | `""` |
|
| `brokerAPI.enabled` | Serve the SPIFFE Broker API to downstream consumers. Only supported when mode is broker. | `false` |
|
||||||
| `namespaceOverride` | Namespace override | `""` |
|
| `brokerAPI.socket.enabled` | Serve the broker api on a unix socket | `true` |
|
||||||
| `fullnameOverride` | Fullname override | `""` |
|
| `brokerAPI.socket.mountOnHost` | Make the served broker socket visible on the host, so consumers running in other pods on the node can reach it. When false the socket stays in an emptyDir, reachable only from this pod. | `true` |
|
||||||
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
|
| `brokerAPI.socket.hostPath` | Where the served broker socket is made available on the host when mountOnHost is true | `/run/spire/agent/sockets/csi.spiffe.io/broker` |
|
||||||
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
|
| `brokerAPI.tcp.enabled` | Serve the broker api over tcp | `false` |
|
||||||
| `serviceAccount.name` | The name of the service account to use. | `""` |
|
| `brokerAPI.tcp.bindAddress` | The tcp address to bind to | `0.0.0.0:8788` |
|
||||||
| `podAnnotations` | Annotations to add to pods | `{}` |
|
| `brokerAPI.brokers.spiffefs.enabled` | Enable spiffefs as a broker. This feature is experimental. | `false` |
|
||||||
| `podLabels` | Labels to add to pods | `{}` |
|
| `brokerAPI.brokers.spiffefs.idTemplate` | The default id template | `spiffe://{{ .TrustDomain }}/spiffefs` |
|
||||||
| `podSecurityContext` | Pod security context | `{}` |
|
| `brokerAPI.brokers.spiffefs.allowedReferenceTypes[0].typeURL` | The type of reference allowed | `type.googleapis.com/spiffe.broker.WorkloadPIDReference` |
|
||||||
| `securityContext` | Security context | `{}` |
|
| `brokerAPI.brokers.spiffefs.allowedReferenceTypes[0].allowOverTCP` | Allow access over TCP | `false` |
|
||||||
| `resources` | Resource requests and limits | `{}` |
|
| `upstreamKeepalive.time` | How often to ping an upstream broker to notice a connection that died silently. 0 disables. Do not lower below 5m: a spire-agent that does not configure a keepalive enforcement policy answers more frequent pings with GOAWAY too_many_pings and drops the connection. | `5m` |
|
||||||
| `nodeSelector` | Node selector | `{}` |
|
| `upstreamKeepalive.timeout` | How long to wait for a keepalive ping response before considering the connection dead | `20s` |
|
||||||
| `tolerations` | List of tolerations | `[]` |
|
| `telemetry.prometheus.enabled` | Flag to enable prometheus monitoring | `false` |
|
||||||
| `affinity` | Node affinity | `{}` |
|
| `telemetry.prometheus.port` | Port for prometheus metrics | `9988` |
|
||||||
| `updateStrategy.type` | The update strategy to use to replace existing DaemonSet pods with new pods. Can be RollingUpdate or OnDelete. | `RollingUpdate` |
|
| `telemetry.prometheus.host` | Host for prometheus metrics | `0.0.0.0` |
|
||||||
| `updateStrategy.rollingUpdate.maxUnavailable` | Max unavailable pods during update. Can be a number or a percentage. | `1` |
|
| `telemetry.prometheus.podMonitor.enabled` | Enable podMonitor for prometheus | `false` |
|
||||||
| `fsGroupFix.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
| `telemetry.prometheus.podMonitor.namespace` | Override where to install the podMonitor, if not set will use the same namespace as the spire-ha-agent | `""` |
|
||||||
| `fsGroupFix.image.repository` | The repository within the registry | `chainguard/bash` |
|
| `telemetry.prometheus.podMonitor.labels` | Pod labels to filter for prometheus monitoring | `{}` |
|
||||||
| `fsGroupFix.image.pullPolicy` | The image pull policy | `Always` |
|
| `imagePullSecrets` | Pull secrets for images | `[]` |
|
||||||
| `fsGroupFix.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:ea74a5487d6a76198fb651b48e953a01d13128c68ecf38df3d6e22307f0b93c1` |
|
| `nameOverride` | Name override | `""` |
|
||||||
| `fsGroupFix.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
| `namespaceOverride` | Namespace override | `""` |
|
||||||
| `cid2PID.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `fullnameOverride` | Fullname override | `""` |
|
||||||
| `cid2PID.image.repository` | The repository within the registry | `kfox1111/cid2pid` |
|
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
|
||||||
| `cid2PID.image.pullPolicy` | The image pull policy | `Always` |
|
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
|
||||||
| `cid2PID.image.tag` | Overrides the image tag whose default is the chart appVersion | `v0.0.3` |
|
| `serviceAccount.name` | The name of the service account to use. | `""` |
|
||||||
| `cid2PID.busybox.image.registry` | The OCI registry to pull the image from | `docker.io` |
|
| `podAnnotations` | Annotations to add to pods | `{}` |
|
||||||
| `cid2PID.busybox.image.repository` | The repository within the registry | `library/busybox` |
|
| `podLabels` | Labels to add to pods | `{}` |
|
||||||
| `cid2PID.busybox.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `podSecurityContext` | Pod security context | `{}` |
|
||||||
| `cid2PID.busybox.image.tag` | Overrides the image tag whose default is the chart appVersion | `1.36.1-uclibc` |
|
| `securityContext` | Security context | `{}` |
|
||||||
| `cid2PID.busybox.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
| `resources` | Resource requests and limits | `{}` |
|
||||||
| `socketPath` | The unix socket path to the spire-agent | `/run/spire/agent-sockets/spire-agent.sock` |
|
| `nodeSelector` | Node selector | `{}` |
|
||||||
| `socketAlternate.names` | List of alternate names for the socket that workloads might expect to be able to access in the driver mount. | `["socket","spire-agent.sock","api.sock"]` |
|
| `tolerations` | List of tolerations | `[]` |
|
||||||
| `socketAlternate.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
| `affinity` | Node affinity | `{}` |
|
||||||
| `socketAlternate.image.repository` | The repository within the registry | `chainguard/bash` |
|
| `updateStrategy.type` | The update strategy to use to replace existing DaemonSet pods with new pods. Can be RollingUpdate or OnDelete. | `RollingUpdate` |
|
||||||
| `socketAlternate.image.pullPolicy` | The image pull policy | `Always` |
|
| `updateStrategy.rollingUpdate.maxUnavailable` | Max unavailable pods during update. Can be a number or a percentage. | `1` |
|
||||||
| `socketAlternate.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:ea74a5487d6a76198fb651b48e953a01d13128c68ecf38df3d6e22307f0b93c1` |
|
| `fsGroupFix.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
||||||
| `socketAlternate.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
| `fsGroupFix.image.repository` | The repository within the registry | `chainguard/bash` |
|
||||||
| `priorityClassName` | Priority class assigned to daemonset pods. Can be auto set with global.recommendations.priorityClassName. | `""` |
|
| `fsGroupFix.image.pullPolicy` | The image pull policy | `Always` |
|
||||||
| `extraEnvVars` | Extra environment variables to be added to the Spire Agent container | `[]` |
|
| `fsGroupFix.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:ea74a5487d6a76198fb651b48e953a01d13128c68ecf38df3d6e22307f0b93c1` |
|
||||||
| `extraVolumes` | Extra volumes to be mounted on Spire Agent pods | `[]` |
|
| `fsGroupFix.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
||||||
| `extraVolumeMounts` | Extra volume mounts for Spire Agent pods | `[]` |
|
| `cid2PID.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `extraContainers` | Additional containers to create with Spire Agent pods | `[]` |
|
| `cid2PID.image.repository` | The repository within the registry | `kfox1111/cid2pid` |
|
||||||
| `initContainers` | Additional init containers to create with Spire Agent pods | `[]` |
|
| `cid2PID.image.pullPolicy` | The image pull policy | `Always` |
|
||||||
| `hostAliases` | Customize /etc/hosts file as described here https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ | `[]` |
|
| `cid2PID.image.tag` | Overrides the image tag whose default is the chart appVersion | `v0.0.3` |
|
||||||
|
| `cid2PID.busybox.image.registry` | The OCI registry to pull the image from | `docker.io` |
|
||||||
|
| `cid2PID.busybox.image.repository` | The repository within the registry | `library/busybox` |
|
||||||
|
| `cid2PID.busybox.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
|
| `cid2PID.busybox.image.tag` | Overrides the image tag whose default is the chart appVersion | `1.36.1-uclibc` |
|
||||||
|
| `cid2PID.busybox.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
||||||
|
| `socketPath` | The unix socket path to the spire-agent | `/run/spire/agent-sockets/spire-agent.sock` |
|
||||||
|
| `socketAlternate.names` | List of alternate names for the socket that workloads might expect to be able to access in the driver mount. | `["socket","spire-agent.sock","api.sock"]` |
|
||||||
|
| `socketAlternate.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
||||||
|
| `socketAlternate.image.repository` | The repository within the registry | `chainguard/bash` |
|
||||||
|
| `socketAlternate.image.pullPolicy` | The image pull policy | `Always` |
|
||||||
|
| `socketAlternate.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:ea74a5487d6a76198fb651b48e953a01d13128c68ecf38df3d6e22307f0b93c1` |
|
||||||
|
| `socketAlternate.resources` | Specify resource needs as per https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | `{}` |
|
||||||
|
| `priorityClassName` | Priority class assigned to daemonset pods. Can be auto set with global.recommendations.priorityClassName. | `""` |
|
||||||
|
| `extraEnvVars` | Extra environment variables to be added to the Spire Agent container | `[]` |
|
||||||
|
| `extraVolumes` | Extra volumes to be mounted on Spire Agent pods | `[]` |
|
||||||
|
| `extraVolumeMounts` | Extra volume mounts for Spire Agent pods | `[]` |
|
||||||
|
| `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/ | `[]` |
|
||||||
|
|||||||
@@ -110,6 +110,15 @@ Create the name of the service account to use
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Whether prometheus metrics are on.
|
||||||
|
*/}}
|
||||||
|
{{- define "spire-ha-agent.prometheus-enabled" -}}
|
||||||
|
{{- if or (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) (and (dig "spire" "recommendations" "enabled" false .Values.global) (dig "spire" "recommendations" "prometheus" true .Values.global)) }}
|
||||||
|
{{- printf "true" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- define "spire-ha-agent.socket-path" -}}
|
{{- define "spire-ha-agent.socket-path" -}}
|
||||||
{{- print .Values.socketPath }}
|
{{- print .Values.socketPath }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
{{- define "spire-ha-agent.check-config-values" -}}
|
||||||
|
{{- if not (has .Values.mode (list "delegated" "broker")) }}
|
||||||
|
{{- fail (printf "mode must be one of [delegated, broker], got: %s" .Values.mode) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.brokerAPI.enabled }}
|
||||||
|
{{- if ne .Values.mode "broker" }}
|
||||||
|
{{- fail "brokerAPI.enabled is true but mode is not broker. The served broker api is only available in broker mode." }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and (not .Values.brokerAPI.socket.enabled) (not .Values.brokerAPI.tcp.enabled) }}
|
||||||
|
{{- fail "brokerAPI.enabled is true but neither brokerAPI.socket.enabled nor brokerAPI.tcp.enabled is set. At least one listener is required." }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $enabledBrokers := 0 }}
|
||||||
|
{{- range $name, $value := .Values.brokerAPI.brokers }}
|
||||||
|
{{- if or (not (hasKey $value "enabled")) $value.enabled }}
|
||||||
|
{{- $enabledBrokers = add1 $enabledBrokers }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq $enabledBrokers 0 }}
|
||||||
|
{{- fail "brokerAPI.enabled is true but no entry in brokerAPI.brokers is enabled. Only listed brokers may connect, so at least one is required." }}
|
||||||
|
{{- end }}
|
||||||
|
{{- include "spire-lib.check-strict-mode" (list . "trustDomain must be set when brokerAPI is enabled, as broker ids are derived from it" (eq (include "spire-lib.trust-domain" .) "example.org")) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
The agent reads this config as YAML, so it is emitted directly rather than
|
||||||
|
going through spire-lib.reformat-and-yaml2json. That helper exists to hand
|
||||||
|
spire an HCL-compatible JSON document and to reshape its plugins dict into
|
||||||
|
lists; neither applies here.
|
||||||
|
*/}}
|
||||||
|
{{- define "spire-ha-agent.yaml-config" -}}
|
||||||
|
{{- $trustDomain := include "spire-lib.trust-domain" . | trim -}}
|
||||||
|
single: {{ eq .Values.singleSocket true }}
|
||||||
|
{{- if .Values.vsock }}
|
||||||
|
vsock:
|
||||||
|
enabled: true
|
||||||
|
port: {{ .Values.port }}
|
||||||
|
{{- else }}
|
||||||
|
socket: /tmp/spire-ha-agent/public/spire-agent.sock
|
||||||
|
{{- end }}
|
||||||
|
upstream_a:
|
||||||
|
broker_address: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/broker/broker.sock
|
||||||
|
workload_socket: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/public/spire-agent.sock
|
||||||
|
{{- if not .Values.singleSocket }}
|
||||||
|
upstream_b:
|
||||||
|
broker_address: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/broker/broker.sock
|
||||||
|
workload_socket: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/public/spire-agent.sock
|
||||||
|
{{- end }}
|
||||||
|
upstream_keepalive:
|
||||||
|
time: {{ .Values.upstreamKeepalive.time | quote }}
|
||||||
|
timeout: {{ .Values.upstreamKeepalive.timeout | quote }}
|
||||||
|
{{- if include "spire-ha-agent.prometheus-enabled" . }}
|
||||||
|
metrics:
|
||||||
|
bind_address: {{ printf "%s:%v" .Values.telemetry.prometheus.host .Values.telemetry.prometheus.port | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.brokerAPI.enabled }}
|
||||||
|
broker_endpoint:
|
||||||
|
{{- /* Deliberately not under the workload api socket directory: the agent
|
||||||
|
rejects a socket_path that shares a directory with it. */}}
|
||||||
|
{{- if .Values.brokerAPI.socket.enabled }}
|
||||||
|
socket_path: /tmp/spire-ha-agent/broker/broker.sock
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.brokerAPI.tcp.enabled }}
|
||||||
|
bind_address: {{ .Values.brokerAPI.tcp.bindAddress | quote }}
|
||||||
|
{{- end }}
|
||||||
|
brokers:
|
||||||
|
{{- range $name, $value := .Values.brokerAPI.brokers }}
|
||||||
|
{{- if or (not (hasKey $value "enabled")) $value.enabled }}
|
||||||
|
- id: {{ tpl $value.idTemplate (dict "TrustDomain" $trustDomain) | quote }}
|
||||||
|
allowed_reference_types:
|
||||||
|
{{- range $value.allowedReferenceTypes }}
|
||||||
|
- type_url: {{ .typeURL | quote }}
|
||||||
|
allow_over_tcp: {{ eq .allowOverTCP true }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- /* Validation runs for every mode: two of its checks exist precisely to
|
||||||
|
catch a mode that is not broker. */}}
|
||||||
|
{{- include "spire-ha-agent.check-config-values" . }}
|
||||||
|
{{- if eq .Values.mode "broker" }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spire-ha-agent.fullname" . | quote }}
|
||||||
|
namespace: {{ include "spire-ha-agent.namespace" . | quote }}
|
||||||
|
labels:
|
||||||
|
{{- include "spire-ha-agent.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
config.yaml: |
|
||||||
|
{{- include "spire-ha-agent.yaml-config" . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
{{- $mainSecurityContext := deepCopy .Values.securityContext }}
|
{{- $mainSecurityContext := deepCopy .Values.securityContext }}
|
||||||
{{- $socketAlternateNames := index (include "spire-ha-agent.socket-alternate-names" . | fromYaml) "names" }}
|
{{- $socketAlternateNames := index (include "spire-ha-agent.socket-alternate-names" . | fromYaml) "names" }}
|
||||||
{{- $socketPath := include "spire-ha-agent.socket-path" . }}
|
{{- $socketPath := include "spire-ha-agent.socket-path" . }}
|
||||||
|
{{- $configSum := (include (print $.Template.BasePath "/configmap.yaml") . | sha256sum) }}
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
@@ -30,6 +31,12 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kubectl.kubernetes.io/default-container: spire-ha-agent
|
kubectl.kubernetes.io/default-container: spire-ha-agent
|
||||||
|
{{- if eq .Values.mode "broker" }}
|
||||||
|
checksum/config: {{ $configSum | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "spire-ha-agent.selectorLabels" . | nindent 8 }}
|
{{- include "spire-ha-agent.selectorLabels" . | nindent 8 }}
|
||||||
app.kubernetes.io/component: spire-ha-agent
|
app.kubernetes.io/component: spire-ha-agent
|
||||||
@@ -122,53 +129,51 @@ spec:
|
|||||||
args:
|
args:
|
||||||
- "-mode"
|
- "-mode"
|
||||||
- {{ .Values.mode | quote }}
|
- {{ .Values.mode | quote }}
|
||||||
|
{{- if eq .Values.mode "broker" }}
|
||||||
|
- "-config"
|
||||||
|
- "/opt/spire-ha-agent/conf/config.yaml"
|
||||||
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
#FIXME read permission to api socket
|
#FIXME read permission to api socket
|
||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
runAsGroup: 0
|
runAsGroup: 0
|
||||||
#{- $mainSecurityContext | toYaml | nindent 12 }}
|
#{- $mainSecurityContext | toYaml | nindent 12 }}
|
||||||
|
{{- /* Broker mode is configured entirely by the rendered config
|
||||||
|
file, so it has nothing to put here unless the user supplied
|
||||||
|
extraEnvVars. Emitting a bare env: would render env: null. */}}
|
||||||
|
{{- if or (eq .Values.mode "delegated") (gt (len .Values.extraEnvVars) 0) }}
|
||||||
env:
|
env:
|
||||||
|
{{- if eq .Values.mode "delegated" }}
|
||||||
- name: SPIRE_HA_AGENT_SOCK
|
- name: SPIRE_HA_AGENT_SOCK
|
||||||
value: /tmp/spire-ha-agent/public/spire-agent.sock
|
value: /tmp/spire-ha-agent/public/spire-agent.sock
|
||||||
{{- if .Values.singleSocket }}
|
{{- if .Values.singleSocket }}
|
||||||
- name: SPIRE_HA_AGENT_SINGLE
|
- name: SPIRE_HA_AGENT_SINGLE
|
||||||
value: enabled
|
value: enabled
|
||||||
{{- if eq .Values.mode "delegated" }}
|
|
||||||
- name: SPIRE_HA_AGENT_SOCKET
|
- name: SPIRE_HA_AGENT_SOCKET
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/admin/admin.sock
|
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/admin/admin.sock
|
||||||
{{- else }}
|
{{- else }}
|
||||||
- name: SPIRE_HA_AGENT_BROKER
|
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/broker/broker.sock
|
|
||||||
- name: SPIRE_HA_AGENT_WORKLOAD_SOCKET
|
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/public/spire-agent.sock
|
|
||||||
{{- end }}
|
|
||||||
{{- else }}
|
|
||||||
{{- if eq .Values.mode "delegated" }}
|
|
||||||
- name: SPIRE_HA_AGENT_SOCKET_A
|
- name: SPIRE_HA_AGENT_SOCKET_A
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/admin/admin.sock
|
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/admin/admin.sock
|
||||||
- name: SPIRE_HA_AGENT_SOCKET_B
|
- name: SPIRE_HA_AGENT_SOCKET_B
|
||||||
value: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/admin/admin.sock
|
value: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/admin/admin.sock
|
||||||
{{- else }}
|
{{- end }}
|
||||||
- name: SPIRE_HA_AGENT_BROKER_A
|
{{- if .Values.vsock }}
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/broker/broker.sock
|
|
||||||
- name: SPIRE_HA_AGENT_BROKER_B
|
|
||||||
value: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/broker/broker.sock
|
|
||||||
- name: SPIRE_HA_AGENT_WORKLOAD_SOCKET_A
|
|
||||||
value: unix:///var/run/spire/agent/sockets/a/csi.spiffe.io/public/spire-agent.sock
|
|
||||||
- name: SPIRE_HA_AGENT_WORKLOAD_SOCKET_B
|
|
||||||
value: unix:///var/run/spire/agent/sockets/b/csi.spiffe.io/public/spire-agent.sock
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- if .Values.vsock }}
|
|
||||||
- name: SPIRE_HA_AGENT_VSOCK
|
- name: SPIRE_HA_AGENT_VSOCK
|
||||||
value: enabled
|
value: enabled
|
||||||
- name: SPIRE_HA_AGENT_PORT
|
- name: SPIRE_HA_AGENT_PORT
|
||||||
value: {{ .Values.port | quote }}
|
value: {{ .Values.port | quote }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.extraEnvVars }}
|
{{- with .Values.extraEnvVars }}
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if include "spire-ha-agent.prometheus-enabled" . }}
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.telemetry.prometheus.port }}
|
||||||
|
name: prom
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
# - name: spire-ha-agent-persistence
|
# - name: spire-ha-agent-persistence
|
||||||
# mountPath: /var/lib/spire
|
# mountPath: /var/lib/spire
|
||||||
@@ -201,6 +206,18 @@ spec:
|
|||||||
mountPath: /var/run/spire/agent/sockets/b/csi.spiffe.io/public
|
mountPath: /var/run/spire/agent/sockets/b/csi.spiffe.io/public
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .Values.mode "broker" }}
|
||||||
|
- name: spire-ha-agent-config
|
||||||
|
mountPath: /opt/spire-ha-agent/conf
|
||||||
|
readOnly: true
|
||||||
|
{{- if .Values.brokerAPI.enabled }}
|
||||||
|
{{- if .Values.brokerAPI.socket.enabled }}
|
||||||
|
- name: spire-ha-agent-broker-socket-dir
|
||||||
|
mountPath: /tmp/spire-ha-agent/broker
|
||||||
|
readOnly: false
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
- name: dev
|
- name: dev
|
||||||
mountPath: /dev
|
mountPath: /dev
|
||||||
{{- if gt (len .Values.extraVolumeMounts) 0 }}
|
{{- if gt (len .Values.extraVolumeMounts) 0 }}
|
||||||
@@ -261,6 +278,22 @@ spec:
|
|||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if eq .Values.mode "broker" }}
|
||||||
|
- name: spire-ha-agent-config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "spire-ha-agent.fullname" . | quote }}
|
||||||
|
{{- if and .Values.brokerAPI.enabled .Values.brokerAPI.socket.enabled }}
|
||||||
|
{{- if .Values.brokerAPI.socket.mountOnHost }}
|
||||||
|
- name: spire-ha-agent-broker-socket-dir
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.brokerAPI.socket.hostPath | quote }}
|
||||||
|
type: DirectoryOrCreate
|
||||||
|
{{- else }}
|
||||||
|
- name: spire-ha-agent-broker-socket-dir
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
- name: dev
|
- name: dev
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /dev
|
path: /dev
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
{{- if (dig "telemetry" "prometheus" "podMonitor" "enabled" .Values.telemetry.prometheus.podMonitor.enabled .Values.global) }}
|
||||||
|
{{- $namespace := include "spire-ha-agent.podMonitor.namespace" . }}
|
||||||
|
{{- $podNamespace := ( include "spire-ha-agent.namespace" . ) }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PodMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ include "spire-ha-agent.fullname" . }}
|
||||||
|
namespace: {{ $namespace | quote }}
|
||||||
|
labels:
|
||||||
|
{{- include "spire-ha-agent.labels" . | nindent 4 }}
|
||||||
|
{{- if ne (len (dig "telemetry" "prometheus" "podMonitor" "labels" (dict) .Values.global)) 0 }}
|
||||||
|
{{- .Values.global.telemetry.prometheus.podMonitor.labels | toYaml | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.telemetry.prometheus.podMonitor.labels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "spire-ha-agent.selectorLabels" . | nindent 6 }}
|
||||||
|
podMetricsEndpoints:
|
||||||
|
- port: prom
|
||||||
|
{{- if ne $namespace $podNamespace }}
|
||||||
|
namespaceSelector:
|
||||||
|
kubernetes.io/metadata.name: {{ $podNamespace | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -20,6 +20,9 @@ image:
|
|||||||
## @param mode If the spire-ha-agent will run in delegated or broker mode
|
## @param mode If the spire-ha-agent will run in delegated or broker mode
|
||||||
mode: delegated
|
mode: delegated
|
||||||
|
|
||||||
|
## @param trustDomain The trust domain to be used for the SPIFFE identifiers
|
||||||
|
trustDomain: example.org
|
||||||
|
|
||||||
## @param singleSocket If in singleSocket mode, only one driver is used
|
## @param singleSocket If in singleSocket mode, only one driver is used
|
||||||
singleSocket: false
|
singleSocket: false
|
||||||
|
|
||||||
@@ -61,6 +64,58 @@ vsock: false
|
|||||||
## @param port Port number to listen on
|
## @param port Port number to listen on
|
||||||
port: 999
|
port: 999
|
||||||
|
|
||||||
|
brokerAPI:
|
||||||
|
## @param brokerAPI.enabled Serve the SPIFFE Broker API to downstream consumers. Only supported when mode is broker.
|
||||||
|
enabled: false
|
||||||
|
socket:
|
||||||
|
## @param brokerAPI.socket.enabled Serve the broker api on a unix socket
|
||||||
|
enabled: true
|
||||||
|
## @param brokerAPI.socket.mountOnHost Make the served broker socket visible on the host, so consumers running in other pods on the node can reach it. When false the socket stays in an emptyDir, reachable only from this pod.
|
||||||
|
mountOnHost: true
|
||||||
|
## @param brokerAPI.socket.hostPath Where the served broker socket is made available on the host when mountOnHost is true
|
||||||
|
hostPath: /run/spire/agent/sockets/csi.spiffe.io/broker
|
||||||
|
tcp:
|
||||||
|
## @param brokerAPI.tcp.enabled Serve the broker api over tcp
|
||||||
|
enabled: false
|
||||||
|
## @param brokerAPI.tcp.bindAddress The tcp address to bind to
|
||||||
|
bindAddress: 0.0.0.0:8788
|
||||||
|
## Brokers allowed to use the served broker api, keyed by name. At least one
|
||||||
|
## must be enabled when brokerAPI.enabled is true. Add your own alongside
|
||||||
|
## these following the same shape.
|
||||||
|
brokers:
|
||||||
|
spiffefs:
|
||||||
|
## @param brokerAPI.brokers.spiffefs.enabled Enable spiffefs as a broker. This feature is experimental.
|
||||||
|
enabled: false
|
||||||
|
## @param brokerAPI.brokers.spiffefs.idTemplate The default id template
|
||||||
|
idTemplate: spiffe://{{ .TrustDomain }}/spiffefs
|
||||||
|
allowedReferenceTypes:
|
||||||
|
## @param brokerAPI.brokers.spiffefs.allowedReferenceTypes[0].typeURL The type of reference allowed
|
||||||
|
## @param brokerAPI.brokers.spiffefs.allowedReferenceTypes[0].allowOverTCP Allow access over TCP
|
||||||
|
- typeURL: "type.googleapis.com/spiffe.broker.WorkloadPIDReference"
|
||||||
|
allowOverTCP: false
|
||||||
|
|
||||||
|
upstreamKeepalive:
|
||||||
|
## @param upstreamKeepalive.time How often to ping an upstream broker to notice a connection that died silently. 0 disables. Do not lower below 5m: a spire-agent that does not configure a keepalive enforcement policy answers more frequent pings with GOAWAY too_many_pings and drops the connection.
|
||||||
|
time: 5m
|
||||||
|
## @param upstreamKeepalive.timeout How long to wait for a keepalive ping response before considering the connection dead
|
||||||
|
timeout: 20s
|
||||||
|
|
||||||
|
telemetry:
|
||||||
|
prometheus:
|
||||||
|
## @param telemetry.prometheus.enabled Flag to enable prometheus monitoring
|
||||||
|
enabled: false
|
||||||
|
## @param telemetry.prometheus.port Port for prometheus metrics
|
||||||
|
port: 9988
|
||||||
|
## @param telemetry.prometheus.host Host for prometheus metrics
|
||||||
|
host: "0.0.0.0"
|
||||||
|
podMonitor:
|
||||||
|
## @param telemetry.prometheus.podMonitor.enabled Enable podMonitor for prometheus
|
||||||
|
enabled: false
|
||||||
|
## @param telemetry.prometheus.podMonitor.namespace Override where to install the podMonitor, if not set will use the same namespace as the spire-ha-agent
|
||||||
|
namespace: ""
|
||||||
|
## @param telemetry.prometheus.podMonitor.labels [object] Pod labels to filter for prometheus monitoring
|
||||||
|
labels: {}
|
||||||
|
|
||||||
## @param imagePullSecrets [array] Pull secrets for images
|
## @param imagePullSecrets [array] Pull secrets for images
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
|||||||
@@ -25,162 +25,163 @@ A Helm chart to install the SPIRE agent.
|
|||||||
|
|
||||||
### Chart parameters
|
### Chart parameters
|
||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||||
| `image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `image.repository` | The repository within the registry | `spiffe/spire-agent` |
|
| `image.repository` | The repository within the registry | `spiffe/spire-agent` |
|
||||||
| `image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
||||||
| `imagePullSecrets` | Pull secrets for images | `[]` |
|
| `imagePullSecrets` | Pull secrets for images | `[]` |
|
||||||
| `nameOverride` | Name override | `""` |
|
| `nameOverride` | Name override | `""` |
|
||||||
| `namespaceOverride` | Namespace override | `""` |
|
| `namespaceOverride` | Namespace override | `""` |
|
||||||
| `fullnameOverride` | Fullname override | `""` |
|
| `fullnameOverride` | Fullname override | `""` |
|
||||||
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
|
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
|
||||||
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
|
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
|
||||||
| `serviceAccount.name` | The name of the service account to use. | `""` |
|
| `serviceAccount.name` | The name of the service account to use. | `""` |
|
||||||
| `configMap.annotations` | Annotations to add to the SPIRE Agent ConfigMap | `{}` |
|
| `configMap.annotations` | Annotations to add to the SPIRE Agent ConfigMap | `{}` |
|
||||||
| `podAnnotations` | Annotations to add to pods | `{}` |
|
| `podAnnotations` | Annotations to add to pods | `{}` |
|
||||||
| `podLabels` | Labels to add to pods | `{}` |
|
| `podLabels` | Labels to add to pods | `{}` |
|
||||||
| `podSecurityContext` | Pod security context | `{}` |
|
| `podSecurityContext` | Pod security context | `{}` |
|
||||||
| `securityContext` | Security context | `{}` |
|
| `securityContext` | Security context | `{}` |
|
||||||
| `resources` | Resource requests and limits for the spire-agent container and all its initContainers | `{}` |
|
| `resources` | Resource requests and limits for the spire-agent container and all its initContainers | `{}` |
|
||||||
| `nodeSelector` | Node selector | `{}` |
|
| `nodeSelector` | Node selector | `{}` |
|
||||||
| `tolerations` | List of tolerations | `[]` |
|
| `tolerations` | List of tolerations | `[]` |
|
||||||
| `affinity` | Node affinity | `{}` |
|
| `affinity` | Node affinity | `{}` |
|
||||||
| `authorizedDelegates` | A list of the authorized delegates SPIFFE IDs. See Delegated Identity API for more information. | `[]` |
|
| `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` |
|
| `logLevel` | The log level, valid values are "debug", "info", "warn", and "error" | `info` |
|
||||||
| `logFormat` | The log format, valid values are "text" and "json" | `text` |
|
| `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` |
|
| `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` |
|
| `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 | `""` |
|
| `trustBundleURL` | If set, obtain trust bundle from url instead of Kubernetes ConfigMap | `""` |
|
||||||
| `trustBundleFormat` | If using trustBundleURL, what format is the url. Choices are "pem" and "spiffe" | `spiffe` |
|
| `trustBundleFormat` | If using trustBundleURL, what format is the url. Choices are "pem" and "spiffe" | `spiffe` |
|
||||||
| `trustBundleHostPath` | If set, obtain trust bundle from a file on the host instead of from the ConfigMap | `""` |
|
| `trustBundleHostPath` | If set, obtain trust bundle from a file on the host instead of from the ConfigMap | `""` |
|
||||||
| `bundleConfigMap` | Configmap name for Spire bundle | `spire-bundle` |
|
| `bundleConfigMap` | Configmap name for Spire bundle | `spire-bundle` |
|
||||||
| `availabilityTarget` | The minimum amount of time desired to gracefully handle SPIRE Server or Agent downtime. This configurable influences how aggressively X509 SVIDs should be rotated. If set, must be at least 24h. | `""` |
|
| `availabilityTarget` | The minimum amount of time desired to gracefully handle SPIRE Server or Agent downtime. This configurable influences how aggressively X509 SVIDs should be rotated. If set, must be at least 24h. | `""` |
|
||||||
| `rebootstrapMode` | How the agent will behave when seeing an unknown x509 cert from the server. It can be set to never, auto, or always | `always` |
|
| `rebootstrapMode` | How the agent will behave when seeing an unknown x509 cert from the server. It can be set to never, auto, or always | `always` |
|
||||||
| `rebootstrapDelay` | The agent will rebootstrap after configured amount of time on unknown x509 cert from the server | `10m` |
|
| `rebootstrapDelay` | The agent will rebootstrap after configured amount of time on unknown x509 cert from the server | `10m` |
|
||||||
| `server.address` | Address for Spire server | `""` |
|
| `server.address` | Address for Spire server | `""` |
|
||||||
| `server.port` | Port number for Spire server | `443` |
|
| `server.port` | Port number for Spire server | `443` |
|
||||||
| `server.namespaceOverride` | Override the namespace for Spire server | `""` |
|
| `server.namespaceOverride` | Override the namespace for Spire server | `""` |
|
||||||
| `server.nameOverride` | Override the name for Spire server. Should only be changed when building your own nested chart to ensure names align. | `""` |
|
| `server.nameOverride` | Override the name for Spire server. Should only be changed when building your own nested chart to ensure names align. | `""` |
|
||||||
| `healthChecks.port` | override the host port used for health checking | `9982` |
|
| `healthChecks.port` | override the host port used for health checking | `9982` |
|
||||||
| `updateStrategy.type` | The update strategy to use to replace existing DaemonSet pods with new pods. Can be RollingUpdate or OnDelete. | `RollingUpdate` |
|
| `updateStrategy.type` | The update strategy to use to replace existing DaemonSet pods with new pods. Can be RollingUpdate or OnDelete. | `RollingUpdate` |
|
||||||
| `updateStrategy.rollingUpdate.maxUnavailable` | Max unavailable pods during update. Can be a number or a percentage. | `1` |
|
| `updateStrategy.rollingUpdate.maxUnavailable` | Max unavailable pods during update. Can be a number or a percentage. | `1` |
|
||||||
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for probe | `15` |
|
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for probe | `15` |
|
||||||
| `livenessProbe.periodSeconds` | Period seconds for probe | `60` |
|
| `livenessProbe.periodSeconds` | Period seconds for probe | `60` |
|
||||||
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for probe | `10` |
|
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for probe | `10` |
|
||||||
| `readinessProbe.periodSeconds` | Period seconds for probe | `30` |
|
| `readinessProbe.periodSeconds` | Period seconds for probe | `30` |
|
||||||
| `fsGroupFix.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
| `fsGroupFix.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
||||||
| `fsGroupFix.image.repository` | The repository within the registry | `chainguard/bash` |
|
| `fsGroupFix.image.repository` | The repository within the registry | `chainguard/bash` |
|
||||||
| `fsGroupFix.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `fsGroupFix.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `fsGroupFix.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:90041f375e30f41aa7e0390075d8a69dc61900771d52fa98d63ee5d03d866a58` |
|
| `fsGroupFix.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:90041f375e30f41aa7e0390075d8a69dc61900771d52fa98d63ee5d03d866a58` |
|
||||||
| `keyManager.memory.enabled` | Enable the memory based Key Manager | `true` |
|
| `keyManager.memory.enabled` | Enable the memory based Key Manager | `true` |
|
||||||
| `keyManager.disk.enabled` | Enable the disk based Key Manager (must have persistence.type set to hostPath when enabled) | `false` |
|
| `keyManager.disk.enabled` | Enable the disk based Key Manager (must have persistence.type set to hostPath when enabled) | `false` |
|
||||||
| `keyManager.disk.mode` | Where to store the data. Supported options are hostPath and emptyDir | `hostPath` |
|
| `keyManager.disk.mode` | Where to store the data. Supported options are hostPath and emptyDir | `hostPath` |
|
||||||
| `nodeAttestor.k8sPSAT.enabled` | Enable PSAT k8s Node Attestor | `true` |
|
| `nodeAttestor.k8sPSAT.enabled` | Enable PSAT k8s Node Attestor | `true` |
|
||||||
| `nodeAttestor.httpChallenge.enabled` | Enable the http challenge Node Attestor | `false` |
|
| `nodeAttestor.httpChallenge.enabled` | Enable the http challenge Node Attestor | `false` |
|
||||||
| `nodeAttestor.httpChallenge.agentname` | Name of this agent. Useful if you have multiple agents bound to different spire servers on the same host and sharing the same port. | `default` |
|
| `nodeAttestor.httpChallenge.agentname` | Name of this agent. Useful if you have multiple agents bound to different spire servers on the same host and sharing the same port. | `default` |
|
||||||
| `nodeAttestor.httpChallenge.port` | The port to listen on. If 0, a random value will be used. | `0` |
|
| `nodeAttestor.httpChallenge.port` | The port to listen on. If 0, a random value will be used. | `0` |
|
||||||
| `nodeAttestor.httpChallenge.advertisedPort` | The port to tell the server to call back on. Set only if your using an http proxy on the hosts. If 0, will use the port setting. | `0` |
|
| `nodeAttestor.httpChallenge.advertisedPort` | The port to tell the server to call back on. Set only if your using an http proxy on the hosts. If 0, will use the port setting. | `0` |
|
||||||
| `nodeAttestor.tpmDirect.enabled` | Enable the direct TPM node attestor, a 3rd party plugin by Boxboat. This plugin is experimental. | `false` |
|
| `nodeAttestor.tpmDirect.enabled` | Enable the direct TPM node attestor, a 3rd party plugin by Boxboat. This plugin is experimental. | `false` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `nodeAttestor.tpmDirect.plugin.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.image.repository` | The repository within the registry | `spiffe/spire-tpm-plugin-tpm-attestor-agent` |
|
| `nodeAttestor.tpmDirect.plugin.image.repository` | The repository within the registry | `spiffe/spire-tpm-plugin-tpm-attestor-agent` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `nodeAttestor.tpmDirect.plugin.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.image.tag` | Overrides the image tag | `v1.9.0` |
|
| `nodeAttestor.tpmDirect.plugin.image.tag` | Overrides the image tag | `v1.9.0` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.checksum` | The sha256 checksum of the plugin binary | `22f67063f1699330e70cdedc9b923e517688f5ae71085a26bd9b83b3060ee86e` |
|
| `nodeAttestor.tpmDirect.plugin.checksum` | The sha256 checksum of the plugin binary | `22f67063f1699330e70cdedc9b923e517688f5ae71085a26bd9b83b3060ee86e` |
|
||||||
| `nodeAttestor.tpmDirect.plugin.path` | The filename in the container of the plugin | `/app/tpm_attestor_agent` |
|
| `nodeAttestor.tpmDirect.plugin.path` | The filename in the container of the plugin | `/app/tpm_attestor_agent` |
|
||||||
| `nodeAttestor.tpmDirect.pubHash.enabled` | Display pubhash in logs | `true` |
|
| `nodeAttestor.tpmDirect.pubHash.enabled` | Display pubhash in logs | `true` |
|
||||||
| `nodeAttestor.tpmDirect.pubHash.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `nodeAttestor.tpmDirect.pubHash.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `nodeAttestor.tpmDirect.pubHash.image.repository` | The repository within the registry | `spiffe/spire-tpm-plugin-get-tpm-pubhash` |
|
| `nodeAttestor.tpmDirect.pubHash.image.repository` | The repository within the registry | `spiffe/spire-tpm-plugin-get-tpm-pubhash` |
|
||||||
| `nodeAttestor.tpmDirect.pubHash.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `nodeAttestor.tpmDirect.pubHash.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `nodeAttestor.tpmDirect.pubHash.image.tag` | Overrides the image tag | `v1.9.0` |
|
| `nodeAttestor.tpmDirect.pubHash.image.tag` | Overrides the image tag | `v1.9.0` |
|
||||||
| `nodeAttestor.awsIID.enabled` | Enable the aws_iid Node Attestor | `false` |
|
| `nodeAttestor.awsIID.enabled` | Enable the aws_iid Node Attestor | `false` |
|
||||||
| `nodeAttestor.gcpIIT.enabled` | Enable the gcp_iit Node Attestor | `false` |
|
| `nodeAttestor.gcpIIT.enabled` | Enable the gcp_iit Node Attestor | `false` |
|
||||||
| `nodeAttestor.x509POP.enabled` | Enable the x509_pop Node Attestor | `false` |
|
| `nodeAttestor.x509POP.enabled` | Enable the x509_pop Node Attestor | `false` |
|
||||||
| `nodeAttestor.x509POP.mode` | Which mode to use. Currently only spiffe is supported | `spiffe` |
|
| `nodeAttestor.x509POP.mode` | Which mode to use. Currently only spiffe is supported | `spiffe` |
|
||||||
| `nodeAttestor.x509POP.spiffeEndpointSocket` | Where the socket is to use for mode spiffe | `/var/run/spiffe/socat/unix/k8s-spire-agent/public/api.sock` |
|
| `nodeAttestor.x509POP.spiffeEndpointSocket` | Where the socket is to use for mode spiffe | `/var/run/spiffe/socat/unix/k8s-spire-agent/public/api.sock` |
|
||||||
| `workloadAttestors.unix.enabled` | Enables the Unix workload attestor | `false` |
|
| `workloadAttestors.unix.enabled` | Enables the Unix workload attestor | `false` |
|
||||||
| `workloadAttestors.k8s.enabled` | Enables the Kubernetes workload attestor | `true` |
|
| `workloadAttestors.k8s.enabled` | Enables the Kubernetes workload attestor | `true` |
|
||||||
| `workloadAttestors.k8s.verification.type` | What kind of verification to do against kubelet. auto will first attempt to use hostCert, and then fall back to apiServerCA. Valid options are [auto, hostCert, apiServerCA, skip] | `skip` |
|
| `workloadAttestors.k8s.verification.type` | What kind of verification to do against kubelet. auto will first attempt to use hostCert, and then fall back to apiServerCA. Valid options are [auto, hostCert, apiServerCA, skip] | `skip` |
|
||||||
| `workloadAttestors.k8s.verification.hostCert.basePath` | Path where kubelet places its certificates | `/var/lib/kubelet/pki` |
|
| `workloadAttestors.k8s.verification.hostCert.basePath` | Path where kubelet places its certificates | `/var/lib/kubelet/pki` |
|
||||||
| `workloadAttestors.k8s.verification.hostCert.fileName` | File name where kubelet places its certificates. If blank, it will be auto detected. | `""` |
|
| `workloadAttestors.k8s.verification.hostCert.fileName` | File name where kubelet places its certificates. If blank, it will be auto detected. | `""` |
|
||||||
| `workloadAttestors.k8s.disableContainerSelectors` | Set to true if using holdApplicationUntilProxyStarts in Istio | `false` |
|
| `workloadAttestors.k8s.disableContainerSelectors` | Set to true if using holdApplicationUntilProxyStarts in Istio | `false` |
|
||||||
| `workloadAttestors.k8s.useNewContainerLocator` | If true, enables the new container locator algorithm that has support for cgroups v2. Defaults to true | `true` |
|
| `workloadAttestors.k8s.useNewContainerLocator` | If true, enables the new container locator algorithm that has support for cgroups v2. Defaults to true | `true` |
|
||||||
| `workloadAttestors.k8s.verboseContainerLocatorLogs` | If true, enables verbose logging of mountinfo and cgroup information used to locate containers. Defaults to false | `false` |
|
| `workloadAttestors.k8s.verboseContainerLocatorLogs` | If true, enables verbose logging of mountinfo and cgroup information used to locate containers. Defaults to false | `false` |
|
||||||
| `workloadAttestors.k8s.brokerAPI.accessPolicy` | Which access policy to use. Supported values: enforced, permissive | `enforced` |
|
| `workloadAttestors.k8s.brokerAPI.accessPolicy` | Which access policy to use. Supported values: auto, enforced, permissive. auto uses permissive while all broker access is node local, and enforced otherwise. | `auto` |
|
||||||
| `workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.enabled` | Enables the broker api | `false` |
|
| `workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.enabled` | Enables the broker api | `false` |
|
||||||
| `dynamicRegistration.enabled` | Deploys the sidecar helper for dynamic registration | `false` |
|
| `workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.impersonation.clusterWidePodsOnly` | Grant this broker the impersonate-via-spire verb on pods cluster wide. auto grants it when the resolved accessPolicy is enforced. | `auto` |
|
||||||
| `dynamicRegistration.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
| `dynamicRegistration.enabled` | Deploys the sidecar helper for dynamic registration | `false` |
|
||||||
| `dynamicRegistration.image.repository` | The repository within the registry | `spiffe/spire-controller-manager-dynamic-registration/spire-controller-manager-dynamic-registration-agent` |
|
| `dynamicRegistration.image.registry` | The OCI registry to pull the image from | `ghcr.io` |
|
||||||
| `dynamicRegistration.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `dynamicRegistration.image.repository` | The repository within the registry | `spiffe/spire-controller-manager-dynamic-registration/spire-controller-manager-dynamic-registration-agent` |
|
||||||
| `dynamicRegistration.image.tag` | Overrides the image tag to be whatever you need it to be. It will always be the flag you set without modifications | `0.1.0` |
|
| `dynamicRegistration.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `dynamicRegistration.audience` | The audience to get the k8s psat for | `spire-controller-manager-dynamic-registration` |
|
| `dynamicRegistration.image.tag` | Overrides the image tag to be whatever you need it to be. It will always be the flag you set without modifications | `0.1.0` |
|
||||||
| `dynamicRegistration.serverSPIFFEID` | Expected SPIFFE ID of the server. If blank, it will use a sane default. | `""` |
|
| `dynamicRegistration.audience` | The audience to get the k8s psat for | `spire-controller-manager-dynamic-registration` |
|
||||||
| `dynamicRegistration.address` | Address for Spire server | `""` |
|
| `dynamicRegistration.serverSPIFFEID` | Expected SPIFFE ID of the server. If blank, it will use a sane default. | `""` |
|
||||||
| `dynamicRegistration.nameOverride` | Override the name for Spire server. Should only be changed when building your own nested chart to ensure names align. | `""` |
|
| `dynamicRegistration.address` | Address for Spire server | `""` |
|
||||||
| `dynamicRegistration.securityContext` | Security context | `{}` |
|
| `dynamicRegistration.nameOverride` | Override the name for Spire server. Should only be changed when building your own nested chart to ensure names align. | `""` |
|
||||||
| `sds.enabled` | Enables Envoy SDS configuration | `false` |
|
| `dynamicRegistration.securityContext` | Security context | `{}` |
|
||||||
| `sds.defaultSVIDName` | The TLS Certificate resource name to use for the default X509-SVID with Envoy SDS | `default` |
|
| `sds.enabled` | Enables Envoy SDS configuration | `false` |
|
||||||
| `sds.defaultBundleName` | The Validation Context resource name to use for the default X.509 bundle with Envoy SDS | `ROOTCA` |
|
| `sds.defaultSVIDName` | The TLS Certificate resource name to use for the default X509-SVID with Envoy SDS | `default` |
|
||||||
| `sds.defaultAllBundlesName` | The Validation Context resource name to use for all bundles (including federated) with Envoy SDS | `ALL` |
|
| `sds.defaultBundleName` | The Validation Context resource name to use for the default X.509 bundle with Envoy SDS | `ROOTCA` |
|
||||||
| `sds.disableSPIFFECertValidation` | Disable Envoy SDS custom validation | `false` |
|
| `sds.defaultAllBundlesName` | The Validation Context resource name to use for all bundles (including federated) with Envoy SDS | `ALL` |
|
||||||
| `telemetry.prometheus.enabled` | Flag to enable prometheus monitoring | `false` |
|
| `sds.disableSPIFFECertValidation` | Disable Envoy SDS custom validation | `false` |
|
||||||
| `telemetry.prometheus.port` | Port for prometheus metrics | `9988` |
|
| `telemetry.prometheus.enabled` | Flag to enable prometheus monitoring | `false` |
|
||||||
| `telemetry.prometheus.host` | Host for prometheus metrics | `0.0.0.0` |
|
| `telemetry.prometheus.port` | Port for prometheus metrics | `9988` |
|
||||||
| `telemetry.prometheus.podMonitor.enabled` | Enable podMonitor for prometheus | `false` |
|
| `telemetry.prometheus.host` | Host for prometheus metrics | `0.0.0.0` |
|
||||||
| `telemetry.prometheus.podMonitor.namespace` | Override where to install the podMonitor, if not set will use the same namespace as the spire-agent | `""` |
|
| `telemetry.prometheus.podMonitor.enabled` | Enable podMonitor for prometheus | `false` |
|
||||||
| `telemetry.prometheus.podMonitor.labels` | Pod labels to filter for prometheus monitoring | `{}` |
|
| `telemetry.prometheus.podMonitor.namespace` | Override where to install the podMonitor, if not set will use the same namespace as the spire-agent | `""` |
|
||||||
| `telemetry.datadog.enabled` | Flag to enable datadog monitoring | `false` |
|
| `telemetry.prometheus.podMonitor.labels` | Pod labels to filter for prometheus monitoring | `{}` |
|
||||||
| `telemetry.datadog.address` | The address of the datadog service to send metrics to. The default URL for services are `<service-name>.<namespace>.svc` | `datadog.kube-system.svc` |
|
| `telemetry.datadog.enabled` | Flag to enable datadog monitoring | `false` |
|
||||||
| `telemetry.datadog.port` | The port of the datadog service to send metrics to | `8125` |
|
| `telemetry.datadog.address` | The address of the datadog service to send metrics to. The default URL for services are `<service-name>.<namespace>.svc` | `datadog.kube-system.svc` |
|
||||||
| `kubeletConnectByHostname` | (DEPRECATED) Use kubeletAddress.mode instead. If true, connect to kubelet using the nodes hostname. If false, uses localhost. If unset, defaults to true on OpenShift and false otherwise. | `""` |
|
| `telemetry.datadog.port` | The port of the datadog service to send metrics to | `8125` |
|
||||||
| `kubeletAddress.mode` | How to connect to kubelet for workload attestation | `auto` |
|
| `kubeletConnectByHostname` | (DEPRECATED) Use kubeletAddress.mode instead. If true, connect to kubelet using the nodes hostname. If false, uses localhost. If unset, defaults to true on OpenShift and false otherwise. | `""` |
|
||||||
| `hostNetwork` | Enable hostNetwork for the DaemonSet. If auto or empty, auto-disables when kubeletAddress.mode is hostname/hostip. Set true/false to override. | `""` |
|
| `kubeletAddress.mode` | How to connect to kubelet for workload attestation | `auto` |
|
||||||
| `dnsPolicy` | DNS policy for the DaemonSet. If empty, uses ClusterFirstWithHostNet when hostNetwork is enabled. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy | `""` |
|
| `hostNetwork` | Enable hostNetwork for the DaemonSet. If auto or empty, auto-disables when kubeletAddress.mode is hostname/hostip. Set true/false to override. | `""` |
|
||||||
| `socketPath` | The unix socket path to the spire-agent | `/run/spire/agent-sockets/spire-agent.sock` |
|
| `dnsPolicy` | DNS policy for the DaemonSet. If empty, uses ClusterFirstWithHostNet when hostNetwork is enabled. See https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy | `""` |
|
||||||
| `socketAlternate.names` | List of alternate names for the socket that workloads might expect to be able to access in the driver mount. | `["socket","spire-agent.sock","api.sock"]` |
|
| `socketPath` | The unix socket path to the spire-agent | `/run/spire/agent-sockets/spire-agent.sock` |
|
||||||
| `socketAlternate.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
| `socketAlternate.names` | List of alternate names for the socket that workloads might expect to be able to access in the driver mount. | `["socket","spire-agent.sock","api.sock"]` |
|
||||||
| `socketAlternate.image.repository` | The repository within the registry | `chainguard/bash` |
|
| `socketAlternate.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
||||||
| `socketAlternate.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `socketAlternate.image.repository` | The repository within the registry | `chainguard/bash` |
|
||||||
| `socketAlternate.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:90041f375e30f41aa7e0390075d8a69dc61900771d52fa98d63ee5d03d866a58` |
|
| `socketAlternate.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `hostCert.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
| `socketAlternate.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:90041f375e30f41aa7e0390075d8a69dc61900771d52fa98d63ee5d03d866a58` |
|
||||||
| `hostCert.image.repository` | The repository within the registry | `chainguard/min-toolkit-debug` |
|
| `hostCert.image.registry` | The OCI registry to pull the image from | `cgr.dev` |
|
||||||
| `hostCert.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `hostCert.image.repository` | The repository within the registry | `chainguard/min-toolkit-debug` |
|
||||||
| `hostCert.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:9e45e6836c28489a6e57ca1210ec66927e88eca2409e403616a1278e210e86c9` |
|
| `hostCert.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `priorityClassName` | Priority class assigned to daemonset pods. Can be auto set with global.recommendations.priorityClassName. | `""` |
|
| `hostCert.image.tag` | Overrides the image tag whose default is the chart appVersion | `latest@sha256:9e45e6836c28489a6e57ca1210ec66927e88eca2409e403616a1278e210e86c9` |
|
||||||
| `extraEnvVars` | Extra environment variables to be added to the Spire Agent container and init containers | `[]` |
|
| `priorityClassName` | Priority class assigned to daemonset pods. Can be auto set with global.recommendations.priorityClassName. | `""` |
|
||||||
| `extraVolumes` | Extra volumes to be mounted on Spire Agent pods | `[]` |
|
| `extraEnvVars` | Extra environment variables to be added to the Spire Agent container and init containers | `[]` |
|
||||||
| `extraVolumeMounts` | Extra volume mounts for Spire Agent pods | `[]` |
|
| `extraVolumes` | Extra volumes to be mounted on Spire Agent pods | `[]` |
|
||||||
| `extraContainers` | Additional containers to create with Spire Agent pods | `[]` |
|
| `extraVolumeMounts` | Extra volume mounts for Spire Agent pods | `[]` |
|
||||||
| `initContainers` | Additional init containers to create with Spire Agent pods | `[]` |
|
| `extraContainers` | Additional 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/ | `[]` |
|
| `initContainers` | Additional init containers to create with Spire Agent pods | `[]` |
|
||||||
| `customPlugins.keyManager` | Custom plugins of type KeyManager are configured here | `{}` |
|
| `hostAliases` | Customize /etc/hosts file as described here https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/ | `[]` |
|
||||||
| `customPlugins.nodeAttestor` | Custom plugins of type NodeAttestor are configured here | `{}` |
|
| `customPlugins.keyManager` | Custom plugins of type KeyManager are configured here | `{}` |
|
||||||
| `customPlugins.svidStore` | Custom plugins of type SVIDStore are configured here | `{}` |
|
| `customPlugins.nodeAttestor` | Custom plugins of type NodeAttestor are configured here | `{}` |
|
||||||
| `customPlugins.workloadAttestor` | Custom plugins of type WorkloadAttestor are configured here | `{}` |
|
| `customPlugins.svidStore` | Custom plugins of type SVIDStore are configured here | `{}` |
|
||||||
| `experimental.enabled` | Allow configuration of experimental features | `false` |
|
| `customPlugins.workloadAttestor` | Custom plugins of type WorkloadAttestor are configured here | `{}` |
|
||||||
| `experimental.syncInterval` | Sync interval with SPIRE server with exponential backoff | `5s` |
|
| `experimental.enabled` | Allow configuration of experimental features | `false` |
|
||||||
| `experimental.requirePQKEM` | Require use of a post-quantum-safe key exchange method for TLS handshakes. | `false` |
|
| `experimental.syncInterval` | Sync interval with SPIRE server with exponential backoff | `5s` |
|
||||||
| `experimental.featureFlags` | List of developer feature flags | `[]` |
|
| `experimental.requirePQKEM` | Require use of a post-quantum-safe key exchange method for TLS handshakes. | `false` |
|
||||||
| `agents` | Configure multiple agent DaemonSets. Useful when you have different node types and nodeAttestors | `{}` |
|
| `experimental.featureFlags` | List of developer feature flags | `[]` |
|
||||||
| `tools.kubectl.image.registry` | The OCI registry to pull the image from | `registry.k8s.io` |
|
| `agents` | Configure multiple agent DaemonSets. Useful when you have different node types and nodeAttestors | `{}` |
|
||||||
| `tools.kubectl.image.repository` | The repository within the registry | `kubectl` |
|
| `tools.kubectl.image.registry` | The OCI registry to pull the image from | `registry.k8s.io` |
|
||||||
| `tools.kubectl.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `tools.kubectl.image.repository` | The repository within the registry | `kubectl` |
|
||||||
| `tools.kubectl.image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
| `tools.kubectl.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `tools.busybox.image.registry` | The OCI registry to pull the image from | `""` |
|
| `tools.kubectl.image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
|
||||||
| `tools.busybox.image.repository` | The repository within the registry | `busybox` |
|
| `tools.busybox.image.registry` | The OCI registry to pull the image from | `""` |
|
||||||
| `tools.busybox.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
| `tools.busybox.image.repository` | The repository within the registry | `busybox` |
|
||||||
| `tools.busybox.image.tag` | Overrides the image tag whose default is the chart appVersion | `1.37.0-uclibc` |
|
| `tools.busybox.image.pullPolicy` | The image pull policy | `IfNotPresent` |
|
||||||
| `sockets.hostBasePath` | Path on which the agent socket is made available when admin.mountOnHost is true | `/run/spire/agent/sockets` |
|
| `tools.busybox.image.tag` | Overrides the image tag whose default is the chart appVersion | `1.37.0-uclibc` |
|
||||||
| `sockets.admin.enabled` | Enable the admin socket. Useful for admin tasks or the Delegated Identity API. | `false` |
|
| `sockets.hostBasePath` | Path on which the agent socket is made available when admin.mountOnHost is true | `/run/spire/agent/sockets` |
|
||||||
| `sockets.admin.mountOnHost` | Enable the admin socket to be visible on the host. | `false` |
|
| `sockets.admin.enabled` | Enable the admin socket. Useful for admin tasks or the Delegated Identity API. | `false` |
|
||||||
| `sockets.broker.enabled` | Enable the broker socket. | `false` |
|
| `sockets.admin.mountOnHost` | Enable the admin socket to be visible on the host. | `false` |
|
||||||
| `sockets.broker.mountOnHost` | Enable the broker socket to be visible on the host. | `false` |
|
| `sockets.broker.enabled` | Enable the broker socket. | `false` |
|
||||||
| `persistence.type` | What type of volume to use for persistence. Valid options emptyDir (reattestable node attestors) or hostPath (nonr-reattestable node attestors) | `emptyDir` |
|
| `sockets.broker.mountOnHost` | Enable the broker socket to be visible on the host. | `false` |
|
||||||
| `persistence.hostPath` | Which path to use on the host when persistence.type = hostPath | `/var/lib/spire/k8s/agent` |
|
| `persistence.type` | What type of volume to use for persistence. Valid options emptyDir (reattestable node attestors) or hostPath (nonr-reattestable node attestors) | `emptyDir` |
|
||||||
| `brokerAPI.tcp.enabled` | Enable the broker api endpoint | `false` |
|
| `persistence.hostPath` | Which path to use on the host when persistence.type = hostPath | `/var/lib/spire/k8s/agent` |
|
||||||
| `brokerAPI.tcp.bindAddress` | The tcp address to bind to | `0.0.0.0:8788` |
|
| `brokerAPI.tcp.enabled` | Enable the broker api endpoint | `false` |
|
||||||
| `brokerAPI.brokers.spire-ha-agent.enabled` | Enable the spire-ha-agent | `false` |
|
| `brokerAPI.tcp.bindAddress` | The tcp address to bind to | `0.0.0.0:8788` |
|
||||||
| `brokerAPI.brokers.spire-ha-agent.idTemplate` | The default id template | `spiffe://{{ .TrustDomain }}/spire-ha-agent` |
|
| `brokerAPI.brokers.spire-ha-agent.enabled` | Enable the spire-ha-agent | `false` |
|
||||||
| `brokerAPI.brokers.spire-ha-agent.allowedReferenceTypes[0].typeURL` | The type of reference allowed | `type.googleapis.com/spiffe.broker.WorkloadPIDReference` |
|
| `brokerAPI.brokers.spire-ha-agent.idTemplate` | The default id template | `spiffe://{{ .TrustDomain }}/spire-ha-agent` |
|
||||||
| `brokerAPI.brokers.spire-ha-agent.allowedReferenceTypes[0].allowOverTCP` | Allow access over TCP | `false` |
|
| `brokerAPI.brokers.spire-ha-agent.allowedReferenceTypes[0].typeURL` | The type of reference allowed | `type.googleapis.com/spiffe.broker.WorkloadPIDReference` |
|
||||||
|
| `brokerAPI.brokers.spire-ha-agent.allowedReferenceTypes[0].allowOverTCP` | Allow access over TCP | `false` |
|
||||||
|
|||||||
@@ -199,3 +199,49 @@ Kept for backward compatibility
|
|||||||
names:
|
names:
|
||||||
{{ $l | toYaml }}
|
{{ $l | toYaml }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Resolve workloadAttestors.k8s.brokerAPI.accessPolicy to one of the two values
|
||||||
|
spire itself accepts. "auto" picks permissive only when every enabled broker is
|
||||||
|
confined to references that cannot name anything off this node, and enforced
|
||||||
|
otherwise -- including for anything unrecognized, so it fails closed.
|
||||||
|
|
||||||
|
The enforced triggers, in order below: a cluster pod reference scope, which lets
|
||||||
|
a pod reference fall through to the apiserver; an absent or empty
|
||||||
|
allowedReferenceTypes, which is the case spire treats as "no policy" and leaves
|
||||||
|
every reference type open over unix; any reference type other than a pid; and
|
||||||
|
any type reachable over tcp. The types are looked up with dig rather than index
|
||||||
|
so a broker missing from brokerAPI.brokers resolves to enforced instead of
|
||||||
|
erroring.
|
||||||
|
*/}}
|
||||||
|
{{- define "spire-agent.broker-access-policy" -}}
|
||||||
|
{{- $configured := .Values.workloadAttestors.k8s.brokerAPI.accessPolicy | toString }}
|
||||||
|
{{- if and (ne $configured "auto") (ne $configured "") }}
|
||||||
|
{{- if not (has $configured (list "enforced" "permissive")) }}
|
||||||
|
{{- fail (printf "workloadAttestors.k8s.brokerAPI.accessPolicy must be one of [auto, enforced, permissive], got: %s" $configured) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $configured }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $policy := "permissive" }}
|
||||||
|
{{- range $key, $value := .Values.workloadAttestors.k8s.brokerAPI.brokers }}
|
||||||
|
{{- if or (not (hasKey $value "enabled")) $value.enabled }}
|
||||||
|
{{- if eq (dig "podReferenceScope" "" $value | toString) "cluster" }}
|
||||||
|
{{- $policy = "enforced" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $types := dig $key "allowedReferenceTypes" (list) $.Values.brokerAPI.brokers }}
|
||||||
|
{{- if not $types }}
|
||||||
|
{{- $policy = "enforced" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $types }}
|
||||||
|
{{- if ne (.typeURL | toString) "type.googleapis.com/spiffe.broker.WorkloadPIDReference" }}
|
||||||
|
{{- $policy = "enforced" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq (.allowOverTCP | toString) "true" }}
|
||||||
|
{{- $policy = "enforced" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $policy }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ plugins:
|
|||||||
{{- if or .Values.sockets.broker.enabled .Values.brokerAPI.tcp.enabled }}
|
{{- if or .Values.sockets.broker.enabled .Values.brokerAPI.tcp.enabled }}
|
||||||
experimental:
|
experimental:
|
||||||
broker:
|
broker:
|
||||||
access_policy: {{ .Values.workloadAttestors.k8s.brokerAPI.accessPolicy | quote }}
|
access_policy: {{ include "spire-agent.broker-access-policy" . | quote }}
|
||||||
brokers:
|
brokers:
|
||||||
{{- range $key, $value := .Values.workloadAttestors.k8s.brokerAPI.brokers }}
|
{{- range $key, $value := .Values.workloadAttestors.k8s.brokerAPI.brokers }}
|
||||||
{{- if or (not (hasKey $value "enabled")) $value.enabled }}
|
{{- if or (not (hasKey $value "enabled")) $value.enabled }}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
{{- $brokerEndpoint := or .Values.sockets.broker.enabled .Values.brokerAPI.tcp.enabled }}
|
||||||
|
{{- $enforced := and $brokerEndpoint (eq (include "spire-agent.broker-access-policy" .) "enforced") }}
|
||||||
# Required cluster role to allow spire-agent to query k8s API server
|
# Required cluster role to allow spire-agent to query k8s API server
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
@@ -10,6 +12,14 @@ rules:
|
|||||||
- nodes
|
- nodes
|
||||||
- nodes/proxy
|
- nodes/proxy
|
||||||
verbs: ["get"]
|
verbs: ["get"]
|
||||||
|
{{- if $enforced }}
|
||||||
|
{{- /* The enforced broker access policy asks the cluster's authorizer whether
|
||||||
|
a broker may speak for the pod it named, which the agent does by
|
||||||
|
creating a SubjectAccessReview on its behalf. */}}
|
||||||
|
- apiGroups: ["authorization.k8s.io"]
|
||||||
|
resources: ["subjectaccessreviews"]
|
||||||
|
verbs: ["create"]
|
||||||
|
{{- end }}
|
||||||
---
|
---
|
||||||
# Binds above cluster role to spire-agent service account
|
# Binds above cluster role to spire-agent service account
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
@@ -24,3 +34,48 @@ roleRef:
|
|||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
name: {{ include "spire-agent.fullname" . | quote }}
|
name: {{ include "spire-agent.fullname" . | quote }}
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
|
||||||
|
{{- if $enforced }}
|
||||||
|
{{- $trustDomain := include "spire-lib.trust-domain" . }}
|
||||||
|
{{- range $key, $value := .Values.workloadAttestors.k8s.brokerAPI.brokers }}
|
||||||
|
{{- /* Defaulting to false, not auto, is deliberate: a broker someone adds
|
||||||
|
themselves gets no grant unless they ask for one. */}}
|
||||||
|
{{- $imp := dig "impersonation" "clusterWidePodsOnly" false $value | toString }}
|
||||||
|
{{- $grant := ternary $enforced (eq $imp "true") (eq $imp "auto") }}
|
||||||
|
{{- if and (or (not (hasKey $value "enabled")) $value.enabled) $grant }}
|
||||||
|
{{- $idTemplate := (index $.Values.brokerAPI.brokers $key).idTemplate }}
|
||||||
|
{{- if hasKey $value "idTemplate" }}
|
||||||
|
{{- $idTemplate = $value.idTemplate }}
|
||||||
|
{{- end }}
|
||||||
|
{{- $name := printf "%s-broker-impersonation-%s" (include "spire-agent.fullname" $) $key | trunc 63 | trimSuffix "-" }}
|
||||||
|
---
|
||||||
|
# What the SubjectAccessReview above asks about for this broker. The review
|
||||||
|
# names the broker's SPIFFE ID as the user, so the grant is bound to that name
|
||||||
|
# rather than to any service account. A pair per broker, because a future grant
|
||||||
|
# covering more than pods needs rules of its own.
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ $name | quote }}
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs: ["impersonate-via-spire"]
|
||||||
|
---
|
||||||
|
# Cluster wide: a broker serves whatever pods land on its node, so the set of
|
||||||
|
# namespaces is not known ahead of time.
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ $name | quote }}
|
||||||
|
subjects:
|
||||||
|
- kind: User
|
||||||
|
name: {{ tpl $idTemplate (dict "TrustDomain" $trustDomain) | quote }}
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
roleRef:
|
||||||
|
kind: ClusterRole
|
||||||
|
name: {{ $name | quote }}
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -253,12 +253,15 @@ workloadAttestors:
|
|||||||
## @param workloadAttestors.k8s.verboseContainerLocatorLogs If true, enables verbose logging of mountinfo and cgroup information used to locate containers. Defaults to false
|
## @param workloadAttestors.k8s.verboseContainerLocatorLogs If true, enables verbose logging of mountinfo and cgroup information used to locate containers. Defaults to false
|
||||||
verboseContainerLocatorLogs: false
|
verboseContainerLocatorLogs: false
|
||||||
brokerAPI:
|
brokerAPI:
|
||||||
## @param workloadAttestors.k8s.brokerAPI.accessPolicy Which access policy to use. Supported values: enforced, permissive
|
## @param workloadAttestors.k8s.brokerAPI.accessPolicy Which access policy to use. Supported values: auto, enforced, permissive. auto uses permissive while all broker access is node local, and enforced otherwise.
|
||||||
accessPolicy: enforced
|
accessPolicy: auto
|
||||||
brokers:
|
brokers:
|
||||||
spire-ha-agent:
|
spire-ha-agent:
|
||||||
## @param workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.enabled Enables the broker api
|
## @param workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.enabled Enables the broker api
|
||||||
enabled: false
|
enabled: false
|
||||||
|
impersonation:
|
||||||
|
## @param workloadAttestors.k8s.brokerAPI.brokers.spire-ha-agent.impersonation.clusterWidePodsOnly Grant this broker the impersonate-via-spire verb on pods cluster wide. auto grants it when the resolved accessPolicy is enforced.
|
||||||
|
clusterWidePodsOnly: auto
|
||||||
# idTemplate: spiffe://{{ .TrustDomain }}/spire-ha-agent
|
# idTemplate: spiffe://{{ .TrustDomain }}/spire-ha-agent
|
||||||
# podReferenceScope: agent_node
|
# podReferenceScope: agent_node
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user