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

Finalize hook behaviors #21

Open
rdsubhas opened this issue Dec 31, 2017 · 0 comments
Open

Finalize hook behaviors #21

rdsubhas opened this issue Dec 31, 2017 · 0 comments
Milestone

Comments

@rdsubhas
Copy link
Member

rdsubhas commented Dec 31, 2017

Just adding to make a note / keep track :) Let's try to finalize the hook behavior, just needs to be documented, not necessarily changed or anything :)

Current hooks:

# ingress.cfg
hooks:
  post-render:
    - script 1
    - script 2
    - ...
    - script n 
  • Single or multiple scripts: If there are multiple scripts, will they be executed in sequence or parallel, If one of the scripts throws an error will other script still execute or will all hooks stop there, Will the script be directly executed or executed in a shell, Will all the scripts be concatenated and executed in a single shell, Will export A=1 in one script be available in the next script, etc.
  • Another option is to have a single script, and letting the user decide whether they want && or ||, i.e. multiple scripts like this:
    post-render: |
      set -ex
      script 1
      script2
      scriptn
    
  • Do we pass any environment variables to the hook script, like INGRESSIFY_OUT_FILE or something like that? For the script to read the generated file? Its also fair to keep things simple - and decide that we don't set any env vars, the script is given by user so they already know where the file is written to
  • Which cwd will the script be executed in - in same dir as out_file or template
  • Do we need to have a shell option in the hooks, which defaults to /bin/sh?
@rdsubhas rdsubhas added this to the v0.1.0 milestone Dec 31, 2017
@rdsubhas rdsubhas changed the title Config file format Config file and hook behavior Dec 31, 2017
@rdsubhas rdsubhas changed the title Config file and hook behavior Finalize hook behavior Dec 31, 2017
@rdsubhas rdsubhas changed the title Finalize hook behavior Finalize hook behaviors Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant