Skip to content

Commit

Permalink
Add extraEnvVars support for spiffe-csi-driver containers
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick O'Brien <[email protected]>
Signed-off-by: Patrick O’Brien <[email protected]>
  • Loading branch information
poblahblahblah committed Nov 15, 2024
1 parent dc30efb commit 1b6829f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/spire/charts/spiffe-csi-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ A Helm chart to install the SPIFFE CSI driver.
| `image.pullPolicy` | The image pull policy | `IfNotPresent` |
| `image.tag` | Overrides the image tag whose default is the chart appVersion | `""` |
| `resources` | Resource requests and limits for spiffe-csi-driver | `{}` |
| `extraEnvVars` | Extra environment variables to be added to the spiffe-csi-driver container | `[]` |
| `healthChecks.port` | The healthcheck port for spiffe-csi-driver | `9809` |
| `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` |
Expand Down Expand Up @@ -61,6 +62,7 @@ A Helm chart to install the SPIFFE CSI driver.
| `nodeDriverRegistrar.image.pullPolicy` | The image pull policy | `IfNotPresent` |
| `nodeDriverRegistrar.image.tag` | Overrides the image tag | `v2.9.4` |
| `nodeDriverRegistrar.resources` | Resource requests and limits for CSI driver pods | `{}` |
| `nodeDriverRegistrar.extraEnvVars` | Extra environment variables to be added to the nodeDriverRegistrar container | `[]` |
| `agentSocketPath` | The unix socket path to the spire-agent | `/run/spire/agent-sockets/spire-agent.sock` |
| `kubeletPath` | Path to kubelet file | `/var/lib/kubelet` |
| `priorityClassName` | Priority class assigned to daemonset pods. Can be auto set with global.recommendations.priorityClassName. | `""` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
# The volume containing the SPIRE agent socket. The SPIFFE CSI
# driver will mount this directory into containers.
Expand Down Expand Up @@ -123,6 +126,10 @@ spec:
"-kubelet-registration-path", "{{ .Values.kubeletPath }}/plugins/{{ .Values.pluginName }}/csi.sock",
"-health-port", "{{ .Values.healthChecks.port }}"
]
env:
{{- with .Values.nodeDriverRegistrar.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
# The registrar needs access to the SPIFFE CSI driver socket
- mountPath: /spiffe-csi
Expand Down
5 changes: 5 additions & 0 deletions charts/spire/charts/spiffe-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ resources: {}
# cpu: 100m
# memory: 64Mi

## @param extraEnvVars [array] Extra environment variables to be added to the spiffe-csi-driver container
extraEnvVars: []

healthChecks:
## @param healthChecks.port The healthcheck port for spiffe-csi-driver
port: 9809
Expand Down Expand Up @@ -136,6 +139,8 @@ nodeDriverRegistrar:
# limits:
# cpu: 100m
# memory: 64Mi
## @param nodeDriverRegistrar.extraEnvVars [array] Extra environment variables to be added to the nodeDriverRegistrar container
extraEnvVars: []

## @param agentSocketPath The unix socket path to the spire-agent
agentSocketPath: /run/spire/agent-sockets/spire-agent.sock
Expand Down

0 comments on commit 1b6829f

Please sign in to comment.