Git Product home page Git Product logo

Comments (3)

agaudreault avatar agaudreault commented on September 27, 2024

Hey @P0t4T0o, seems like this is already possible. I wrote https://github.com/argoproj/argo-cd/blob/master/resource_customizations/external-secrets.io/ExternalSecret/actions/refresh/action.lua a while back and it uses the os package to add an annotation with the date, which triggers a watch event on the controller.

from argo-cd.

P0t4T0o avatar P0t4T0o commented on September 27, 2024

Hi @agaudreault, that is right, os works because it is imported here. However string or math libs are not, so manipulation with strings is currently challenging. I have a working draft of necessary changes to enable this. If it is fine and everything aligns with the project's plan, I can open a PR

from argo-cd.

agaudreault avatar agaudreault commented on September 27, 2024

From #2300

Retrieving the timestamp in lua was problematic, because os.date() resides in the os lua library. The entire Lua 'os' library is a security risk because the os library can also do things like call os.exit() and read local files.
So in order to support restarts, we had to expose a subset of the lua os library to the Lua VM. The subset of functionality was copied from the go-lua implementation.

Maybe @argoproj/argo-security and @jessesuen should be involved in whether we add additional package or not.

@P0t4T0o what functions do you need? Can you share the Lua script you want to run? And have you tried to use useOpenLibs as documented in https://argo-cd.readthedocs.io/en/stable/operator-manual/health/

from argo-cd.

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.