-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
cleanup: use pkg/platforms instead of containerd/platforms to … #8579
Conversation
732f274
to
a5f944c
Compare
The following is the coverage report on the affected files.
|
/kind cleanup |
The following is the coverage report on the affected files.
|
@jkhelil thank you for finding this. This doesn't require doc notes as well as the functionality is simple as we are just getting the runtime platform information. Maybe it makes sense to check if other tekton binaries are pulling in unused transitve deps like this as well and how can we clean the code up further. /approve |
a5f944c
to
53118fd
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester, waveywaves The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
…avoid crypto dependency
Context
To make Tekton Pipelines FIPS compliant, the entrypoint command is a key step in this effort. Since it is statically compiled, we must ensure that cryptographic symbols are removed from the entrypoint binary.
This PR removes the indirect dependency on the crypto package from the entrypoint command by replacing github.com/containerd/containerd/platforms with github.com/tektoncd/pipeline/pkg/platforms, which does not rely on crypto
Using
go list -f '{{.ImportPath}} {{.Imports}}' -deps ./cmd/entrypoint
I identified a dependency cycle leading to crypto:
entrypoint -> containerd/platforms -> image-spec -> go-digest -> crypto
Since containerd/platforms was only needed for platform-related logic, I replaced it with github.com/tektoncd/pipeline/pkg/platforms, which provides the same functionality without pulling in crypto.
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes