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

add krel sign blobs and images commands #2742

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Nov 3, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • add krel sign command to sign artifacts

/assign @saschagrunert @puerco @xmudrii @jeremyrickard

Which issue(s) this PR fixes:

Fixes #2618

Special notes for your reviewer:

Does this PR introduce a user-facing change?

add krel sign blobs and images commands

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 3, 2022
@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 3, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Nov 3, 2022
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 3, 2022
@cpanato
Copy link
Member Author

cpanato commented Nov 3, 2022

opening as draft to collect early feedback

@cpanato
Copy link
Member Author

cpanato commented Nov 3, 2022

/test all

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start!

cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
@cpanato cpanato changed the title add krel sign command to sign artifacts add krel sign blobs and images commands Nov 4, 2022
@cpanato
Copy link
Member Author

cpanato commented Nov 4, 2022

/test all

@cpanato
Copy link
Member Author

cpanato commented Nov 4, 2022

Great start!

If I see it correctly, then we need in addition to that:

  • A cloudbuild job running krel sign
  • The boilerplate in anago to copy the artifacts around

Is krel sign something release managers have to execute manually or do we want to rely on some automation?

I think the idea is to use it as part of the pipeline for the release, maybe @puerco can comment as well, but this was my understanding

Also, I am having trouble using the lib to use in keyless mode, there is anything we need to do? or does that only work if we set up a GCP service account?

also:

  • having some trouble to understand what kind of cloudbuild job we need
  • and the boilerplate in anago as well

cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
@saschagrunert
Copy link
Member

Is krel sign something release managers have to execute manually or do we want to rely on some automation?

I think the idea is to use it as part of the pipeline for the release, maybe @puerco can comment as well, but this was my understanding

So I assume it has to be run manually in the same way we do it with krel stage/release.

Also, I am having trouble using the lib to use in keyless mode, there is anything we need to do? or does that only work if we set up a GCP service account?

Hm, yeah this could be tested via cloudbuild.yaml.

also:

  • having some trouble to understand what kind of cloudbuild job we need

Assuming that we run it side by side to krel stage/release, then we have to create a new cloudbuild job in https://github.com/kubernetes/release/tree/master/gcb

  • and the boilerplate in anago as well

That's tricky, but we can iterate on it. Krel decides based on the flags if it should submit a cloudbuild job or run the actual logic:

func runStage(options *anago.StageOptions) error {
options.NoMock = rootOpts.nomock
stage := anago.NewStage(options)
if submitJob {
return stage.Submit(stream)
}
return stage.Run()
}

@puerco
Copy link
Member

puerco commented Nov 6, 2022

@saschagrunert :

So I assume it has to be run manually in the same way we do it with krel stage/release.

No I think we don't need to have it triggered by a release manager, I agree with @cpanato that we should add it as part of the existing pipeline:

the idea is to use it as part of the pipeline for the release

My thinking is that we should sign everything in a step inside the release GCB job. Specifically, I think we should insert it here:

https://github.com/kubernetes/release/blob/master/gcb/release/cloudbuild.yaml#L44

@saschagrunert
Copy link
Member

My thinking is that we should sign everything in a step inside the release GCB job. Specifically, I think we should insert it here:

https://github.com/kubernetes/release/blob/master/gcb/release/cloudbuild.yaml#L44

Sounds good, let's do it that way to keep things simple.

cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
@saschagrunert
Copy link
Member

@cpanato do you have any update on this change?

@cpanato cpanato force-pushed the GH-2618 branch 2 times, most recently from 21602cd to fa0945d Compare November 22, 2022 13:35
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
gcb/release/cloudbuild.yaml Outdated Show resolved Hide resolved
pkg/gcp/gcb/gcb.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign_blobs.go Outdated Show resolved Hide resolved
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @cpanato!!
/lgtm
/approve
/hold
if @saschagrunert wants to take a look, otherwise unhold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Nov 28, 2022
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two nits, otherwise LGTM

cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
cmd/krel/cmd/sign.go Outdated Show resolved Hide resolved
Signed-off-by: cpanato <ctadeu@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 29, 2022
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/unhold

Thank you @cpanato!

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 29, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, saschagrunert, xmudrii

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:
  • OWNERS [cpanato,saschagrunert,xmudrii]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@saschagrunert
Copy link
Member

@cpanato do we wanna give this a test run ahead of the next RC?

@k8s-ci-robot k8s-ci-robot merged commit 2a7e0e6 into kubernetes:master Nov 29, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Nov 29, 2022
@cpanato cpanato deleted the GH-2618 branch November 29, 2022 11:41
@cpanato
Copy link
Member Author

cpanato commented Nov 29, 2022

yes, can you kick a mock one?

also, i will implement the sign images as a follow up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement file signing step
6 participants