zammad-helm icon indicating copy to clipboard operation
zammad-helm copied to clipboard

Incorrect value for S3_URL

Open t-shehab opened this issue 8 months ago • 1 comments

Setting an S3_URL in values.yml (see below) results in a default URL being used after deployment.

minio:
  # enable/disable minio chart dependency
  enabled: true

  # Uncomment this in case you want to use an external S3 service.
externalS3Url: http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true

With the above configuration, helm template zammad -f zammad/values.yaml shows the following divergent value.

- name: S3_URL
-   value: "http://zammadadmin:zammadadmin@release-name-zammad-minio:9000/zammad?region=zammad&force_path_style=true"

What is curious is that if an incorrect (nonexistent) URL is set in externalS3Url, Zammad's web-frontend throws an errror when S3 is selected as storage provider. Theory is therefore that a connection check to the URL (as set by user in values.yml) is performed initially, but then a default configuration is used in production.

Further investigation needed.

t-shehab avatar Mar 28 '25 08:03 t-shehab

Hi,

We are using external S3 Minio which we already have deployed in the cluster.

If I remember correctly, when installing Zammad fresh via Helm Charts, the railsserver pod/application checks for connectivity to the S3 endpoint. If connectivity is ok, it will set it in Zammad configuration (in Postgres DB, I believe). Not sure if you can change values later to make a change in Zammad via the helm upgrade command.

  1. To me, it does not make sense to enable MiniO dependency if you are going to use externalS3Url
  2. If externalS3Url is defined, S3_URL has the value of externalS3Url
  3. Your indent on externalS3Url is incorrect; add 2 more spaces to have same indentation as enabled: true
  4. If you are deploying MiniO as a Zammad dependency, comment out externalS3Url

For reference: https://github.com/zammad/zammad-helm/blob/main/zammad/templates/_helpers.tpl#L141-L169,

gjumic-optiva avatar Mar 28 '25 10:03 gjumic-optiva

@t-shehab I just tried to verify this, without success.

With only externalS3Url:

zammadConfig:
  minio:
    # enabled: true
    externalS3Url: http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true
helm template zammad -f values.yaml | grep S3 -C1
            - name: S3_URL
              value: "http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true"

With both (not really useful):

zammadConfig:
  minio:
    enabled: true
    externalS3Url: http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true
helm template zammad -f values.yaml | grep S3 -C1
            - name: S3_URL
              value: "http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true"

With only internal minio subchart:

zammadConfig:
  minio:
    enabled: true
    # externalS3Url: http://minioadmin:[email protected]:9000/my-awesome-zammad-bucket?region=eu-central-1&force_path_style=true
helm template zammad -f values.yaml | grep S3 -C1
            - name: S3_URL
              value: "http://zammadadmin:zammadadmin@release-name-zammad-minio:9000/zammad?region=zammad&force_path_style=true"

The generated value looks correct in all cases. Can you check this again, please? Maybe the values.yaml was simply wrong?

AFAICT, Zammad uses the value of S3_URL directly, and does not store/persist it in the database.

mgruner avatar Apr 23 '25 11:04 mgruner

@t-shehab the indentation of your externalS3Url seems wrong. it needs to be part of minio, not on the same level.

monotek avatar Apr 23 '25 12:04 monotek

3. Your indent on externalS3Url is incorrect; add 2 more spaces to have same indentation as enabled: true

Exactly what I said :)

gjumic-optiva avatar Apr 23 '25 14:04 gjumic-optiva

Sorry, tl;dr :D

monotek avatar Apr 23 '25 14:04 monotek

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 23 '25 05:06 github-actions[bot]