Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Add zarf input var for database host fqdn following the same pattern as the gitlab capability #15

Open
zachariahmiller opened this issue Aug 29, 2023 · 0 comments

Comments

@zachariahmiller
Copy link

As an engineer i need to be able to pass in a host for the postgres connection string that may be external to the cluster. I would like to do that using the same pattern as the gitlab capability.

Sonarqube has a hardcoded jdbc url:
https://github.com/defenseunicorns/uds-capability-sonarqube/blob/04e789c6dcbfeacfe3c605d0f8e09cb685616f05/sonarqube-flux-values.yaml#L75C54-L75C54

This is similar to the gitlab pattern:

      postgresqlServer: sonarqube-postgres
      existingSecret: "sonarqube-postgres"
      existingSecretPasswordKey: "password"
      postgresqlUsername: "sonarqube"
      postgresqlDatabase: "###ZARF_VAR_SONARQUBE_DB###"
      service:
        port: 5432

I would expect to be able to deploy an ExternalName service like this
externalName: sonarqube-db.cowzm64p1mcl.us-west-2.rds.amazonaws.com named sonarqube-postgres and connect to the database. However, it tries to connect to the below hardcoded address in the jdbcUrl:

jdbcOverwrite:
   enable: true
   jdbcUrl: jdbc:postgresql://postgresql.sonarqube-db.svc.cluster.local:5432/###ZARF_VAR_SONARQUBE_DB###
   jdbcUsername: sonarqube
   jdbcSecretName: sonarqube-postgres
   jdbcSecretPasswordKey: password

If i update the configmap with the rds address sonarqube comes up successfully, but I would prefer to not have to do that at all. I'm not really clear on why the jdbc overwrite is being used or if this is easily workable with the sonarqube chart.

If possible IMO the behavior should be that the connections string uses the sonarqube-postgres service by default. If that isnt possible, the connectionstring in the jdbcUrl needs to be a ZARF VAR that can be passed in at deploy time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant