Make server service account allow list configurable
If you don't have the agent and server in the same namespace or the same cluster, or want to bind additional clusters, you need the ability to configure the service account allow list. Signed-off-by: Kevin Fox <[email protected]>
This commit is contained in:
@@ -62,6 +62,7 @@ A Helm chart to install the SPIRE server.
|
|||||||
| jwtIssuer | string | `"oidc-discovery.example.org"` | |
|
| jwtIssuer | string | `"oidc-discovery.example.org"` | |
|
||||||
| logLevel | string | `"info"` | |
|
| logLevel | string | `"info"` | |
|
||||||
| nameOverride | string | `""` | |
|
| nameOverride | string | `""` | |
|
||||||
|
| nodeAttestor.k8sPsat.serviceAccountsAllowed | list | `[]` | |
|
||||||
| nodeSelector | object | `{}` | |
|
| nodeSelector | object | `{}` | |
|
||||||
| podAnnotations | object | `{}` | |
|
| podAnnotations | object | `{}` | |
|
||||||
| podSecurityContext | object | `{}` | |
|
| podSecurityContext | object | `{}` | |
|
||||||
|
|||||||
@@ -92,3 +92,11 @@ Create the name of the service account to use
|
|||||||
{{- define "spire-k8s-workload-registrar.fullname" -}}
|
{{- define "spire-k8s-workload-registrar.fullname" -}}
|
||||||
{{ include "spire-server.fullname" . | trimSuffix "-server" }}-k8s-workload-registrar
|
{{ include "spire-server.fullname" . | trimSuffix "-server" }}-k8s-workload-registrar
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- define "spire-server.serviceAccountAllowedList" }}
|
||||||
|
{{- if ne (len .Values.nodeAttestor.k8sPsat.serviceAccountsAllowed) 0 }}
|
||||||
|
{{- .Values.nodeAttestor.k8sPsat.serviceAccountsAllowed | toJson }}
|
||||||
|
{{- else }}
|
||||||
|
[{{ printf "%s:%s-agent" .Release.Namespace .Release.Name | quote }}]
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ data:
|
|||||||
plugin_data {
|
plugin_data {
|
||||||
clusters = {
|
clusters = {
|
||||||
{{ .Values.clusterName | quote }} = {
|
{{ .Values.clusterName | quote }} = {
|
||||||
service_account_allow_list = ["{{ .Release.Namespace }}:{{ .Release.Name }}-agent"]
|
service_account_allow_list = {{ include "spire-server.serviceAccountAllowedList" . | trim }}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,3 +177,7 @@ extraVolumeMounts: []
|
|||||||
extraContainers: []
|
extraContainers: []
|
||||||
|
|
||||||
initContainers: []
|
initContainers: []
|
||||||
|
|
||||||
|
nodeAttestor:
|
||||||
|
k8sPsat:
|
||||||
|
serviceAccountsAllowed: []
|
||||||
|
|||||||
Reference in New Issue
Block a user