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

BPDM Charts: Can't deploy with disabled Dependencies #1086

Closed
nicoprow opened this issue Oct 17, 2024 · 0 comments
Closed

BPDM Charts: Can't deploy with disabled Dependencies #1086

nicoprow opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@nicoprow
Copy link
Contributor

Current Behavior

The BPDM Helm Charts currently come with Postgres and Central-IDP dependency. The Charts can be deployed as is. But if I want to use an external Postgres or Central-IDP and want to disable the dependencies the Charts won't render.

Expected Behavior

I can disable both Posgtres and Central-IDP.

Steps To Reproduce

Overwrite the BPDM default configuration by setting centralidp.enabled = false
When using

helm template -f your-values-file.yaml charts/bpdm

you will see an error.

Reasons

I already know why that problem exists. It is because of the helper functions in the bpdm-commons chart library:

{/*
Determine centralidp service/host name to connect to
*/}}
{{- define "bpdm.centralidpDependency" -}}
        {{- include "includeWithCentralidpContext" (list $ "centralidp.fullname") }}
{{- end }}}

{{/*
Invoke include on given definition with centralidp dependency context
Usage: include "includeWithCentralidpContext" (list $ "your_include_function_here")
*/}}
{{- define "includeWithCentralidpContext" -}}
{{- $ := index . 0 }}
{{- $function := index . 1 }}
{{- include $function (dict "Values" $.Values.centralidp "Chart" (dict "Name" "centralidp") "Release" $.Release "global" $.global) }}
{{- end }}

When the dependency is disabled the include $function command returns an error as the function is inside that dependency and not longer available for chart rendering.

Solution Suggestion

This behaviour makes it basically impossible to rely on invoking dependency functions from the parent. We would need to change strategy here for the Central-IDP and Postgres. Instead of invoking dependency functions I guess the only way is to copy or create own functions in the BPDM chart that infer the names of the dependencies.

@nicoprow nicoprow added the bug Something isn't working label Oct 17, 2024
@nicoprow nicoprow added this to the BPDM v6.2.0 milestone Oct 17, 2024
@nicoprow nicoprow moved this to 🔖 Ready in BPDM Kanban Oct 17, 2024
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in BPDM Kanban Oct 25, 2024
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
Archived in project
Development

No branches or pull requests

2 participants