Make the agent socket configurable (#114)
This commit is contained in:
@@ -13,6 +13,7 @@ A Helm chart to install the SPIFFE CSI driver.
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| agentSocketPath | string | `"/run/spire/agent-sockets/spire-agent.sock"` | |
|
||||
| fullnameOverride | string | `""` | |
|
||||
| healthChecks.port | int | `9809` | |
|
||||
| image.pullPolicy | string | `"IfNotPresent"` | |
|
||||
|
||||
@@ -84,3 +84,7 @@ Create the name of the service account to use
|
||||
{{- printf "%s/%s" .image.registry .image.repository -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{- define "spiffe-csi-driver.agent-socket-path" -}}
|
||||
{{- print .Values.agentSocketPath }}
|
||||
{{- end }}
|
||||
|
||||
@@ -100,7 +100,7 @@ spec:
|
||||
volumes:
|
||||
- name: spire-agent-socket-dir
|
||||
hostPath:
|
||||
path: {{ include "spire.agent-socket-path" . | dir }}
|
||||
path: {{ include "spiffe-csi-driver.agent-socket-path" . | dir }}
|
||||
type: DirectoryOrCreate
|
||||
# This volume is where the socket for kubelet->driver communication lives
|
||||
- name: spiffe-csi-socket-dir
|
||||
|
||||
@@ -69,5 +69,7 @@ nodeDriverRegistrar:
|
||||
# cpu: 100m
|
||||
# memory: 64Mi
|
||||
|
||||
agentSocketPath: /run/spire/agent-sockets/spire-agent.sock
|
||||
|
||||
# -- Priority class assigned to daemonset pods
|
||||
priorityClassName: ""
|
||||
|
||||
@@ -15,6 +15,7 @@ A Helm chart to install the SPIFFE OIDC discovery provider.
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| affinity | object | `{}` | |
|
||||
| agentSocket | string | `"spire-agent.sock"` | |
|
||||
| autoscaling.enabled | bool | `false` | |
|
||||
| autoscaling.maxReplicas | int | `5` | |
|
||||
| autoscaling.minReplicas | int | `1` | |
|
||||
|
||||
@@ -30,7 +30,7 @@ data:
|
||||
{{- end }}
|
||||
|
||||
workload_api {
|
||||
socket_path = "/spiffe-workload-api/{{ include "spire.agent-socket-path" . | splitList "/" | last }}"
|
||||
socket_path = "/spiffe-workload-api/{{ .Values.agentSocket }}"
|
||||
trust_domain = "{{ .Values.trustDomain }}"
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
agentSocket: spire-agent.sock
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
|
||||
@@ -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: ""
|
||||
|
||||
|
||||
@@ -30,10 +30,6 @@ Create chart name and version as used by the chart label.
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "spire.agent-socket-path" -}}
|
||||
{{- print "/run/spire/agent-sockets/spire-agent.sock" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "spire.server-socket-path" -}}
|
||||
{{- print "/run/spire/server-sockets/spire-server.sock" }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user