Skip to content

Commit

Permalink
Add support for additionalVolumes (#33)
Browse files Browse the repository at this point in the history
* additional volumes

Signed-off-by: Edvin Norling <[email protected]>

* add test

Signed-off-by: Edvin Norling <[email protected]>

---------

Signed-off-by: Edvin Norling <[email protected]>
  • Loading branch information
NissesSenap authored Apr 23, 2024
1 parent 87a1074 commit 0a33009
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/dependency-track/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: dependency-track
version: 0.2.1
version: 0.3.0
type: application
appVersion: 4.10.1
description: |-
Expand Down
28 changes: 28 additions & 0 deletions charts/dependency-track/ci/additional-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
common:
secretKey:
createSecret: true

apiServer:
resources:
requests:
cpu: "1"
memory: "512Mi"
limits:
cpu: "2"
memory: "512Mi"
extraEnv:
SYSTEM_REQUIREMENT_CHECK_ENABLED: "false"
additionalVolumeMounts:
- name: foo
mountPath: /bar
additionalVolumes:
- name: foo
emptyDir: {}

frontend:
additionalVolumeMounts:
- name: foo
mountPath: /bar
additionalVolumes:
- name: foo
emptyDir: {}
6 changes: 6 additions & 0 deletions charts/dependency-track/templates/api-server/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ spec:
mountPath: /var/run/secrets/secret.key
readOnly: true
{{- end }}
{{- if .Values.apiServer.additionalVolumeMounts }}
{{- toYaml .Values.apiServer.additionalVolumeMounts | nindent 8 }}
{{- end }}
livenessProbe:
httpGet:
scheme: HTTP
Expand Down Expand Up @@ -115,6 +118,9 @@ spec:
secret:
secretName: {{ . }}
{{- end }}
{{- if .Values.apiServer.additionalVolumes }}
{{- toYaml .Values.apiServer.additionalVolumes | nindent 6 }}
{{- end }}
{{- if .Values.apiServer.persistentVolume.enabled }}
volumeClaimTemplates:
- metadata:
Expand Down
6 changes: 6 additions & 0 deletions charts/dependency-track/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ spec:
volumeMounts:
- name: tmp
mountPath: /tmp
{{- if .Values.frontend.additionalVolumeMounts }}
{{- toYaml .Values.frontend.additionalVolumeMounts | nindent 8 }}
{{- end }}
livenessProbe:
httpGet:
scheme: HTTP
Expand Down Expand Up @@ -91,3 +94,6 @@ spec:
volumes:
- name: tmp
emptyDir: { }
{{- if .Values.frontend.additionalVolumes }}
{{- toYaml .Values.frontend.additionalVolumes | nindent 6 }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/dependency-track/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ apiServer:
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
additionalVolumeMounts: []
# - name: foo
# mountPath: /bar
additionalVolumes:
[]
# - name: foo
# emptyDir: {}
service:
type: ClusterIP
nodePort: ~
Expand Down Expand Up @@ -111,6 +118,14 @@ frontend:
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 5
additionalVolumeMounts:
[]
# - name: foo
# mountPath: /bar
additionalVolumes:
[]
# - name: foo
# emptyDir: {}
service:
type: ClusterIP
nodePort: ~
Expand Down

0 comments on commit 0a33009

Please sign in to comment.