Open jeanpommier opened 1 year ago
I don't think we can get the database subchart to use the georchestra's chart name. So hardcoding it in the values file might be a solution. What do you think of replacing by
name: "{{ .Release.Name }}-georchestra-database-init"
in the values.yaml file ?
What about changing in https://github.com/georchestra/helm-georchestra/blob/main/templates/database/database-configmap-init.yaml
From:
name: {{ include "georchestra.fullname" . }}-database-init
To:
name: {{ .Release.Name }}-database-init
I'd say it doesn't exactly follow the naming logic, but fine for me
Technical note and answer to this question:
I don't think we can get the database subchart to use the georchestra's chart name.
This is because the bitnami postgresql chart is not aware of the helpers of the georchestra helm chart. It means this can't be done like this because it won't work:
extraVolumes:
- name: "00-initsql"
configMap:
name: "{{ include "georchestra.fullname" . }}-database-init"
I'm letting this issue opened if that's ok. If one day in the future I find a better solution.
Well, an alternative that, for me, would be quite acceptable (and was my first proposal) would be to simply hardcode the chart's name in the dbinit config, in values.yaml:
...
extraVolumes:
- name: "00-initsql"
configMap:
name: "{{ .Release.Name }}-georchestra-database-init"
...
This is not perfect, but very simple to adjust when changing the default name of the chart
The configmap's name is defined like this:
name: {{ include "georchestra.fullname" . }}-database-init
When georchestra.fullname, defined in _helpers.tpl will most of the time be of the form.Release.Name-$name
While in the Values.yaml, it is called like this:
name: "{{ .Release.Name }}-database-init"
So, there is a mismatch and the database won't start, because it can't find the configmap