Add global for storageClass (#307)

When you have multiple spire servers, they often all need to be
configured to use the same storage class. Let them all be set
to the same value all at once.

Signed-off-by: Kevin Fox <[email protected]>
Co-authored-by: Faisal Memon <[email protected]>
This commit is contained in:
kfox1111
2024-04-02 23:28:55 +00:00
committed by GitHub
co-authored by Faisal Memon
parent 0b99a7258f
commit fafed66866
3 changed files with 12 additions and 6 deletions
+4 -3
View File
@@ -40,10 +40,10 @@ global:
commonName: example.org
```
2. If you need a non default storageClass, append the following to the spire-server section and update:
2. If you need a non default storageClass, append the following to the global.spire section and update:
```
persistence:
storageClass: your-storage-class
persistence:
storageClass: your-storage-class
```
3. If your Kubernetes cluster is OpenShift based, use the output of the following command to update the trustDomain setting:
@@ -219,6 +219,7 @@ Now you can interact with the Spire agent socket from your own application. The
| `global.spire.caSubject.country` | Country for Spire server CA | `""` |
| `global.spire.caSubject.organization` | Organization for Spire server CA | `""` |
| `global.spire.caSubject.commonName` | Common Name for Spire server CA | `""` |
| `global.spire.persistence.storageClass` | What storage class to use for persistence | `nil` |
| `global.spire.recommendations.enabled` | Use recommended settings for production deployments. Default is off. | `false` |
| `global.spire.recommendations.namespaceLayout` | Set to true to use recommended values for installing across namespaces | `true` |
| `global.spire.recommendations.namespacePSS` | When chart namespace creation is enabled, label them with preffered Pod Security Standard labels | `true` |
@@ -509,7 +509,8 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- if .Values.persistence.storageClass }}
storageClassName: {{ .Values.persistence.storageClass }}
{{- $storageClass := (dig "spire" "persistence" "storageClass" nil .Values.global) | default .Values.persistence.storageClass }}
{{- if $storageClass }}
storageClassName: {{ $storageClass }}
{{- end }}
{{- end }}
+4
View File
@@ -29,6 +29,10 @@ global:
organization: ""
commonName: ""
persistence:
## @param global.spire.persistence.storageClass What storage class to use for persistence
storageClass: null
## @param global.spire.recommendations.enabled Use recommended settings for production deployments. Default is off.
## @param global.spire.recommendations.namespaceLayout Set to true to use recommended values for installing across namespaces
## @param global.spire.recommendations.namespacePSS When chart namespace creation is enabled, label them with preffered Pod Security Standard labels