-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add custom packs volumes #199
Conversation
This looks pretty slick and flexible! I may start testing it pretty quickly, and will drop a note if I do! |
K. I think this is ready for review :) I look forward to feedback. |
I just reviewed #160, so I started puzzling over if we could also have the chart add the actual persistentVolumeClaims. But, once I read all the discussions in there, I think including the PVCs in the stackstorm-ha chart has some gotchas. Quoting #160 (comment):
Maybe this is another reason to keep the PVC or other storage definition and management separate from the StackStorm chart. I wouldn't want any kind of helm maintenance (install, upgrade, delete, reinstall) to touch that storage, at least in the cluster I'm working on. Right now I'm preparing to upgrade from a modified 1ppc installation, switching over to the stackstorm-ha chart. I will be reusing mongo, rabbitmq, redis, and my rook-ceph (via flexVolume) installations. So, I'll only be replacing the StackStorm deployments, services (plus migrating some configMaps and secrets to the stackstorm-ha format). I'm trying very hard to make this upgrade as seamless as possible. That said, I'd be okay if others wanted the chart to optionally also create persistentVolumeClaims, even though I don't need or want them. Any thoughts? |
I agree with you 100%. Storage for me will be managed outside of the stackstorm-ha chart. I'm using NFS (EFS) right now, but I'm considering switching to the aws-efs-csi driver presenting the EFS volume as a PVC which I will simply tell stackstorm-ha to use. This way, my storage and application tiers have a nice bit of separation, which feels like a clean demarcation point for management and provides greater levels of safety and control. In the interest of simplicity, my vote is that stackstorm-ha should not create the PVC's, it should simply allow you to reference them as a volume source for the pods that require it. Creating the PVC's opens a giant can of worms and potential complexity that doesn't feel like it should be stackstorm-ha's job to deal with. |
d9aa914
to
e8e5a8c
Compare
rebased on master |
3664fbf
to
0915938
Compare
Thanks @ericreeves for the fixes in cognifloyd#1 and cognifloyd#2 . I've cherry-picked them in. |
0915938
to
e72dd93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this PR in my cluster and it is working great. I think it's the best proposed solution for the shared storage issue so far.
a3d1916
to
1cd8738
Compare
03e69c7
to
b290e82
Compare
rebased on master + included nindent reformat changes |
586a6ea
to
39be0b0
Compare
Still working great for me with all of the latest master changes merged in! |
I just came across an article that touches in how diverse the k8s storage landscape is. Something generic like this PR will be better for stackstorm-ha in the long run. |
There have been a couple of attempts at resolving the need for shared storage here, and I believe this is by far the least prescriptive and most elegant. BYOV. (Bring Your Own Volumes!) |
Hopefully this gets merged, and then I am working on a way to allow this to peacefully coexist with st2.packs.images by only mounting the packs.images on the st2-register-content Job. This way you can still bake pack images and have them dumped on to the shared storage and registered automatically. I have a POC of this already functioning in my fork, but want to wait until this gets merged to send a PR as not to muddy the goals of this PR. |
135e86a
to
7356ca2
Compare
46d1c2b
to
2110818
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cognifloyd Thanks for the Pull Request! 👍
I'm just gathering feedback from a few folks who were using custom volumes already if this can fit and work for everyone.
It looks optimistic so far.
Also thanks @ericreeves for trying this out already and help!
@armab Sweet! I'm glad this is getting more eyes on it! Thanks for socializing this one! |
One issue I just ran into, is rebuilding all the virtualenvs after upgrading to 3.4 is more involved.
I couldn't use I'm not sure if there's an elegant way to add a conditional upgrade job that runs when going from one st2 version to another. |
Also, in our environment, we use the same pack repos across multiple environments (each env has its own set of volumes). Forcing the installation of packs via st2packs images sidesteps this issue. Now that we're enabling packs volumes, more people will run into this. The This is the core issue about this: StackStorm/st2#3973 |
Tested on AKS, we are one day in with light testing, using BYO PVCs and its happy so far. The testing continues. |
Thanks @chris3081! I'm glad it's working so far. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got more positive testing feedback about this feature 👍
@cognifloyd Could you please synchronize the https://docs.stackstorm.com/install/k8s_ha.html with the new stackstorm-ha Readme?
Thanks everyone! 🎉 |
Cool. I'll work on a docs PR this weekend. Thanks! |
Doc changes for this PR were just merged: StackStorm/st2docs#1089 |
Thanks a lot @cognifloyd ! |
New feature: Shared packs volumes
st2.packs.volumes
. Allow using cluster-specific persistent volumes to store packs, virtualenvs, and (optionally) configs. This enables usingst2 pack install
. It even works withst2packs
images inst2.packs.images
.For a good description of the thinking behind this PR see: #18 (comment) (and the rest of the comments in that issue)
st2.packs.volumes
section to values.yamlst2.packs.volumes
definitions to packs-volumes templatesst2.packs.volumes.enabled
st2.packs.volumes
config is incompletest2.packs.volumes.enabled
, make register-content packs-initContainer include system packspacks.configs
ConfigMap if it is not needed/usedst2.packs.volumes
valuesst2.packs.volumes
caveats similar to those documented in Allow mounting of NFS volumes instead of using st2packs for pack management #118st2.packs.volumes
withst2.packs.images
st2.packs.configs
to work withst2.packs.volumes.configs
Related #160
Resolves #18
Closes #118