Skip to content

Commit

Permalink
Add support for crypto store PVC to helm chart
Browse files Browse the repository at this point in the history
Signed-off-by: PseudoResonance <[email protected]>
  • Loading branch information
PseudoResonance committed Apr 3, 2024
1 parent 082a61f commit 20f5c74
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm/hookshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ You'll need to configure your Ingress connectivity according to your environment
| podSecurityContext | object | `{}` | Pod security context settings |
| replicaCount | int | `1` | Number of replicas to deploy. Consequences of using multiple Hookshot replicas currently unknown. |
| resources | object | `{}` | Pod resource requests / limits |
| persistence | object | `{}` | Config for persistent encryption store in /persistent |
| securityContext | object | `{}` | Security context settings |
| service.annotations | object | `{}` | Extra annotations for service |
| service.appservice.port | int | `9002` | Appservice port as configured in container |
Expand Down
9 changes: 9 additions & 0 deletions helm/hookshot/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ containers:
- name: config
mountPath: "/data"
{{- end }}
- name: data
mountPath: "/persistent"
ports:
- name: webhook
containerPort: 9000
Expand Down Expand Up @@ -120,6 +122,13 @@ volumes:
items: {{ toYaml .items | nindent 6 }}
{{- end }}
{{- end }}
- name: data
{{- if or .Values.persistence.enabled .Values.persistence.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "hookshot.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end }}

{{- range .Values.extraSecretMounts }}
{{- if .secretName }}
Expand Down
21 changes: 21 additions & 0 deletions helm/hookshot/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "hookshot.fullname" . }}
labels:
{{- include "hookshot.labels" . | nindent 4 }}
spec:
accessModes:
- {{ .Values.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
9 changes: 9 additions & 0 deletions helm/hookshot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# Persistent volume for encryption store, mounted in the pod as /persistent.
# Can be disabled if encryption is not used.
persistence:
enabled: true
# existingClaim: hookshot
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi

autoscaling:
enabled: false
# -- Node selector parameters
Expand Down

0 comments on commit 20f5c74

Please sign in to comment.