existingClaim -> claimName

This commit is contained in:
pat-s 2023-07-12 18:22:17 +02:00
parent 47980bd845
commit fdc2adda14
No known key found for this signature in database
GPG key ID: 3C6318841EF78925
4 changed files with 12 additions and 8 deletions

View file

@ -367,7 +367,7 @@ If you want to manage your own PVC you can simply pass the PVC name to the chart
```yaml
persistence:
enabled: true
existingClaim: MyAwesomeGiteaClaim
claimName: MyAwesomeGiteaClaim
```
In case that persistence has been disabled it will simply use an empty dir volume.
@ -379,7 +379,7 @@ You can interact with the postgres settings as displayed in the following exampl
postgresql:
persistence:
enabled: true
existingClaim: MyAwesomeGiteaPostgresClaim
claimName: MyAwesomeGiteaPostgresClaim
```
### Admin User
@ -742,7 +742,7 @@ kubectl create secret generic gitea-themes --from-file={{FULL-PATH-TO-CSS}} --na
| `persistence.enabled` | Enable persistent storage | `true` |
| `persistence.create` | Whether to create the persistentVolumeClaim for shared storage | `true` |
| `persistence.mount` | Whether the persistentVolumeClaim should be mounted (even if not created) | `true` |
| `persistence.existingClaim` | Use an existing claim to store repository information | `nil` |
| `persistence.claimName` | Use an existing claim to store repository information | `nil` |
| `persistence.size` | Size for persistence to store repo information | `10Gi` |
| `persistence.accessModes` | AccessMode for persistence | `["ReadWriteOnce"]` |
| `persistence.labels` | Labels for the persistence volume claim to be created | `{}` |
@ -895,7 +895,7 @@ A RWX volume is required for installation aiming for HA.
### Transitioning from previous versions
- If you want to stay with a RWO PV and haven't used `persistence.existingClaim` before, you need to define it now with the name of your existing PVC.
- If you want to stay with a RWO PV and haven't used `persistence.claimName` before, you need to define it now with the name of your existing PVC.
Otherwise the chart will create a new PVC with an empty volume.
- If you want to switch to a RWX volume and go for HA, you need to backup the data stored under `/data`, let the chart create a new RWX PV and restore it to this location.
This can be done via

View file

@ -393,8 +393,8 @@ spec:
{{- if .Values.persistence.mount }}
- name: data
persistentVolumeClaim:
{{- if .Values.persistence.existingClaim }}
claimName: {{ .Values.persistence.existingClaim }}
{{- if .Values.persistence.claimName }}
claimName: {{ .Values.persistence.claimName }}
{{- else }}
claimName: {{default (print (include "gitea.fullname" .) "-shared-storage" ) }}
{{- end }}

View file

@ -2,7 +2,11 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
{{- if .Values.persistence.claimName }}
name: {{ .Values.persistence.claimName }}
{{- else }}
name: {{default (print (include "gitea.fullname" .) "-shared-storage" ) }}
{{- end }}
namespace: {{ $.Release.Namespace }}
annotations:
{{ .Values.persistence.annotations | toYaml | indent 4}}

View file

@ -245,7 +245,7 @@ serviceAccount:
## @param persistence.enabled Enable persistent storage
## @param persistence.create Whether to create the persistentVolumeClaim for shared storage
## @param persistence.mount Whether the persistentVolumeClaim should be mounted (even if not created)
## @param persistence.existingClaim Use an existing claim to store repository information
## @param persistence.claimName Use an existing claim to store repository information
## @param persistence.size Size for persistence to store repo information
## @param persistence.accessModes AccessMode for persistence
## @param persistence.labels Labels for the persistence volume claim to be created
@ -256,7 +256,7 @@ persistence:
enabled: true
create: true
mount: true
existingClaim:
claimName:
size: 10Gi
accessModes:
- ReadWriteOnce