Skip to content

Commit

Permalink
Add audit archive PVC (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
liam-mackie authored Jan 10, 2025
1 parent e229b0a commit 8a5779f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-dingos-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"octopus-deploy": minor
---

Added audit log PVC
2 changes: 1 addition & 1 deletion charts/octopus-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ helm upgrade octopus-deploy \
--namespace octopus-deploy \
--create-namespace \
--set octopus.acceptEula="Y" \
--set octopus.licenseKeyBase64="<Your License Key>"
--set octopus.licenseKeyBase64="<Your License Key>" \
--set mssql.enabled="true" \
oci://ghcr.io/octopusdeploy/octopusdeploy-helm
```
Expand Down
22 changes: 21 additions & 1 deletion charts/octopus-deploy/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,24 @@ spec:
{{- end }}
resources:
requests:
storage: {{.Values.octopus.taskLogVolume.size}}
storage: {{.Values.octopus.taskLogVolume.size}}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: audit-log-claim
labels:
{{- include "labels" . | nindent 4 }}
spec:
accessModes:
{{- if (gt (.Values.octopus.replicaCount | int) 1)}}
- ReadWriteMany
{{- else }}
- {{.Values.octopus.auditLogVolume.storageAccessMode}}
{{- end }}
{{- if $storageClass := (default .Values.global.storageClass .Values.octopus.auditLogVolume.storageClassName) }}
storageClassName: {{ $storageClass }}
{{- end }}
resources:
requests:
storage: {{.Values.octopus.auditLogVolume.size}}
5 changes: 5 additions & 0 deletions charts/octopus-deploy/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ spec:
mountPath: /taskLogs
- name: server-log-volume
mountPath: /home/octopus/.octopus/OctopusServer/Server/Logs
- name: audit-log-volume
mountPath: /eventExports
{{- if .Values.octopus.resources }}
resources:
{{ toYaml .Values.octopus.resources | indent 18 }}
Expand Down Expand Up @@ -172,6 +174,9 @@ spec:
- name: task-log-volume
persistentVolumeClaim:
claimName: task-log-claim
- name: audit-log-volume
persistentVolumeClaim:
claimName: audit-log-claim
{{- if .Values.dockerHub.login }}
imagePullSecrets:
- name: dockerhubcreds
Expand Down
5 changes: 5 additions & 0 deletions charts/octopus-deploy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ octopus:
size: 1Gi
storageClassName: ""
storageAccessMode: ReadWriteOnce
# Volume used for archived audit logs: https://octopus.com/docs/security/users-and-teams/auditing#archived-audit-events
auditLogVolume:
size: 1Gi
storageClassName: ""
storageAccessMode: ReadWriteOnce

service:
type: NodePort
Expand Down

0 comments on commit 8a5779f

Please sign in to comment.