Error installing custom chart

I’m trying to build a chart in the community chain for Invoiceninja, and I’ve finally run into an error that I can’t solve myself:
INSTALLATION FAILED: execution error at (invoiceninja/templates/common.yaml:18:4): Workload - One enabled workload must be primary
(This is the error I get installing the chart on my truenas system)

In my templates there is one (and only one) workload defined as primary, so I’m not sure how to proceed in figuring out what could be causing the error.

Also, for my future reference, is there a way to output the yaml file that gets generated from the tpl files? That would help me figure out where the error is coming from, rather than trying to keep it all in my head

Templates folder on github: link

Full error with traceback:

 Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 469, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 511, in __run_body
    rv = await self.method(*args)
         ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 210, in nf
    rv = await func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 47, in nf
    res = await f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 187, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 496, in do_create
    await self.middleware.call(
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1564, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1428, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1321, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 49, in helm_action
    raise CallError(f'Failed to {tn_action} App: {errmsg}')
middlewared.service_exception.CallError: [EFAULT] Failed to install App: WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /etc/rancher/k3s/k3s.yaml
Error: INSTALLATION FAILED: execution error at (invoiceninja/templates/common.yaml:18:4): Workload - One enabled workload must be primary

I would strongly suggest using Docker Compose in a Sandbox instead.

It will take a few seconds to port to Electric Eel in the future

Of course you would. :wink:

But given that k3s/helm are going away in the next release, I’d agree with, at least, not putting effort into a custom helm chart.

Precisely.

And I’ve been testing the Dockge app on Electric Eel.

It works astonishingly well in the latest nightly.

Well, curses. I’ve just migrated to Scale, mostly because it seemed to me that the jails in Core were also being deprecated, and I was looking forward to native, gui-based helm / k3s support. And my experience with apps so far hasn’t been too bad.

(It’s not the only reason I migrated though. I do find that the Scale UI is more well thought out, and a lot of the documentation I’ve seen around makes it seem like Core is going to be getting less + less love moving forward)

In y’all’s opinion, would I be better off going back to Core and sticking w/ jails, or going the docker-in-a-sandbox route?
(Relevant: I still have the hard drive I was using for core, so switching back would just be a hard drive swap. I wouldn’t be reinstalling.)

I’m hoping for the most gui-based experience possible, though I’m pretty comfortable with the command line when necesary, especially for initial apps setup.

Edit / update:
Did some more reading, and it seems like better docker support is coming to Electric Eel via an apps overhaul. My questions are thus:
How long should I expect to wait to see a stable release of Electric Eel with the new apps framework?
How would I go about adding a community chart for invoiceninja under the new framework?
My plan now is to swap back to Core until Electric Eel is released, but will that end up causing me a huge headache down the road?

General availability release of Electric Eel should be in October, beta1 hopefully by the end of the month.

In the GA release we will have full support for Docker Compose, so you will just put in your compose statement as a custom app and everything should be good to go. We also support utilities such as Portainer and Dockge if you are more familiar with their functionality.

Should not cause any headaches in theory. Just make sure to export your pool before switching versions, and avoid doing any ZFS flag updates until you are settled.

1 Like

No, CORE is a dead end. iX just released 13.3, which will be the last release of CORE barring (maybe) security fixes, so you’re going to need to migrate sooner or later.

Yeah, that’s kind of the vibe I was getting.

I think my plan is to stick w/ Core 13.0 until October, then switch to Scale Electric Eel once that hits stable.

Thanks all for your thoughts!

Of course, if you like, you can continue to use helm and kubernetes with EE and later–either in a VM, or in a sandbox. TrueCharts are working toward a VM-based solution using TalOS. It’s going to include graphical dashboards for KubeApps and Kubernetes itself, but it’s unclear (at least to me) how much of a point-and-click/GUI experience it’s going to be.

I demonstrate using Compose and Dockge on Electric Eel in this video