konga icon indicating copy to clipboard operation
konga copied to clipboard

'helm install' shows error in case 'db_uri' defined only

Open fabasoad opened this issue 2 years ago • 0 comments

Problem

In helm chart there are multiple parameters in related to connection to DB: db_uri, db_host, db_port, db_user, db_password. In these parameters db_uri takes precedense, means that if db_uri is defined then other parameters will not be used, hence they're not needed to be defined (it's also mentioned in README.md (DB_URI env var) - https://github.com/pantsel/konga#environment-variables). Therefore in current helm chart it's not true.

Steps to reproduce

  1. Create values.yaml with the following content:
replicaCount: 1

image:
  repository: pantsel/konga
  tag: latest
  pullPolicy: IfNotPresent

nameOverride: ""
fullnameOverride: ""

service:
  type: NodePort
  port: 80

config:
  port: 1337
  node_env: development
  konga_hook_timeout: 60000
  db_adapter: mongo
  db_uri: mongodb://username:pwd@mongo-host:27017/konga_database?authSource=admin
  log_level: debug

ldap: {}

ingress:
  enabled: false
  annotations: {}
  hosts:
    - host: chart-example.local
      paths: []
  tls: []


resources: {}

nodeSelector: {}

tolerations: []

affinity: {}
  1. Run the following command:
helm install -n kong konga ~/konga/charts/konga -f values.yaml

Expected behavior

Helm chart should be created successfully

Actual behavior

The following error message is shown:

Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [unknown object type "nil" in ConfigMap.data.DB_PASSWORD, unknown object type "nil" in ConfigMap.data.DB_USER, unknown object type "nil" in ConfigMap.data.SSL_CRT_PATH, unknown object type "nil" in ConfigMap.data.SSL_KEY_PATH, unknown object type "nil" in ConfigMap.data.TOKEN_SECRET]

fabasoad avatar Aug 14 '21 00:08 fabasoad