-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major version 3.0.0 again, with pvc and sidecar/init container fixes …
…for robustness
- Loading branch information
Mike Kao
committed
Dec 31, 2023
1 parent
e453a80
commit e4185af
Showing
6 changed files
with
271 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{{- define "local-ai.pvc" -}} | ||
{{- $rootContext := .rootContext -}} | ||
{{- $pvcObject := .object -}} | ||
|
||
{{- $labels := merge | ||
($pvcObject.labels | default dict) | ||
(include "local-ai.labels" $rootContext | fromYaml) | ||
-}} | ||
|
||
--- | ||
kind: PersistentVolumeClaim | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ $pvcObject.name }} | ||
{{- with $labels }} | ||
labels: {{- toYaml . | nindent 4 -}} | ||
{{- end }} | ||
{{- with $pvcObject.annotations }} | ||
annotations: {{- toYaml . | nindent 4 -}} | ||
{{- end }} | ||
spec: | ||
accessModes: | ||
- {{ required "accessMode is required for PVC" $pvcObject.accessMode | quote }} | ||
resources: | ||
requests: | ||
storage: {{ required "size is required for PVC" $pvcObject.size | quote }} | ||
{{- if $pvcObject.storageClass }} | ||
storageClassName: {{ if (eq "-" $pvcObject.storageClass) }}""{{- else }}{{ $pvcObject.storageClass | quote }}{{- end }} | ||
{{- end }} | ||
{{- end -}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- range $key, $pvc := .Values.persistence -}} | ||
{{- if $pvc.enabled -}} | ||
{{- $pvcObject := dict "name" (printf "%s-%s" (include "local-ai.fullname" $) $key) "accessMode" $pvc.accessModes "size" $pvc.size "storageClass" $pvc.storageClass "annotations" $pvc.annotations "labels" $pvc.labels -}} | ||
|
||
{{- /* Include the PVC template */ -}} | ||
{{- include "local-ai.pvc" (dict "rootContext" $ "object" $pvcObject) | nindent 0 -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
Oops, something went wrong.