Skip to content

feat(worker): add named template for workpool name and base job template#617

Open
cnfrancis wants to merge 1 commit intoPrefectHQ:mainfrom
cnfrancis:feat/add_named_template
Open

feat(worker): add named template for workpool name and base job template#617
cnfrancis wants to merge 1 commit intoPrefectHQ:mainfrom
cnfrancis:feat/add_named_template

Conversation

@cnfrancis
Copy link
Copy Markdown

@cnfrancis cnfrancis commented Apr 10, 2026

Summary

Have this use case to be able to deploy the same workpools to different data centers in different regions.
Using argocd at runtime we inject such information which we consume in an internal wrapper chart.
The change introduced in this PR will allow us to redefine the named template in our wrapper chart so that following in argocd will work:

helm template \
 -f values/worker-values.yaml \
 -f values/dev/workers/worker-values.yaml \
 -f values/dev/workers/admin.yaml \
  --set region=amer

From this above in our wrapper chart - will be able to build the workpool name dynamically as well allow dictionary merging of baseJobTemplate

Otherwise we have to duplicate per region e.g

helm template \
 -f values/amer/worker-values.yaml \
 -f values/amer/dev/workers/worker-values.yaml \
 -f values/amer/dev/workers/admin.yaml \

The changes suggested aim to be backward compatible hence why it is wrapped in a named template with the same value reference as before.

Requirements

  • Contributing guide has been read
  • Title follows the conventional commits format
  • Body includes Closes <issue>, if available
  • Added/modified configuration includes a descriptive comment for documentation generation
  • Unit tests are added/updated
  • Deprecation/removal checks are added in templates/NOTES.txt
  • Relevant labels are added
  • Draft status is used until ready for review

@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 10, 2026 02:41 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 13, 2026 23:15 — with GitHub Actions Waiting
@cnfrancis cnfrancis force-pushed the feat/add_named_template branch from 525fdbc to 0441a44 Compare April 14, 2026 01:38
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:38 — with GitHub Actions Waiting
@cnfrancis cnfrancis marked this pull request as ready for review April 14, 2026 01:41
@cnfrancis cnfrancis requested a review from a team as a code owner April 14, 2026 01:41
@cnfrancis cnfrancis force-pushed the feat/add_named_template branch from 0441a44 to 80cb519 Compare April 14, 2026 01:47
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis requested a deployment to Acceptance Tests (External) April 14, 2026 01:47 — with GitHub Actions Waiting
@cnfrancis cnfrancis force-pushed the feat/add_named_template branch from 80cb519 to d098ce6 Compare April 14, 2026 01:48
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis temporarily deployed to Acceptance Tests (External) April 14, 2026 01:48 — with GitHub Actions Inactive
@cnfrancis cnfrancis changed the title feat: add named template for workpool name and base job template feat(worker): add named template for workpool name and base job template Apr 14, 2026
@cnfrancis
Copy link
Copy Markdown
Author

hello @mitchnielsen @desertaxle, hope you're all well!
what are your thoughts on this PR ? and generally speaking what is your release schedule like?

@mitchnielsen mitchnielsen added the feature A new feature label Apr 14, 2026
@mitchnielsen
Copy link
Copy Markdown
Member

Thanks for the contribution @cnfrancis! Taking a look now.

We don't have a set release schedule. We usually create a release after merging a PR.

Comment on lines +243 to +247
"workPoolName": {
"type": "string",
"title": "Work Pool Name",
"description": "Named template version of workPool allowing to build name dynamically in wrapper charts"
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a named template matching this, but not a user-configurable Helm value for it, right? We should be able to remove this block.

Copy link
Copy Markdown
Member

@mitchnielsen mitchnielsen left a comment

Choose a reason for hiding this comment

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

This is looking good overall, just a suggestion on the added Helm value. Could you also please add some unit tests to make sure this is working as expected? You can see examples in charts/prefect-*/tests/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants