Skip to content

Commit

Permalink
Replace hard-coded PVC name
Browse files Browse the repository at this point in the history
Uses a template to calculate the PVC name, matching the pattern used for
other objects like the Deployment.
  • Loading branch information
mitchnielsen committed Dec 5, 2024
1 parent 0af72ae commit 51e0515
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/prefect-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ spec:
{{- if .Values.sqlite.enabled }}
- name: sqlite-storage
persistentVolumeClaim:
claimName: sqlite-pvc
claimName: {{ template "common.names.fullname" . }}-sqlite
{{- end }}
{{- if .Values.server.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumes "context" $) | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/prefect-server/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: sqlite-pvc
name: {{ template "common.names.fullname" . }}-sqlite
namespace: {{.Release.Namespace}}
spec:
{{- with .Values.sqlite.persistence.storageClassName }}
Expand Down
4 changes: 2 additions & 2 deletions charts/prefect-server/tests/database_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tests:
content:
name: sqlite-storage
persistentVolumeClaim:
claimName: sqlite-pvc
claimName: prefect-server-sqlite
- template: deployment.yaml
contains:
path: .spec.template.spec.containers[0].volumeMounts
Expand All @@ -48,7 +48,7 @@ tests:
containsDocument:
kind: PersistentVolumeClaim
apiVersion: v1
name: sqlite-pvc
name: prefect-server-sqlite
namespace: prefect

- it: Should not allow an HPA
Expand Down

0 comments on commit 51e0515

Please sign in to comment.