data-center-helm-charts icon indicating copy to clipboard operation
data-center-helm-charts copied to clipboard

[Suggestion] - jira chart values.yaml is missing schema option for Postgres

Open mumbley opened this issue 3 years ago • 1 comments

Suggestion

The helm chart includes the following configurable items for the database

database:
  type:
  url:
  driver:
  credentials:
    secretName:
    usernameSecretKey:
    passwordSecretKey:

Which, is nearly everything needed to populate the dbconfig.xml file, but, for Postgres it is missing the schema (see below block) and, possibly, because of this, the DB config has to be re-configured on first install (and install of subsequent cluster pods (see https://github.com/atlassian/data-center-helm-charts/issues/456)

<jira-database-config>
  <name>defaultDS</name>
  <delegator-name>default</delegator-name>
  <database-type>postgresaurora96</database-type>
  <schema-name>public</schema-name>

Adding schema as an option for Postgres would resolve this issue (and, if this is an option, it's not in the chart values.yaml)

Product

Jira

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

mumbley avatar Oct 01 '22 12:10 mumbley

@mumbley thanks for this finding! Indeed, ATL_DB_SCHEMA_NAME env var can be added to container env, grabbing its value from values.yaml. Are you keen to raise this simple PR?

bianchi2 avatar Oct 02 '22 21:10 bianchi2

@mumbley having looked at it closer, it turns out schema is automatically set to public for postgres:

  <delegator-name>default</delegator-name>
  {% set schema_names = {
    "mssql": "dbo",
    "mysql": "",
    "mysql57": "",
    "mysql8": "",
    "oracle10g": "",
    "postgres72": "public"
  } %}
  <schema-name>{{ atl_db_schema_name | default(schema_names.get(atl_db_type, '')) }}</schema-name>

While this env is indeed missing in values.yaml this should not cause any issues, and schema should make it to dbconfig.xml.

bianchi2 avatar Nov 17 '22 07:11 bianchi2

Closing this issue as the question seems to have been answered. Feel free to reopen if you have any additional questions.

bianchi2 avatar Oct 11 '23 21:10 bianchi2