truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.14k stars 617 forks source link

Homebox default values incorrect casue parse error #10391

Closed dominch closed 1 year ago

dominch commented 1 year ago

App Name

Homebox

SCALE Version

22.02.3

App Version

0.9.2

Application Events

helm upgrade --install homebox true-charts/homebox --namespace homebox -f values4.yml

Release "homebox" does not exist. Installing it now.                                                                                                  Error: 1 error occurred:                                                                                                                                      * Secret in version "v1" cannot be handled as a Secret: json: cannot unmarshal number into Go struct field Secret.stringData of type string

Application Logs

helm show values true-charts/homebox                                                            

image:
  repository: tccr.io/truecharts/homebox
  pullPolicy: IfNotPresent
  tag: v0.9.2@sha256:0936a8959013589504264a0f52698a661c50a127700ba32f99f19838fe75966c
homebox:
  allow_registration: true
  auto_increment_asset_id: true
  max_upload_size: 10
  log_level: info
  log_format: text
  mailer_host: ""
  mailer_port: 587
  mailer_from: ""
  mailer_username: ""
  mailer_password: ""
service:
  main:
    ports:
      main:
        protocol: http
        port: 10603
persistence:
  data:
    enabled: true
    mountPath: /data
portal:
  open:
    enabled: true

workload:
  main:
    podSpec:
      containers:
        main:
          envFrom:
            - secretRef:
                name: "homebox-secret"

Application Configuration

homebox: mailer_host: "" mailer_port: 587 mailer_from: "" mailer_username: "" mailer_password: ""

Describe the bug

Recent changes broke default values, mainly mailer_host, first helm could not upgrade chart to 0.9.2, then when I tried to reinstall with default values I found out that even defaults are broken and anything inputed into mailer_host will fail whole process.

To Reproduce

just get values from chart and try to install with them, You will end up with: Error: 1 error occurred: * Secret in version "v1" cannot be handled as a Secret: json: cannot unmarshal number into Go struct field Secret.stringData of type string

Also upgrade from old version was broken, fails to update secret: Error: UPGRADE FAILED: cannot patch "homebox-homebox-secret" with kind Secret: "" is invalid: patch: Invalid value: .....

Expected Behavior

Probably whole mailer section is not needed, helm should not get those keys. For now You need to delete mailer_host line, I'm not sure if it works with empty string.

Screenshots

cmd line

Additional Context

older version has no such issue, but I don't rememeber if mailer was used at all.

I've read and agree with the following

stavros-k commented 1 year ago

If mailer_host is "" its not even added in the secret. As for the "latest" changes, not sure which you mean as you haven't mentioned Chart version(s) Also you have selected SCALE version, but you show helm commands, which is something not supported on SCALE.

I did fix sometthing that could cause issues with mailer enabled. But can't say more here.

truecharts-admin commented 1 year ago

This issue is locked to prevent necro-posting on closed issues. Please create a new issue or contact staff on discord of the problem persists