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

Expose PVC accessMode as variable #1664

Merged
merged 2 commits into from
May 8, 2023
Merged

Expose PVC accessMode as variable #1664

merged 2 commits into from
May 8, 2023

Conversation

willswire
Copy link
Contributor

@willswire willswire commented May 1, 2023

Description

When attempting to upgrade our EKS Node AMIs in AWS, we noticed that the Zarf Registry deployment was unable to horizontally scale across nodes which needed to restart. We believe the culprit is the accessMode specification for the PersistentVolumeController. In order for multiple pods to have access to the same PersistentVolume, the accessMode must be set to "ReadWriteMany".

This PR proposes that when autoscaling is enabled for the Zarf Registry, the accessMode is set to "ReadWriteMany" by default; when autoscaling is disabled, it is set to "ReadWriteOnce". Due to the additional work required (i.e. using an existing PersistencVolumeController with a storage class compatible with RWX), we also propose that autoscaling be disabled by default.

This PR exposes the REGISTRY_PVC_ACCESS_MODE variable for the zarf-registry portion of the init package.

Related Issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

@netlify
Copy link

netlify bot commented May 1, 2023

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit a779d3e
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/6455659815dd3400085840f2

packages/zarf-registry/chart/values.yaml Outdated Show resolved Hide resolved
@willswire willswire changed the title Support for RWX PVC accessMode; disable HPA by default Support for RWX PVC accessMode May 3, 2023
@willswire willswire closed this May 3, 2023
@jeff-mccoy
Copy link
Contributor

We have pod affinity defined because this is node-attached storage and even a deployment rollout can break it if you don't tie the pod to the same node. HPA is no different than deployment rollout and does not require RWX.

@willswire
Copy link
Contributor Author

Reopening this PR after some git rebase shenanigans.

@willswire willswire reopened this May 3, 2023
@willswire willswire requested a review from Racer159 May 3, 2023 17:20
@willswire willswire requested a review from Racer159 May 4, 2023 16:37
@willswire willswire changed the title Support for RWX PVC accessMode Expose PVC accessMode as variable May 4, 2023
Racer159
Racer159 previously approved these changes May 5, 2023
Copy link
Contributor

@Racer159 Racer159 left a comment

Choose a reason for hiding this comment

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

lgtm

@willswire
Copy link
Contributor Author

Twas missing ### on my Zarf Var... fixed!

@willswire willswire requested a review from Racer159 May 5, 2023 22:29
@Racer159 Racer159 merged commit 2a5adf2 into zarf-dev:main May 8, 2023
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

Successfully merging this pull request may close these issues.

4 participants