Skip to content

Commit

Permalink
Merge pull request #84 from imZack/fix-existingClaim
Browse files Browse the repository at this point in the history
fix: existingClaim not working
  • Loading branch information
maraino authored Feb 18, 2022
2 parents 8a9685b + 21aa803 commit e37bbcd
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions step-certificates/templates/ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ spec:
- name: database
emptyDir: {}
{{- end }}
{{- if and .Values.ca.db.enabled (and .Values.ca.db.persistent .Values.ca.db.existingClaim) }}
- name: database
persistentVolumeClaim:
claimName: {{ .Values.ca.db.existingClaim }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -183,7 +188,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.ca.db.enabled .Values.ca.db.persistent }}
{{- if and .Values.ca.db.enabled .Values.ca.db.persistent (not .Values.ca.db.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: database
Expand All @@ -199,17 +204,11 @@ spec:
resources:
requests:
storage: {{ .Values.ca.db.size | quote }}
{{ if .Values.ca.db.existingClaim }}
selector:
matchLabels:
name: {{ .Values.ca.db.existingClaim | quote }}
{{- else }}
{{- if .Values.ca.db.storageClass }}
{{- if (eq "-" .Values.ca.db.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: {{ .Values.ca.db.storageClass | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit e37bbcd

Please sign in to comment.