Skip to content

Commit 806077e

Browse files
committed
support existingClaim for PVC
Signed-off-by: David Young <davidy@funkypenguin.co.nz>
1 parent 67f4ec5 commit 806077e

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

charts/stable/skypilot/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: skypilot
33
description: A Helm chart for deploying SkyPilot API server on Kubernetes
44
icon: "https://raw.githubusercontent.com/skypilot-org/skypilot/master/charts/skypilot/skypilot.svg"
55
type: application
6-
version: 0.0.2-pre-14
6+
version: 0.0.2-pre-15
77
appVersion: "0.0"
88
dependencies:
99
- name: ingress-nginx

charts/stable/skypilot/templates/api-deployment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,10 @@ spec:
706706

707707
volumes:
708708
{{- if .Values.storage.enabled }}
709+
{{- $claimName := default (printf "%s-state" .Release.Name) .Values.storage.existingClaim }}
709710
- name: state-volume
710711
persistentVolumeClaim:
711-
claimName: {{ .Release.Name }}-state
712+
claimName: {{ $claimName }}
712713
{{- else }}
713714
- name: state-volume
714715
emptyDir: {}

charts/stable/skypilot/templates/pvc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{{- if .Values.storage.enabled }}
1+
{{- $existingClaim := default "" .Values.storage.existingClaim }}
2+
{{- if and .Values.storage.enabled (eq $existingClaim "") }}
23
apiVersion: v1
34
kind: PersistentVolumeClaim
45
metadata:

charts/stable/skypilot/values.schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,9 @@
674674
},
675675
"volumeName": {
676676
"type": "string"
677+
},
678+
"existingClaim": {
679+
"type": "string"
677680
}
678681
}
679682
},

charts/stable/skypilot/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ storage:
263263
# environment: prod
264264
# Optional volume name for binding to specific PV
265265
volumeName: ""
266+
# Use an existing PVC instead of creating one
267+
existingClaim: ""
266268
# Optional annotations
267269
annotations: {}
268270

0 commit comments

Comments
 (0)