Skip to content

Commit

Permalink
Add label support to the data-pvc
Browse files Browse the repository at this point in the history
Longhorn uses labels to find volumes to backup, plus having labels makes sense anyway
Add values field for data-dir labels
Add data-pvc labels field to README
Bump Chart version number to 2.0.2
  • Loading branch information
ohnoitsyou committed Oct 24, 2024
1 parent f60af0b commit b95324e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/factorio-server-charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 2.0.1
version: 2.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
1 change: 1 addition & 0 deletions charts/factorio-server-charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ If you do run into any issues with mods, I will try to work with you on finding
| `persistence.dataDir.existingClaim` | The name of an existing PVC to use for persistence | |
| `persistence.storageClassName` | Persistent Volume storage class | `""` |
| `persistence.annotations` | Persistent Volume Claim annotations | `{}` |
| `persistence.lables` | Persistent Volume Claim labels | `{}` |
### Factorio Parameters
Expand Down
3 changes: 3 additions & 0 deletions charts/factorio-server-charts/templates/datadir-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ metadata:
name: {{ template "factorio-server-charts.fullname" . }}-datadir
labels:
app: "{{ template "factorio-server-charts.fullname" . }}-{{ .Chart.Version }}"
{{- if .Values.persistence.labels }}
{{ toYaml .Values.persistence.labels | indent 4 }}
{{- end }}
{{- if .Values.persistence.annotations }}
annotations:
{{ toYaml .Values.persistence.annotations | indent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/factorio-server-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ affinity: {}
## @extra persistence.dataDir.existingClaim The name of an existing PVC to use for persistence
## @param persistence.storageClassName Persistent Volume storage class
## @param persistence.annotations Persistent Volume Claim annotations
## @param persistence.labels Persistent Volume Claim labels
## Sets the data persistence volume configuration
## IMPORTANT: If you do not setup a PV all your savegames will be lost on pod recreation or helm upgrade
persistence:
Expand All @@ -118,6 +119,8 @@ persistence:
storageClassName: ""
## If you have annotations to spin up a PV i.e. the location. Remove the curly braces
annotations: {}
## If you have additional labels to apply to the volume
labels: {}


#### Factorio application configuration ####
Expand Down

0 comments on commit b95324e

Please sign in to comment.