Code Monkey home page Code Monkey logo

Comments (4)

juan131 avatar juan131 commented on May 12, 2024

Hi,

This is an issue if you're using the charts as subcharts since elasticsearch's template expects 3 arguments to printf while mysql only expects 2.

As you can check on the line below:

https://github.com/bitnami/charts/blob/master/bitnami/elasticsearch/templates/_helpers.tpl#L40

It's using .Values.master.name which exists on ES' values.yaml but it doesn't exist on MySQL's values.yaml.

The problem is not about the number of arguments used on each macro but using the same name for both macros. We're defining twice the macro "master.fullname"...

@tompizmor @javsalgar how should we solve this? Should we sth like "mysql.master.fullname" and "es.master.fullname"

The templates should have namespaces (such as the PostgreSQL templates).

I don't really understand what you mean with that.

from charts.

rmckayfleming avatar rmckayfleming commented on May 12, 2024

Hi Juan,

To clarify, the Elasticsearch helper template "master.fullname" passes three arguments to printf and the MySQL helper template "master.fullname" passes two. When I tried to do a deployment with them, it failed since the configuration ended up with the following (since the Elasticsearch chart's templates take precedence):

metadata:
  name: testing-mysql-%!s(<nil>)

What I mean by namespacing is exactly what you suggest, "master.fullname" should likely be "mysql.master.fullname" and "es.master.fullname" (which is what the PostgreSQL chart does as it has a "postgresql.master.fullname" helper template).

In the interim, I've added a master.name to my chart's values.yaml that fixes the issue. But this should likely be fixed at the source.

from charts.

juan131 avatar juan131 commented on May 12, 2024

Hi @rmckayfleming

Sorry for the confusion with what "namespace" means... Yes, I see your point and I'm opening some PRs to implement that solution. Thanks so much for opening the issue. You can find the PRs in the links below:

from charts.

juan131 avatar juan131 commented on May 12, 2024

We just update the charts including the changes you suggested! Please feel free to use the new charts and reopen the issue if you continue facing issues with the macros.

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.