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: kratos helm chart tpl, values #587

Closed bkomraz1 closed 1 year ago

bkomraz1 commented 1 year ago

Adding tpl function to evaluate values from values.yaml, allows to use {{.Values.myVal }} for following kratos helm chart values:

kratos.config ingress.admin.annotations ingress.admin.tls.hosts ingress.admin.hosts ingress.public.annotations ingress.public.tls.hosts ingress.public.hosts

Implements: kartos helm chart values should be evaluated by tpl function #586

Related Issue or Design Document

Checklist

Further comments

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

bkomraz1 commented 1 year ago

Hi @Demonsthere @piotrmsc Can you please review the pull request?

Demonsthere commented 1 year ago

Hello there :) Do you have a specific use case in mind for this feature? I understand the general point, but what use case would this solve? Additionally, please update the values in hacks/values to reflect and tests the changes

bkomraz1 commented 1 year ago

Hi @Demonsthere (https://github.com/Demonsthere)

I am deploying kratos and other charts to multiple environment. I need to pass to kratos and other helm charts common values such domain name (that is dedicated to environment). But I don't want create in each helm chart environment dedicated value file because of complexity (number-of-charts * number-of-environments). Instead of it I am defining values in each chart by references to values in cluster dedicated value file that is not dedicated for some specific chart for example {{ .Values.domainName }}. As result my complexity is (number-of-charts + number-of-environments).

I added tests: https://github.com/ory/k8s/pull/587/commits/60c2c99e0cc3bb42fcc8dbdc4af8e0e5550d73ac

Demonsthere commented 1 year ago

Ok, thanks for the update :) I think we can merge this, but i would need 2 more things:

Thanks for your work! :)

Demonsthere commented 1 year ago

Hi there, please run make format to make the CI happy, and we can merge this :)

bkomraz1 commented 1 year ago

Hi @Demonsthere, I formated Readme.md https://github.com/ory/k8s/pull/587/files#diff-58f80f0383af682f7829b18ca4fb6774e9f42982d27a811634295dcff09a1c1f