BorisPolonsky / dify-helm

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

[BUG] Error when setting externalAzureBlobStorage to true #68

Closed Onoshun-HWS closed 4 months ago

Onoshun-HWS commented 4 months ago

This is my first time reporting a bug on github, so please forgive the poor quality.

Describe the bug Setting the next value to true will result in an error.

externalAzureBlobStorage:
  enabled: true

Because there is no condition for this. .Values.externalAzureBlobStorage.enabled

dify-helm / charts / dify / templates/ api-deployment

volumeMounts:
        {{- if not .Values.externalS3.enabled }}
        - name: app-data

I believe that these conditions will resolve the error.

volumeMounts:
        {{- if not (or .Values.externalS3.enabled .Values.externalAzureBlobStorage.enabled) }}
        - name: app-data

To Reproduce Steps to reproduce the behavior:

  1. externalAzureBlobStorage: enabled: true
  2. helm upgrade dify dify/dify -f values.yaml
  3. Error: UPGRADE FAILED: cannot patch "dify-api" with kind Deployment: Deployment.apps "dify-api" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "app-data" && cannot patch "dify-worker" with kind Deployment: Deployment.apps "dify-worker" is invalid: spec.template.spec.containers[0].volumeMounts[0].name: Not found: "app-data"

Desktop (please complete the following information):

BorisPolonsky commented 4 months ago

Thanks for identifying the bug and providing a solution. Please check out this PR and see if it solves the problem.

BorisPolonsky commented 4 months ago

Fixed