prom3theu5 / aspirational-manifests

Handle deployments of .NET Aspire AppHost Projects
MIT License
702 stars 36 forks source link

Convert Deployments to Stateful Sets #216

Closed josephaw1022 closed 5 months ago

josephaw1022 commented 5 months ago

πŸš€ Feature Description

If you run aspirate generate and create the Kubernetes resources for your db, queue, or whatever you use, then the resource for the Kubernetes resource made is a deployment whether it's just plain manifests or helm. And while this works well for local development (for the most part), I think just going ahead and making them stateful sets would make it more convenient, so that it's closer to what a dev environment would look like and all I would have to do is configure the volumes/volume mounts and the actual pv/pvc for the dev environment.

βœ” Goals

🧰 Possible Solution

prom3theu5 commented 5 months ago

Hi There

Currently stateful sets are created already if your manifest resource in aspire has a volume defined. Deployments are stateless, and anything with a volume mount automatically become stateful sets during processing

Add a volume to cache, db etc in the AppHost, and you'll get stateful sets πŸ˜„

josephaw1022 commented 5 months ago

You're the man