Skip to content

Commit

Permalink
Merge pull request #54 from dasmeta/DMVP-1759-emptydir
Browse files Browse the repository at this point in the history
feat(DMVP-1759): Added emptyDir to volume types.
  • Loading branch information
viktoryathegreat authored Dec 14, 2022
2 parents 5ec16db + dcf7a1b commit b8de5ed
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
4 changes: 2 additions & 2 deletions charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.35
version: 0.1.36

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.35"
appVersion: "0.1.36"
26 changes: 20 additions & 6 deletions charts/base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```
dependencies:
- name: base
version: 0.1.34
version: 0.1.36
repository: https://dasmeta.github.io/helm
```

Expand Down Expand Up @@ -99,9 +99,9 @@ Here are 2 examples about this:
**Alias is not specified, name, version and appVersion are not overridden by parent chart**
In this case, labels will be like this:\*\*

- `helm.sh/chart: base-0.1.34 `
- `helm.sh/chart: base-0.1.36 `
- `app.kubernetes.io/name: base`
- `app.kubernetes.io/version: 0.1.34 `
- `app.kubernetes.io/version: 0.1.36 `

Chart.yaml

Expand All @@ -115,7 +115,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.34
version: 0.1.36
repository: https://dasmeta.github.io/helm
```

Expand Down Expand Up @@ -154,7 +154,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.34
version: 0.1.36
repository: https://dasmeta.github.io/helm
alias: my-app-base
```
Expand Down Expand Up @@ -184,7 +184,7 @@ appVersion: "0.1.0"
dependencies:
- name: base
version: 0.1.34
version: 0.1.36
repository: https://dasmeta.github.io/helm
```

Expand Down Expand Up @@ -243,6 +243,20 @@ my-app-base:
dynamicName: true
```

**Volume type is emptyDir**

```
my-app-base:
...
deployment:
volumes:
- name: dshm
mountPath: /dev/shm
emptyDir:
medium: Memory
sizeLimit: 2G
```

### PVC

By defining `storage` block in values.yaml file you can create a PVC resource.
Expand Down
5 changes: 5 additions & 0 deletions charts/base/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ spec:
secret:
secretName: {{ $element.secret.secretName }}
{{- end }}
{{- if $element.emptyDir }}
emptyDir:
medium: {{ $element.emptyDir.medium }}
sizeLimit: {{ $element.emptyDir.sizeLimit }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
Expand Down

0 comments on commit b8de5ed

Please sign in to comment.