Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for crypto store PVC to helm chart #920

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to configure hookshot to use this?

# 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