Repository navigation
feat(suggestion): allow pod-level settings for the Suggestion deployment - #2744
dipesh-svg wants to merge 1 commit into
Conversation
Add optional imagePullSecrets, nodeSelector, tolerations and affinity fields to SuggestionConfig in the Katib config, and set them on the Suggestion pod spec in DesiredDeployment. Container-level fields were already configurable through the inlined corev1.Container (kubeflow#2000); these are the remaining pod-level settings requested in kubeflow#1737. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: dipesh-svg <yadavdipesh2436@gmail.com>
|
🎉 Welcome to the Kubeflow Katib repo! 🎉 Thanks for opening your first PR! We're excited to have you onboard 🚀 Next steps:
Feel free to ask questions in the comments. Thanks again for contributing! 🙏 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @andreyvelich, could you take a look at this when you have some time? It lets users set pod-level settings for the Suggestion deployment. Happy to change anything. |
What this PR does / why we need it:
Since #2000,
SuggestionConfiginlinescorev1.Container, so container-level settings (command,args,env,resources, ...) can already be set in the Katib config. Pod-level settings still can't, becauseDesiredDeployment()only setsserviceAccountNameand the resume volume on the Suggestion pod spec. That's whyimagePullSecrets, the original ask in #1737, isn't possible today.This PR adds four optional pod-level fields to
SuggestionConfigand copies them to the Suggestion pod spec, as proposed in #1737 (comment):imagePullSecretsnodeSelectortolerationsaffinityThe simple
image:setup stays the same, and existing configs behave exactly as before because the fields are only set when present.Example:
Changes:
pkg/apis/config/v1beta1/types.go: new fields onSuggestionConfig.zz_generated.deepcopy.gowas regenerated withcontroller-genv0.18.0 (CONTROLLER_GEN_VERSIONin the Makefile); the diff only adds these fields.pkg/controller.v1beta1/suggestion/composer/composer.go: set the fields ond.Spec.Template.SpecinDesiredDeployment().composer_test.go: newTestDesiredDeploymentcase that sets all four fields and checks the resulting Deployment spec. I checked that the case fails without thecomposer.gochange.Tested locally with envtest (Kubernetes 1.34.0):
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #1737
Checklist:
I'll follow up with a docs PR for the Katib config page on kubeflow/website once the approach looks good.
Assisted-by: Claude