-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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(sdk): Add Input Parameter support for configmap, secrets, node selectors, tolerations, pull secrets #11621
base: master
Are you sure you want to change the base?
Conversation
c9c3858
to
61860db
Compare
cc @chensun please review the proto changes here when you get the chance so we are aligned here, as some fields are also being deprecated |
Please also note that this is a more generic implementation of how we were handling inputs already for pvc mounts in the k8s platform spec here, but extended to various other fields One thing also worth noting is that we probably don't need the entire |
|
The tests failures are a redherring, it's because of the compiled proto packages that are not utilizing the new code |
// Name of the Secret. | ||
string secret_name = 1; | ||
// Deprecated, use secret_name_parameter instead. | ||
string secret_name = 1 [deprecated = true]; |
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.
The order of such change should be:
- proto change, adding new field while mark the old one deprecated.
- backend change, support both new field and old field so it's forward and backward compatible at the same time.
- SDK change, switching to use new field.
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.
Here's a backend reference for this proto: https://github.com/kubeflow/pipelines/blob/94eca2102c8ee0df590566b1e115275f0654b6f6/backend/src/v2/driver/driver.go#L37C56-L37C74
If SDK changes goes live, users will hit errors from backend as the backend won't recognize the new field yet, and users will be stuck with no (backend) upgrade path.
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.
@chensun can you elaborate on your comment, I don't think I fully understand.
SDK change, switching to use new field.
@chensun the changes are additive, and user is not forced to switch to the new fields, as the old ones are still applicable. Only if they want to use the parameterization, then they need to opt for the new field.
I certainly don't want to wait for a backend release with the support for the new fields before we can cut the sdk release with the new changes., since backend releases happen at a much slower cadence.
61860db
to
e45ba7a
Compare
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change adds the necessary proto changes to accomodate parameterized input for various k8s platform fields: secrets, configmaps, node selectors, tolerations, and image pull secrets. It copies the input param pec from the pipeline spec, we can't import these due to circular dependencies. The format follows the standard that pvc_mount employs, but generalizes it further. Old fields are marked deprecated in favor of the new fields. Signed-off-by: Humair Khan <[email protected]>
Signed-off-by: Humair Khan <[email protected]>
Signed-off-by: Humair Khan <[email protected]>
Signed-off-by: Humair Khan <[email protected]>
8150850
to
804cb2d
Compare
Description of your changes:
Related:
set_env_variable
compatible with the channels [KFP V2] #10111These will be marked resolved once the backend pr is merged after this.
This change provides sdk support for the following kubernetes platform
fields:
It also adds support for tolerations, node selectors as input json for
the entire toleration & node selector spec. We opt for this solution
because if a user were to try to use as input parameters individual key
value pairs, the input parameter count would increase drastically.
The implementation borrows the InputParamSpec from the pipeline spec
package. This is copied over instead of imported due to cyclic
dependency issues with proto imports and the current project structure.
Additionally, pvc_mount is updated to accomodate this new spec, which
makes it more in line & consistent with how input parameters are handled
elsewhere in the spec.
Finally, all old name parameter fields like configmap names, secret
names, etc. are deprecated, as the runtime value proto message covers
this via it's constant field.
Checklist: