diff --git a/argocd-helm-charts/vuls-dictionary/templates/deployment.yaml b/argocd-helm-charts/vuls-dictionary/templates/deployment.yaml index 40b5db33..96b56db8 100644 --- a/argocd-helm-charts/vuls-dictionary/templates/deployment.yaml +++ b/argocd-helm-charts/vuls-dictionary/templates/deployment.yaml @@ -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: @@ -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: @@ -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 }} diff --git a/argocd-helm-charts/vuls-dictionary/templates/pvc.yaml b/argocd-helm-charts/vuls-dictionary/templates/pvc.yaml new file mode 100644 index 00000000..f1488fc0 --- /dev/null +++ b/argocd-helm-charts/vuls-dictionary/templates/pvc.yaml @@ -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 }} diff --git a/argocd-helm-charts/vuls-dictionary/values.yaml b/argocd-helm-charts/vuls-dictionary/values.yaml index f60008a7..b51312df 100644 --- a/argocd-helm-charts/vuls-dictionary/values.yaml +++ b/argocd-helm-charts/vuls-dictionary/values.yaml @@ -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: [] @@ -119,3 +106,7 @@ cve: - mitre - jvn - fortinet + +persistence: + enabled: true + size: 5Gi