-
Notifications
You must be signed in to change notification settings - Fork 52
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
Implement yaml extensions overwriting the default pod/container spec #75
Conversation
When running |
Hi. Is there any ETA for this PR to be merged? We're eagerly awaiting it as I understand it will allow us to request K8s resources such as GPUs for the build jobs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add an example .yaml that shows some possible overrides
@@ -23,6 +27,47 @@ describe('Run container step', () => { | |||
expect(exitCode).toBe(0) | |||
}) | |||
|
|||
it('should run pod with extensions applied', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave a //
explaining that we only assert successful run here not individual overrides
] | ||
} as k8s.V1Container | ||
|
||
const from = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: maybe from
-> extension
): void { | ||
for (const [key, value] of Object.entries(from)) { | ||
if (key === 'containers') { | ||
base.containers.push( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: extract function mergeContainers
like a few lines below with mergeLists
?
@@ -0,0 +1,30 @@ | |||
metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: comments indicating section by section if it's an 'replace' or a 'merge'?
No need if the ADR explains it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
A huge thanks for your work on this! We plan on using it for a build farm at Diamond Light Source (the UK's national synchrotron). So you are directly helping us with valuable scientific research into batteries, drugs for cancer, and materials science for renewables. |
Hey @cjreyn, Sorry that we did not respond earlier! Thank you for using the container hook and having interest in it! We are glad if it helps you with your work! |
Happy to see this merged! Seems you went with the template file after all 😉 I'll close my PR here: #50 Are there also plans for integrating this change in the actions-runner-controller downstream? We internally would love to move away from our current complex fork 😄 |
Implements ADR