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

Evaluate Templates in init.extraContainers #31877

Open
3 tasks done
cin opened this issue Jan 16, 2025 · 1 comment · May be fixed by #31878
Open
3 tasks done

Evaluate Templates in init.extraContainers #31877

cin opened this issue Jan 16, 2025 · 1 comment · May be fixed by #31878

Comments

@cin
Copy link

cin commented Jan 16, 2025

Bug description

init.extraContainers are not rendered like they are in other places in the helm chart. For example,

      {{- if .Values.supersetNode.initContainers }}
      initContainers: {{- tpl (toYaml .Values.supersetNode.initContainers) . | nindent 6 }}
      {{- end }}

This makes it very difficult to override things like image for example (we use a custom image that has our dependencies included). I'd like to take advantage of using init.extraContainers for creation of additional roles and users. I would prefer not to override init.initscript as we'd have to keep that sync'd and merged with what's in the base chart every time we update superset. Or perhaps I'm missing something, is there a reason the init.extraContainers are not rendered?

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Jan 16, 2025

Hey @cin! I'm here to help you with any bugs, questions, or contributions. Let's see what we can do to resolve this issue together.

The issue you're encountering is that init.extraContainers in the Superset Helm chart is not rendered using the tpl function, unlike other parts of the chart such as initContainers. This means that template directives within init.extraContainers are not evaluated, making it difficult to override configurations like the image.

Currently, init.extraContainers is implemented as a simple list without template rendering, which limits its flexibility [1]. To achieve the desired behavior, you would need to modify the Helm chart to apply the tpl function to init.extraContainers, similar to how it's done for initContainers. This would allow you to dynamically render and override configurations within init.extraContainers.

If you want to avoid modifying the base chart, you might consider creating a custom wrapper chart or using a post-renderer to apply the necessary transformations to the rendered templates. However, these approaches can add complexity to your deployment process.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the deploy:helm label Jan 16, 2025
@cin cin linked a pull request Jan 16, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant