ory / k8s

Kubernetes Helm Charts for the ORY ecosystem.
https://k8s.ory.sh/helm
Apache License 2.0
335 stars 258 forks source link

feat: add hydra option to create separate admin and public deploys #706

Open terev opened 1 month ago

terev commented 1 month ago

Add an option to the Hydra chart separateAdminAndPublicDeploys, when enabled creates separate deployment objects for the admin and public components. In addition, if auto-scaling is enabled, separate HPA objects will be created.

Related Issue or Design Document

I was unable to find any related issues, and don't have a design document.

Checklist

Further comments

The motivation for this change was to enable creating an Istio RequestAuthentication policy which applies to only the admin component (since it doesnt have its own auth). In addition, this change makes it possible to scale, configure, and route the admin and public components separately.

Demonsthere commented 1 month ago

Hi there! This is an interesting feature request, I can see the reasoning behind it, and it possibly would make sense to create such a distributed system for other applications as well 🤔. However, I think it might be a better idea to make it more verbose, and follow the same path as https://github.com/grafana/helm-charts/tree/main/charts and create a separate hydra-distributed chart, as opposed to keeping it bundled in a single package, wdyt?

terev commented 1 month ago

@Demonsthere Are there any concerns with the additional complexity required to update two charts for Hydra if we fork this one into a new chart? My concern is if there's multiple different charts it gets complicated to keep them all maintained. Maybe we could modularize this chart such that portions can be reused in the distributed version?

terev commented 1 month ago

@Demonsthere If it wasn't clear, I'm totally open to doing this. Just looking for guidance to do it in a maintainable way.

Demonsthere commented 1 month ago

Yeah, sorry it was just a busy week 😅 I think i am more in favour of a distributed chart, then overcomplicating the current one, as we would have to prepare options like different requests/hpa for each deployment :)

terev commented 1 month ago

@Demonsthere No worries, thanks for the response, no rush.

Configuring the two deployments differently is actually supported in my current implementation by using the new deployment.admin and deployment.public options. These options act as overrides on top of the defaults specified in the deployment object.

But totally fair, definitely don't want to overcomplicate the chart. I can try making a separate chart.