Skip to content
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

[DB] init configmap's name does not match the name in Values.yaml #48

Open
jeanpommier opened this issue Aug 28, 2023 · 6 comments · Fixed by #51
Open

[DB] init configmap's name does not match the name in Values.yaml #48

jeanpommier opened this issue Aug 28, 2023 · 6 comments · Fixed by #51
Assignees
Labels
bug Something isn't working

Comments

@jeanpommier
Copy link
Member

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

@jeanpommier
Copy link
Member Author

jeanpommier commented Aug 29, 2023

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 ?

@edevosc2c
Copy link
Member

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

@jeanpommier
Copy link
Member Author

I'd say it doesn't exactly follow the naming logic, but fine for me

@edevosc2c
Copy link
Member

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"

@edevosc2c
Copy link
Member

I'm letting this issue opened if that's ok. If one day in the future I find a better solution.

@edevosc2c edevosc2c reopened this Sep 20, 2023
@edevosc2c edevosc2c assigned edevosc2c and unassigned jeanpommier Sep 20, 2023
@jeanpommier
Copy link
Member Author

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

@edevosc2c edevosc2c added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants