Skip to content

Commit 2e0fe5b

Browse files
chore: keep a useable empty dir mount even when persistence is disabled (#2124)
## Description This PR sets up an empty dir when persistence is disable which is something needed for the longhorn init package: https://github.com/defenseunicorns/zarf-init-longhorn ## Related Issue Fixes #1995 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Ben Mountjoy <benmountjoy@gmail.com>
1 parent c42d7b5 commit 2e0fe5b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/longhorn/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ persistence:
9898
removeSnapshotsDuringFilesystemTrim: ignored # "enabled" or "disabled" otherwise
9999

100100
csi:
101-
kubeletRootDir: "/var/lib/kubelet"
101+
kubeletRootDir: "/var/lib/kubelet"
102102
attacherReplicaCount: ~
103103
provisionerReplicaCount: ~
104104
resizerReplicaCount: ~

packages/zarf-registry/chart/templates/deployment.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ spec:
7373
{{ toYaml . | indent 12 }}
7474
{{- end }}
7575
volumeMounts:
76-
{{- if .Values.persistence.enabled }}
7776
- name: data
7877
mountPath: /var/lib/registry/
79-
{{- end }}
8078
- name: config
8179
mountPath: "/etc/docker/registry"
8280
affinity:
@@ -108,4 +106,8 @@ spec:
108106
- name: data
109107
persistentVolumeClaim:
110108
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "docker-registry.fullname" . }}{{- end }}
109+
{{- else }}
110+
- name: data
111+
emptyDir:
112+
sizeLimit: {{ .Values.persistence.size }}
111113
{{- end }}

0 commit comments

Comments
 (0)