Skip to content

Commit

Permalink
Merge pull request energywebfoundation#28 from energywebfoundation/ch…
Browse files Browse the repository at this point in the history
…ore/add-ephemeral-vol

add extra volume
  • Loading branch information
royki authored Feb 9, 2023
2 parents c3742c8 + c5c5cf6 commit 8ae5c60
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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: 1.0.2
version: 1.0.3

# 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
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generic-microservice-helm

![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)

Generic helm chart for Energy Web Foundation microservices

Expand Down Expand Up @@ -47,6 +47,8 @@ pre-commit install-hooks
| deploymentStrategy | string | `"RollingUpdate"` | |
| env | object | `{}` | |
| extraLabels | object | `{}` | Extra lables to be added to all resources |
| extraVolumeMounts | list | `[]` | |
| extraVolumes | list | `[]` | |
| fullnameOverride | string | `""` | |
| image.args | list | `[]` | |
| image.command | list | `[]` | |
Expand Down
19 changes: 14 additions & 5 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,27 @@ spec:
{{- if .Values.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.pvc.enabled }}
volumeMounts:
{{- if .Values.pvc.enabled }}
- mountPath: {{ .Values.pvc.mountPath }}
name: {{ include "microservice.fullname" . }}-volume
{{- if .Values.pvc.subPath }}
subPath: {{ .Values.pvc.subPath }}
{{- end }}
name: {{ .Values.pvc.name | default (printf "%s-volume" (include "microservice.fullname" .)) }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.pvc.enabled }}
volumes:
- name: {{ include "microservice.fullname" . }}-volume
{{- if .Values.pvc.enabled }}
- name: {{ .Values.pvc.name | default (printf "%s-volume" (include "microservice.fullname" .)) }}
persistentVolumeClaim:
claimName: {{ include "microservice.fullname" . }}-claim
claimName: {{ .Values.pvc.claimName | default (printf "%s-claim" (include "microservice.fullname" .)) }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "microservice.fullname" . }}-claim
name: {{ .Values.pvc.claimName | default (printf "%s-claim" (include "microservice.fullname" .)) }}
spec:
storageClassName: {{ .Values.pvc.storageClassName }}
accessModes:
Expand Down
14 changes: 13 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pvc:
storage: 20Gi
mountPath: "/tmp"


container:
ports:
http: 80
Expand Down Expand Up @@ -147,3 +146,16 @@ sidecars: []
# ports:
# - name: portname
# containerPort: 1234

## @param extraVolumeMounts Array to add extra mount
extraVolumeMounts: []
# e.g
# - mountPath: /cache
# name: volume-name

## @param extraVolumes Array to add extra volumes
extraVolumes: []
# e.g
# - name: volume-name
# persistentVolumeClaim:
# claimName: volume-claim-name

0 comments on commit 8ae5c60

Please sign in to comment.