Re: Lua Technical Discussion

Matt Fisher
 

We were looking to use Lua as a pre- and post-hook event system when charts were being rendered.

The post-render hook introduced in Helm 3.1 seems to handle most of the use cases the Lua event system would enable, so the need to implement a Lua-based event model was de-prioritized.

Lua was chosen over other languages for the following reasons:
  • portability (can be used on all devices)
  • designed to be embedded in other programs (simple sandboxing model)
  • it's an incredibly simple language (usually means there are less security risks)
  • the compiler and runtime take up a very small footprint, both in terms of overhead performance and code size
  • it's free and open source
  • it's being used in production in many software projects. NGINX famously loads Lua modules, allowing users to extend its capabilities.
  • there are several reference implementations of Lua VMs written in Go:
More information on the implementation details (as well as the use cases we were targeting) can be found in the Helm 3 proposal for the event-driven model. The Lua plugin proposal was another potential area we could use Lua.

I guess I have two questions:
  • What use case are you attempting to solve with this proposal?
  • Are there any Squirrel VMs written in Go?

1504220459230_microsoft.png

Matthew Fisher

Caffeinated Software Engineer

Microsoft Canada


From: cncf-helm@... <cncf-helm@...> on behalf of Alistair Lowe via Lists.Cncf.Io <alistair=skyiot.co.uk@...>
Sent: Wednesday, March 11, 2020 4:42 PM
To: cncf-helm@... <cncf-helm@...>
Cc: cncf-helm@... <cncf-helm@...>
Subject: [cncf-helm] Lua Technical Discussion
 
Hi guys,

I'm interested in the move to supporting Lua templates, is there a technical discussion or documentation discussing the reasoning behind Lua as a language choice?

I would like to put forward Squirrel-lang as a potencial alternative, it is easily embedded and small footprint like Lua but features a more familiar and intuative C-based syntax, very close to Java script and has native JSON support with good end-user documentation.

I'd like to understand more around the reasoning behind Lua and why it was selected to understand if this propos is a sensible one.

Many thanks

Join cncf-helm@lists.cncf.io to automatically receive all group messages.