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

Registry with PVC should run as a Deployment #200

Open
npdgm opened this issue Oct 30, 2023 · 1 comment
Open

Registry with PVC should run as a Deployment #200

npdgm opened this issue Oct 30, 2023 · 1 comment
Assignees

Comments

@npdgm
Copy link
Member

npdgm commented Oct 30, 2023

When the registry is configured with filesystem persistence, it should not run as a StatefulSet but as a Deployment just like the stateless mode.

In this persistence mode, the registry is not a scalable resource and only one Pod and it's PVC can run. Relying on a StatefulSet is dangerous as this controller makes decisions that do not favor availability, and is incompatible with a pet Pod critical to the cluster.
For example if a Node is shut down or crashes while not being drained, the registry replica will be stuck in the Terminating state and not rescheduled in the cluster, amplifying the incident.

Running as a Deployment with spec.strategy.type: Recreate would allow the registry to quickly recover. The CSI driver will take care of the multi-attachment protection and volume fencing.

@plaffitt plaffitt self-assigned this Nov 17, 2023
@TarekMSayed
Copy link

@npdgm you don't need to set spec.strategy.type: Recreate it is better to set the PVC spec.accessMode to RWX that also will allow to run replicas with the same volume without issues which is supported by the registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants