Skip to content

Commit

Permalink
chore: keep a useable empty dir mount even when persistence is disabl…
Browse files Browse the repository at this point in the history
…ed (#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>
  • Loading branch information
Racer159 and benmountjoy111 authored Nov 8, 2023
1 parent c42d7b5 commit 2e0fe5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/longhorn/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ persistence:
removeSnapshotsDuringFilesystemTrim: ignored # "enabled" or "disabled" otherwise

csi:
kubeletRootDir: "/var/lib/kubelet"
kubeletRootDir: "/var/lib/kubelet"
attacherReplicaCount: ~
provisionerReplicaCount: ~
resizerReplicaCount: ~
Expand Down
6 changes: 4 additions & 2 deletions packages/zarf-registry/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ spec:
{{ toYaml . | indent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.persistence.enabled }}
- name: data
mountPath: /var/lib/registry/
{{- end }}
- name: config
mountPath: "/etc/docker/registry"
affinity:
Expand Down Expand Up @@ -108,4 +106,8 @@ spec:
- name: data
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "docker-registry.fullname" . }}{{- end }}
{{- else }}
- name: data
emptyDir:
sizeLimit: {{ .Values.persistence.size }}
{{- end }}

0 comments on commit 2e0fe5b

Please sign in to comment.