Make the agent socket configurable (#114)

This commit is contained in:
kfox1111
2023-03-13 20:35:27 +01:00
committed by GitHub
parent f3a81ad78d
commit 661000a29a
13 changed files with 22 additions and 9 deletions
@@ -14,6 +14,7 @@ A Helm chart to install the SPIRE agent.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| agentSocketPath | string | `"/run/spire/agent-sockets/spire-agent.sock"` | |
| bundleConfigMap | string | `"spire-bundle"` | |
| clusterName | string | `"example-cluster"` | |
| extraContainers | list | `[]` | |
@@ -80,3 +80,7 @@ Create the name of the service account to use
{{ .Release.Name }}-server
{{- end }}
{{- end }}
{{- define "spire-agent.agent-socket-path" -}}
{{- print .Values.agentSocketPath }}
{{- end }}
@@ -10,7 +10,7 @@ data:
log_level = {{ .Values.logLevel | quote }}
server_address = {{ include "spire-agent.server-address" . | trim | quote }}
server_port = {{ .Values.server.port | quote }}
socket_path = {{ include "spire.agent-socket-path" . | quote }}
socket_path = {{ include "spire-agent.agent-socket-path" . | quote }}
trust_bundle_path = "/run/spire/bundle/bundle.crt"
trust_domain = {{ .Values.trustDomain | quote }}
}
@@ -66,7 +66,7 @@ spec:
mountPath: /run/spire/bundle
readOnly: true
- name: spire-agent-socket-dir
mountPath: {{ include "spire.agent-socket-path" . | dir }}
mountPath: {{ include "spire-agent.agent-socket-path" . | dir }}
readOnly: false
- name: spire-token
mountPath: /var/run/secrets/tokens
@@ -110,7 +110,7 @@ spec:
audience: spire-server
- name: spire-agent-socket-dir
hostPath:
path: {{ include "spire.agent-socket-path" . | dir }}
path: {{ include "spire-agent.agent-socket-path" . | dir }}
type: DirectoryOrCreate
{{- if gt (len .Values.extraVolumes) 0 }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
@@ -85,6 +85,8 @@ telemetry:
enabled: false
port: 9988
agentSocketPath: /run/spire/agent-sockets/spire-agent.sock
# -- Priority class assigned to daemonset pods
priorityClassName: ""