Skip to content

feat: mount pvc on jobs #1982

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

Merged

Conversation

BenjaminDecreusefond
Copy link
Contributor

Hi @alfespa17 !

I'd like to propose this small change for ephemeral agents. The idea is that we use a Persistent volume claim (PVC) that we mount on our jobs at each run. Then since TF_PLUGIN_CACHE_DIR is set, tofu "automatically" comes to grab the content of this folder in case the provider was previously downloaded.

NB: PVC must be defined in the Terrakube Helm charts. Terrakube app should not be responsible for PVC provisionning.

Lemme know your thoughts
PS: not tested

@alfespa17
Copy link
Member

Hello @BenjaminDecreusefond

I think you will need to do some additional changes to this PR, maybe adding some code to validate if PVC_CLAIM_NAME is present if not the container will break because the is no pvc to add.

@alfespa17 alfespa17 marked this pull request as draft April 2, 2025 21:40
@BenjaminDecreusefond
Copy link
Contributor Author

Hi @alfespa17 !

Made rectification on the code ! Lemme know :)

@alfespa17 alfespa17 marked this pull request as ready for review April 3, 2025 16:56
@alfespa17
Copy link
Member

It looks better now

@alfespa17 alfespa17 merged commit b73c753 into AzBuilder:main Apr 3, 2025
3 checks passed
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.

2 participants