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

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] 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.

Comment From: dosubot[bot]

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

Comment From: rusackas

This issue hit the "stale" radar, but I think we should leave it open while the linked PR awaits a rebase. Holler if it's no longer an issue for you.

Comment From: alesnav

Hello there!

Sorry for the off-topic, just trying to draw the context for the following question. I'm trying to disable initContainers as I'm using PostgreSQL and Redis in Azure (PaaS), so I'm just linking Superset with this two external resouces. If I don't change the values.yaml, it is always waiting for db and redis, so I disabled initContainer:

  initContainers:
    enabled: false

It seems to work as expected, because no initContainers are started and Superset works fine. The only issue here is that I'm deploying Superset Helm sync'd by ArgoCD and above parameter causes that the app is shown always as "Out of Sync".

Image

Will this issue be fixed once this linked PR is merged?

Thanks!

Comment From: cin

I don't think they're related. We don't use the default Postgres and Redis from the helm chart either (except for local installs) as we have:

postgresql:
  enabled: false
redis:
  enabled: false

I think if you disable the init containers, your Postgres and Redis clusters and users/roles wouldn't be initialized properly (i.e. it's probably working because you already started superset once). I could be wrong though. Make sure you are also initializing the proper values for your external Postgres and Redis in superset_config.py (through helm overrides).