helm-kubernetes-services
helm-kubernetes-services copied to clipboard
Add support for Statefulset deployments
I would like to add support for Statefulset deployments to this helm chart. I believe this can be done with relatively few (and non-breaking?) changes:
- Add an optional field called
workloadTypetovalues.yaml, where the default value isdeploymentbutstatefulsetis also an option. - Add a
_statefulset_spec.tpltemplate which gets used whenworkloadTypeis set tostatefulset. In turn,_deployment_spec_tplonly gets used whenworkloadTypeis set todeployment. - Add an optional
updateStrategyfield tovalues.yamlwhich gets injected intoupdateStrategyonstatefulsetworkloads (workloadType: statefulset).deploymentStrategycontinues getting injected intostrategyondeploymentworkloads. - Add an optional
namefield underservicedue to Statefulset workload requirements.servicecould still haveenabled: falseif the service resource is created outside of the chart.
I consider these changes possibly non-breaking because as long as the default value of workloadType is deployment, the chart should behave exactly as it does currently. Also, I don't expect any downtime implications from these changes.
An alternative would be creating different helm charts for statefulset deployments, but I think time will be better spent upgrading this Chart instead.
That being said, is there anything that I'm not seeing that could become a problem with this approach? I'm planning on coding this up soon, but I'd appreciate any feedback 👍🏼.