Skip to content

Commit 13f0601

Browse files
feat(cf-common): add emptyDir (#72)
1 parent 5277cb0 commit 13f0601

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+365
-297
lines changed

charts/cf-common-test/tests/deployment/container_test.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ tests:
190190
asserts:
191191
- lengthEqual:
192192
path: spec.template.spec.containers[0].volumeMounts
193-
count: 2
193+
count: 3
194194
- contains:
195195
path: spec.template.spec.containers[0].volumeMounts
196196
content:
@@ -204,6 +204,11 @@ tests:
204204
name: config
205205
mountPath: /some/path/config.json
206206
subPath: config.json
207+
- contains:
208+
path: spec.template.spec.containers[0].volumeMounts
209+
content:
210+
name: empty-dir-volume
211+
mountPath: /some/path/empty-dir
207212

208213
- it: Test main container probes
209214
asserts:

charts/cf-common-test/tests/deployment/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ container:
5656
- mountPath: /some/path/secret.key
5757
subPath: secret.key
5858
readOnly: true
59+
empty-dir-volume:
60+
path:
61+
- mountPath: /some/path/empty-dir
5962

6063
probes:
6164
liveness:
@@ -115,3 +118,6 @@ volumes:
115118
enabled: true
116119
type: secret
117120
existingName: "{{ .Values.global.volumeName }}"
121+
empty-dir-volume:
122+
enabled: true
123+
type: emptyDir

charts/cf-common-test/tests/deployment/volumes_test.yaml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tests:
99
asserts:
1010
- lengthEqual:
1111
path: spec.template.spec.volumes
12-
count: 3
12+
count: 4
1313
- it: Test volumes array in deployment spec
1414
asserts:
1515
- contains:
@@ -122,3 +122,42 @@ tests:
122122
mountPath: /etc/ssl/default/ca.pem
123123
subPath: ca.pem
124124
readOnly: true
125+
126+
- it: Test emptyDir volume
127+
values:
128+
- values.yaml
129+
asserts:
130+
- contains:
131+
path: spec.template.spec.volumes
132+
content:
133+
name: empty-dir-volume
134+
emptyDir: {}
135+
- contains:
136+
path: spec.template.spec.containers[0].volumeMounts
137+
content:
138+
name: empty-dir-volume
139+
mountPath: /some/path/empty-dir
140+
141+
- it: Test emptyDir volume
142+
values:
143+
- values.yaml
144+
set:
145+
volumes:
146+
empty-dir-volume:
147+
enabled: true
148+
type: emptyDir
149+
sizeLimit: 100Mi
150+
medium: Memory
151+
asserts:
152+
- contains:
153+
path: spec.template.spec.volumes
154+
content:
155+
name: empty-dir-volume
156+
emptyDir:
157+
sizeLimit: 100Mi
158+
medium: Memory
159+
- contains:
160+
path: spec.template.spec.containers[0].volumeMounts
161+
content:
162+
name: empty-dir-volume
163+
mountPath: /some/path/empty-dir

charts/cf-common/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: v0.0.0
33
description: Codefresh library chart
44
name: cf-common
5-
version: 0.16.0
5+
version: 0.17.0
66
type: library
77
keywords:
88
- codefresh

charts/cf-common/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Codefresh library chart
44

5-
![Version: 0.16.0](https://img.shields.io/badge/Version-0.16.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: v0.0.0](https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square)
5+
![Version: 0.17.0](https://img.shields.io/badge/Version-0.17.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) ![AppVersion: v0.0.0](https://img.shields.io/badge/AppVersion-v0.0.0-informational?style=flat-square)
66

77
## Installing the Chart
88

@@ -18,7 +18,7 @@ Include this chart as a dependency in your `Chart.yaml` e.g.
1818
# Chart.yaml
1919
dependencies:
2020
- name: cf-common
21-
version: 0.16.0
21+
version: 0.17.0
2222
repository: https://chartmuseum.codefresh.io/cf-common
2323
```
2424
@@ -201,7 +201,7 @@ dependencies:
201201
| volumes | object | See below | Configure volume for the controller. Additional items can be added by adding a dictionary key similar to the 'config'/`secret` key. |
202202
| volumes.config | object | `{"enabled":false,"type":"configMap"}` | Volume name. Make sure to use the same name in `configMaps`/`secrets`/`persistence` and `container.volumeMounts` |
203203
| volumes.config.enabled | bool | `false` | Enable the volume |
204-
| volumes.config.type | string | `"configMap"` | Volume type (configMap/secret) |
204+
| volumes.config.type | string | `"configMap"` | Volume type (configMap/secret/pvc/emptyDir) |
205205

206206
----------------------------------------------
207207
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)

0 commit comments

Comments
 (0)