Skip to content

Commit

Permalink
feat: added pvc support
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish1099 committed Jan 17, 2025
1 parent 09a33c3 commit 05cb009
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 20 deletions.
14 changes: 7 additions & 7 deletions argocd-helm-charts/vuls-dictionary/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ spec:
{{- toYaml .Values.readinessProbe | nindent 12 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: dictionary
mountPath: /go-cve-dictionary
lifecycle:
postStart:
exec:
Expand Down Expand Up @@ -81,7 +80,8 @@ spec:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
volumeMounts:
{{- toYaml . | nindent 12 }}
- name: dictionary
mountPath: /go-cve-dictionary
{{- end }}
lifecycle:
postStart:
Expand All @@ -91,10 +91,10 @@ spec:
"go-cve-dictionary fetch oval"
]
{{- end }}
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: dictionary
persistentVolumeClaim:
claimName: {{ include "vuls-dictionary.fullname" . }}-pvc
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
21 changes: 21 additions & 0 deletions argocd-helm-charts/vuls-dictionary/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "vuls-dictionary.fullname" . }}-pvc
labels:
{{- include "vuls-dictionary.labels" . | nindent 4 }}
{{- if .Values.persistence.annotations }}
annotations:
{{- range $key, $value := .Values.persistence.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | default "ReadWriteOnce" }}
resources:
requests:
storage: {{ .Values.persistence.size | default "1Gi" }}
{{- if .Values.persistence.storageClass }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
17 changes: 4 additions & 13 deletions argocd-helm-charts/vuls-dictionary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,6 @@ readinessProbe:
path: /
port: http

# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
# secret:
# secretName: mysecret
# optional: false

# Additional volumeMounts on the output Deployment definition.
volumeMounts: []
# - name: foo
# mountPath: "/etc/foo"
# readOnly: true

nodeSelector: {}

tolerations: []
Expand All @@ -119,3 +106,7 @@ cve:
- mitre
- jvn
- fortinet

persistence:
enabled: true
size: 5Gi

0 comments on commit 05cb009

Please sign in to comment.