BorisPolonsky / dify-helm

Deploy langgenious/dify, an LLM based app on kubernetes with helm chart
MIT License
205 stars 52 forks source link

Add ServiceAccount to Deployments #92

Closed japan4415 closed 4 weeks ago

japan4415 commented 1 month ago

Close https://github.com/BorisPolonsky/dify-helm/issues/91

Purpose

This Pull Request adds support for specifying a ServiceAccount in the Helm chart’s Deployment resource. This change addresses the need for using ServiceAccount in environments such as AWS for securely attaching IAM roles to pods, and in service meshes like Istio for applying policies and authentication to individual pods.

Changes

BorisPolonsky commented 1 month ago

Thanks for your contribution. I wonder if it's better that define these in _helpers.tpl (e.g. dify.api.serviceAccountName, dify.worker.serviceAccountName e.t.c.) and include them in the templates like what bitnami/chart did.

japan4415 commented 1 month ago

I understand. I'll change it.

BorisPolonsky commented 1 month ago

I understand. I'll change it.

And exemplar definition for .Values.yaml goes here.

  serviceAccount:
    create: true
    name: ""
    automountServiceAccountToken: false
    annotations: {}

We would like to keep things defined in .Values.yaml bitnami/charts to make configuration similar to redis and postgresql which are also supplied by bitnami. If it's to much to ask then I would merge this PR immediately and reform it afterwards. :)

japan4415 commented 1 month ago

Ok I think it is possible thing. So I'll change.

BorisPolonsky commented 4 weeks ago

It doesn't hurt to merge the current implementation and make further update later. PR closed.

japan4415 commented 4 weeks ago

oh sorry I was razy and took a lot of time I'll send it in another PR.