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

feat: add possibility to mount config map on ephemeral job agent #1505

Merged

Conversation

BenjaminDecreusefond
Copy link
Contributor

@BenjaminDecreusefond BenjaminDecreusefond commented Nov 8, 2024

Hey @alfespa17 !

We are currently working on ephemeral agents and we would like to add the ability to mount volumes on the jobs to allow for custom configuration like passing configuration files to interact with cloud providers. Do you think that could be a cool feature ?

Also, following this PR I update the message in the Terrakube UI to tell user that they can use regex for branch matching as well !

Regards !

Optional<String> configMapMountPathOpt = Optional.ofNullable(executorContext.getEnvironmentVariables().get("CONFIG_MAP_MOUNT_PATH"));
if (configMapNameOpt.isPresent()) {
String configMapName = configMapNameOpt.get();
String mountPath = configMapMountPathOpt.orElse("/home/"); // Default mount path if not specified
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the default mount path to /tmp or /mnt. From my POV /home is not safe to be used as a mount point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I set it as default because it is used by AWS for instance to fetch its .aws/config folder but you're right as a safe point i'll move to tmp !

@alfespa17
Copy link
Member

Thank you @BenjaminDecreusefond

@alfespa17 alfespa17 merged commit cba5dd1 into AzBuilder:main Nov 8, 2024
3 checks passed
@BenjaminDecreusefond
Copy link
Contributor Author

Hi @alfespa17 !

Do you have an ETA for when this will be available in executor image ? :)

@alfespa17
Copy link
Member

Maybe I create the image later today I would like to see if I have some free time to add support for variable sets

@BenjaminDecreusefond
Copy link
Contributor Author

Ok sure thanks !

@BenjaminDecreusefond
Copy link
Contributor Author

Hey @alfespa17 !

Sorry to bother you, but do you have any updates about this ? :)

@alfespa17
Copy link
Member

Hey @alfespa17 !

Sorry to bother you, but do you have any updates about this ? :)

You can try

https://github.com/AzBuilder/terrakube/releases/tag/2.24.0-beta.5

@BenjaminDecreusefond
Copy link
Contributor Author

Btw thank you @stanleyz I've been using the new images of the API and can confirm that jobs starts much faster now !

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 this pull request may close these issues.

3 participants