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

PoC - Use dynamic client in Chains services #1

Open
wants to merge 1 commit into
base: PoC-dynamic-client
Choose a base branch
from

Conversation

chuangw6
Copy link
Owner

@chuangw6 chuangw6 commented Mar 8, 2023

Changes

Use dynamic client to access Tekton CRD in Chains services (formatting, signing and uploading). This allows Chains services (excluding the controller logic) to work with the CRDs while avoiding strong dependencies.

Note: This is just an initial PoC PR for the refactor focusing on the taskrun level of the formatting service of the slsa v2 brand. If we decide to go down this route, more PRs will come.

Some high level steps:

  1. (done) NewController: get the dynamic client when the controller starts, and pass it down.
  2. (todo) Reconcile: change NewTaskRunObject to accept unstructured object
  3. (todo) Chains TektonObject: Refactor TektonObject so that it is based on unstructured object and has some operations to access the commonly used attributes of the Tekton objects (i.e. status.results, status.spec, status.startTime completeionTime etc.)
  4. (todo) Sign - entrypoint to Chains core services: tektonObj will be based on unstructured type. As such, some operations might not be accessible anymore.
  5. (wip) formatting service: refactor how the formatting service grabs attributes from unstructured objects.
  6. (todo) uploading service: Refactor all the backend services that need to access attributes from CRDs

Review guide

  • look for TODO [0-9] to check the corresponding places in the code for the steps mentioned above
  • All the functions whose name starts with reimpl are the refactor of its corresponding original implementation.

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@chuangw6 chuangw6 force-pushed the dynamic-client branch 2 times, most recently from f80c184 to c94a53d Compare March 8, 2023 16:33
Signed-off-by: Chuang Wang <chuangw@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant