Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HumairAK
Copy link
Collaborator

@HumairAK HumairAK commented Feb 12, 2025

Description of your changes:

Related:

These will be marked resolved once the backend & sdk changes are merged after this.

This change provides proto api support for the following kubernetes platform
fields:

  • configmap name for configmap as env & volume
  • secret name for configmap as env & volume
  • image pull secret name
  • toleration json
  • node selector json

Checklist:

@HumairAK
Copy link
Collaborator Author

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

@HumairAK
Copy link
Collaborator Author

HumairAK commented Feb 12, 2025

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 InputParameterSpec as it is defined in the pipelinespec, for example TaskFinalStatus might not make much sense here, but for simplicity and maintainability's sake I figured it's easier to just keep them fully in sync. In the future we should consider just updating the structure of our proto files so we can directly import these instead of copying them over.

@chensun chensun self-assigned this Feb 12, 2025
@HumairAK
Copy link
Collaborator Author

HumairAK commented Feb 12, 2025

CI failures are due to flaky tests I believe. Will retry them a couple of times to confirm.
Actually I don't think so, investigating.

@HumairAK
Copy link
Collaborator Author

HumairAK commented Feb 12, 2025

The tests failures are a redherring, it's because of the compiled proto packages that are not utilizing the new code
See this test PR that references the k8s go packages locally, the tests here pass, the only difference being this commit

@HumairAK HumairAK force-pushed the issue-10914-sdk branch 10 times, most recently from 9f1bdb5 to 9e3efbd Compare February 19, 2025 18:20
@google-oss-prow google-oss-prow bot added size/L and removed size/XXL labels Feb 19, 2025
@HumairAK HumairAK force-pushed the issue-10914-sdk branch 7 times, most recently from 6115f6d to ae0f759 Compare February 20, 2025 05:07
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 <HumairAK@users.noreply.github.com>
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from chensun. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants