Skip to content

[bitnami/postgresql] Postgresql global fullnameOverride fix #33593

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

KorenP1
Copy link
Contributor

@KorenP1 KorenP1 commented May 9, 2025

As for the last PR about global postgresql fullnameOverride. #33198 It is currently not functioning as expected.
The postgresql chart uses the "common.names.fullname" function and a local function called "postgresql.v1.primary.fullname" with some other naming functions.

When I changed the function "postgresql.v1.primary.fullname" in the last PR I wasnt paying attention to the other naming functions. and also the still using "common.names.fullname" function.

In order to solve this i have overriden the function "common.names.fullname" to use the "common.names.dependency.fullname" function (Couldn't override with the same function because it would end up in a recursion) which does the same but gets arguments for it. I have added an if else to override with the global.postgresql.fullnameOverride value. Also added .Chart.IsRoot validation because after overriding a function it is getting overriden in the whole context including subcharts. In this postgresql chart case its just in case this chart will somewhen use subchart which I dont think it will.

This whole PR is supposed to be a dialog with the mods because there are alot of ways to implement this global.postgresql.fullnameOverride feature, I chose the one i am offering here but i will describe also other ways that have come to my mind to implement it.

  1. Abandon this feature and revert to a commit before the PR Mentioned above.

  2. Overriding the function as i described earlier

  3. Creating a new function that retrieves the general fullname and change every occurance of "common.names.fullname" to that new function

  4. Implement some feature in the common chart

@github-actions github-actions bot added postgresql triage Triage is needed labels May 9, 2025
@github-actions github-actions bot requested a review from javsalgar May 9, 2025 15:08
@KorenP1 KorenP1 force-pushed the postgres-global-fullnameOverride-fix branch 2 times, most recently from 81975e8 to ecab58c Compare May 9, 2025 15:21
Koren Peretz and others added 18 commits May 9, 2025 18:23
Signed-off-by: Koren Peretz <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
)

* [bitnami/postgresql-ha] Release 16.0.2 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/postgresql] Release 16.7.1 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/kubeapps] Deprecate Helm chart

Signed-off-by: Carlos Rodríguez Hernández <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Co-authored-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/appsmith] Release 5.2.12 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Co-authored-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/chainloop] Release 4.0.1 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/rabbitmq-cluster-operator] Release 4.4.10 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CRDs automatically

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* fix: 🐛 Set proper command

Signed-off-by: Javier J. Salmerón García <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Javier J. Salmerón García <[email protected]>
Co-authored-by: Javier J. Salmerón García <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/contour] Release 20.0.0 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CRDs automatically

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/harbor] feat!: ⬆️ 💥 Bump Redis(R) to 8.0

Signed-off-by: Javier J. Salmerón García <[email protected]>

* chore: 🔧 Change chart.lock

Signed-off-by: Javier J. Salmerón García <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Javier J. Salmerón García <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Co-authored-by: Bitnami Bot <[email protected]>
Co-authored-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
…ami#33052)

* [bitnami/superset] fix ingress with extraHosts failed to deploy

Signed-off-by: Bich Le <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* chore: simplify code
Signed-off-by: Bich Le <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bich Le <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Co-authored-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/solr] Release 9.6.4 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/tomcat] Release 11.7.4 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/odoo] Release 28.2.4 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
* [bitnami/contour] Release 20.0.1 updating components versions

Signed-off-by: Bitnami Bot <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <[email protected]>

---------

Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
Signed-off-by: Bitnami Bot <[email protected]>
Signed-off-by: Koren Peretz <[email protected]>
@KorenP1 KorenP1 force-pushed the postgres-global-fullnameOverride-fix branch from 6d312d7 to a31f1ac Compare May 9, 2025 15:25
@KorenP1
Copy link
Contributor Author

KorenP1 commented May 9, 2025

@javsalgar @juan131
Sorry for the misunderstanding in the last PR
Hopefully this one explains it better. Im availalbe for any questions.
Thanks. Koren.

@javsalgar javsalgar added in-progress verify Execute verification workflow for these changes labels May 12, 2025
@github-actions github-actions bot removed the triage Triage is needed label May 12, 2025
@github-actions github-actions bot removed the request for review from javsalgar May 12, 2025 05:57
@github-actions github-actions bot requested a review from migruiz4 May 12, 2025 05:57
Signed-off-by: Bitnami Bot <[email protected]>
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should try not to override any function from the common library. The option 3 you mentioned might be a better solution:

Creating a new function that retrieves the general fullname and change every occurrence of "common.names.fullname" to that new function

@KorenP1 KorenP1 closed this May 12, 2025
@KorenP1 KorenP1 deleted the postgres-global-fullnameOverride-fix branch May 12, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgresql solved verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants