Explorar o código

NAS-121456 / 23.10 / Adds field for emptyDir `sizeLimit` to ix-chart (#1118)

* Add field for emptyDir size

* add validation

* bump

* add a default sizeLimit

* bump
Stavros Kois %!s(int64=2) %!d(string=hai) anos
pai
achega
fd1415b5ba

+ 2 - 1
library/ix-dev/charts/ix-chart/Chart.yaml

@@ -3,13 +3,14 @@ description: A Helm chart for deploying simple workloads Kubernetes
 annotations:
   title: ix-chart
 type: application
-version: 2304.0.3
+version: 2304.0.4
 apiVersion: v2
 appVersion: v1
 kubeVersion: ">=1.16.0-0"
 maintainers:
   - name: truenas
     url: https://www.truenas.com/
+    email: dev@ixsystems.com
 dependencies:
   - name: common
     repository: file://../../../common/2304.0.1

+ 9 - 0
library/ix-dev/charts/ix-chart/questions.yaml

@@ -487,6 +487,15 @@ questions:
                 schema:
                   type: path
                   required: true
+              - variable: sizeLimit
+                label: "Size Limit"
+                description: |
+                  Optional - Size of the memory backed volume.</br>
+                  Format: 100Mi, 1Gi, 2Gi etc
+                schema:
+                  type: string
+                  valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$"
+                  default: "512Mi"
 
   # Volumes
   - variable: volumes

+ 3 - 0
library/ix-dev/charts/ix-chart/templates/_volumes.tpl

@@ -23,6 +23,9 @@ volumes:
   - name: ix-emptydir-volume-{{ $.Release.Name }}-{{ $index }}
     emptyDir:
       medium: Memory
+      {{- with $emptyDirConfiguration.sizeLimit }}
+      sizeLimit: {{ . }}
+      {{- end }}
 {{- end }}
 {{- end }}
 {{- end }}