bcgov / traction-tenant-traceability-controller

w3c-ccg traceability api implementation for aries
Apache License 2.0
0 stars 4 forks source link

Labels for the database NSP do not match the labels for the database pod #8

Closed WadeBarnes closed 5 months ago

WadeBarnes commented 6 months ago

By default the controller is unable to connect to the database because the label the database's NSP do not match the labels on the database pod.

The affected label(s), app.kubernetes.io/name, on the database pod are set to postgresql while the label(s) in the NSP are set to ttc-postgresql.

PatStLouis commented 6 months ago

While the NSP is declared in the project's chart template, the deployment is pulled from the bitnami chart. How can we get the fullNameOverwrite value to make it's way to the deployed pod?

WadeBarnes commented 6 months ago

In that case would it be easier to go the other direction and update the NSP with labels from the deployment chart?

PatStLouis commented 6 months ago

I agree, however @esune wanted to include the tttc- prefix to uniquely identify this postgresql instance in the namespace. The other option is to let go of the bitnami chart and just include a simple postgres deployment/service.

PatStLouis commented 6 months ago

This approach would also simplify the process of generating the POSTGRES_URI variable for the controller since we could source it from secret values

esune commented 6 months ago

We fixed the NSP labels today, for some reason the fullNameOverride does not yield the selected name in the deployment and nameOverride is still required.

I think we can close this, and open a different issue regarding the automatic population of the secrets with the required values.