Skip to content

It is not possible to extend or overwrite DB_URL #349

Description

@sielaq

Hi fellows

the recent change #337
has introduced few issues:

  1. DB_URL cannot be overwritten with secret anymore,
    since the deployment's env: has precedence over envFrom:
    it would be better to have it in configmap so any secrets can overwrite it.

  2. The current DB_URL does not support extra mysql params anymore (like tls=skip-verify)
    (before we could overwrite it, now we have to use the hardcoded DB_URL )

  3. even disabling (renaming mysql database to sth else like devlake.option.database: aurora )
    is not working correctly because init container until nc ... loop
    has no server url from _helper.tpl, causing endless error loop


btw.
the whole change was about externalSecret, while it was quite easy to do external secret for DB_URL before, like:

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: example
spec:
  refreshInterval: 60s
  secretStoreRef:
    kind: ClusterSecretStore
    name: secretstore
  target:
    creationPolicy: Owner
    deletionPolicy: Merge
    name: example-name
    template:
      data:
        DB_URL: mysql://{{"{{"}} .MYSQL_USER {{"}}"}}:{{"{{"}} .MYSQL_PASSWORD {{"}}"}}@{{ .Values.devlake.mysql.externalServer }}:{{ .Values.devlake.mysql.externalPort }}/{{ .Values.devlake.mysql.database }}?charset=utf8mb4&parseTime=True&tls=skip-verify
        MYSQL_USER: '{{"{{"}} .MYSQL_USER {{"}}"}}'
        MYSQL_PASSWORD: '{{"{{"}} .MYSQL_PASSWORD {{"}}"}}'
      type: Opaque
  data:
  - remoteRef:
      key: example/data/mysql/devlake
      property: user
    secretKey: MYSQL_USER
  - remoteRef:
      key: example/data/mysql/devlake
      property: password
    secretKey: MYSQL_PASSWORD

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions