Skip to content

[ISSUE] improve error handling for external web-modeler DB #2371

@hamza-m-masood

Description

@hamza-m-masood

Describe the issue:

If a password is not supplied through the values.yaml when connecting to an external postgres DB for web modeler rest API then you get the following error:

Error: INSTALLATION FAILED: 1 error occurred:
        * Deployment.apps "camunda-web-modeler-restapi" is invalid: spec.template.spec.containers[0].env[2].valueFrom.secretKeyRef.name: Invalid value: "": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Actual behavior:

Strange error is seen referencing an env var in an array

Expected behavior:

It would be better if a cleaner error could be given. Such as password must be provided for external DB
or if a password is not provided then the SPRING_DATASOURCE_PASSWORD env var in webmodeler rest API that references the password secret could be optional depending on if the password is provided or not.

How to reproduce:

values.yaml used:

webModeler:
  restapi:
    externalDatabase:
      url: "url-test"
      user: "web-modeler"
      password: ""
postgresql:
  enabled: false

Logs:

Environment:

Please note: Without the following info, it's hard to resolve the issue and probably it will be closed.

  • Platform:
  • Helm CLI version:
  • Chart version: alpha(8.6)
  • Values file:

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-freeze-candidateIssue found during a code freeze that we aren't sure yet are eligible to work on during the code fzkind/issueUnidentified issue, it could be a bug, misconfig, or anything in betweenplatform/awsIssues related to AWSplatform/gcpIssues related to GCPpossibly-outdatedFor github issues over a year old

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions