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

Add support for env variables in executor config #674

Closed
oyvinev opened this issue Aug 29, 2024 · 7 comments · Fixed by #683
Closed

Add support for env variables in executor config #674

oyvinev opened this issue Aug 29, 2024 · 7 comments · Fixed by #683

Comments

@oyvinev
Copy link

oyvinev commented Aug 29, 2024

It would be very useful if one were able to use environment variables when configuring an executor - an example of desired usage with the ssh executor:

executor:
   type: ssh
   config:
       user: $SSH_USER
       ip: $SSH_HOST
       password: $SSH_PASSWORD
       port: $SSH_PORT

I'm not familiar enough with Go to neither understand the complexity nor attempt a PR of it.

@halalala222
Copy link
Contributor

@yohamta What do you think? I think this is a good idea.

  1. Duplicate configurations can be managed by reconfiguring based on environment variables
  2. This can prevent the direct exposure of sensitive information

@yohamta
Copy link
Collaborator

yohamta commented Aug 31, 2024

Thank you for submitting this issue and suggestions. I completely agree that this would be a valuable feature.

To implement this, we will need to make the following changes:

  1. We'll add support for environment variable expansion in the executor config for all executor types available the SSH executor.
  2. We'll ensure that the expanded values are not written back to the Node data, as these values contain sensitive information that shouldn't be stored in status files.

If you have any thoughts on this implementation plan or additional considerations, please feel free to share them.

@halalala222
Copy link
Contributor

@yohamta Hi! I will try to work on this !

@yohamta
Copy link
Collaborator

yohamta commented Aug 31, 2024

Thank you @halalala222, please feel free to ask if there's any questions!

@halalala222
Copy link
Contributor

@yohamta add support for environment variable expansion in the executor config for all executor types available Is it necessary to add this environment variable to executors other than the SSH executor?

@yohamta
Copy link
Collaborator

yohamta commented Sep 4, 2024

Hi @halalala222, I made a mistake earlier - we actually only need support for environment variable expansion in the SSH executor right now. Sorry for the confusion.

@halalala222
Copy link
Contributor

halalala222 commented Sep 5, 2024

@yohamta Hi!!! Thank you ! I completed this issue in this PR

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

Successfully merging a pull request may close this issue.

3 participants