Skip to content

Commit

Permalink
IDP-1403 - Add volume extension (#57)
Browse files Browse the repository at this point in the history
* Add volume extension

* Extra volumes and volumeMounts

* Adde volumes in CI

* Fix indentation

* Bump chart version

---------

Co-authored-by: Jules Tremblay <[email protected]>
Co-authored-by: Guillaume Caya-Letourneau <[email protected]>
  • Loading branch information
3 people authored May 9, 2024
1 parent ed6d225 commit 97d31ae
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/ci-aspnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ jobs:
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 3
extraVolumes:
- name: configuration
emptyDir: {}
extraVolumeMounts:
- name: configuration
mountPath: /app/config
EOF
- name: Create test namespace
Expand All @@ -100,3 +106,7 @@ jobs:
- name: Show Kubernetes resources
run: kubectl get all --namespace test
if: always()

- name: Describe test pod
run: kubectl describe pods --namespace test
if: always()
2 changes: 1 addition & 1 deletion charts/aspnetcore/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: aspnetcore
description: A generic Helm chart for ASP.NET Core services
version: 1.0.3
version: 1.0.4
home: https://github.com/gsoft-inc/gsoft-helm-charts
sources:
- https://github.com/gsoft-inc/gsoft-helm-charts
Expand Down
11 changes: 11 additions & 0 deletions charts/aspnetcore/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ include "aspnetcore.serviceAccountName" . }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-container
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down Expand Up @@ -65,6 +68,10 @@ spec:
startupProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
volumeMounts:
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -77,3 +84,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.extraVolumes}}
volumes:
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/aspnetcore/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,19 @@ azureWorkloadIdentity:
## @param podDisruptionBudget.minAvailable The description of the number of pods from that set that must still be available after the eviction, even in the absence of the evicted pod
podDisruptionBudget:
minAvailable: 1

## @param extraVolumes Optionally specify extra list of additional volumes, e.g:
## extraVolumes:
## - name: config-vol
## emptyDir: {}
##
extraVolumes: []

## @param extraEnvVars Extra environment variables to be set on ASP.NET Core container, e.g:

## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts, e.g:
## extraVolumeMounts:
## - name: config-vol
## mountPath: /etc/config
##
extraVolumeMounts: []

0 comments on commit 97d31ae

Please sign in to comment.