-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Fix kubectl plugin release #13157
base: main
Are you sure you want to change the base?
Fix kubectl plugin release #13157
Conversation
… as goreleaser fails otherwise
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alexintech 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 |
Welcome @alexintech! |
Hi @alexintech. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for kubernetes-ingress-nginx canceled.
|
I'm currently still at KubeCon in London, but I'd like to review this so we can have it in the next patch releases. /hold |
What this PR does / why we need it:
Fixes build and release of the kubectl plugin using GitHub Actions and publishes updates to krew-index.
Fixes #12226 #10738
Since GoReleaser and krew-index require semantic version tags, the
controller-vx.x.x
tags violate SemVer. The GitHub Action has been modified to run only on tags prefixed withcontroller-
and to extract only thevx.x.x
part for versioning.Some workarounds were implemented, such as setting the git tag within the pipeline because goreleaser release requires a valid SemVer tag in git. The release functionality of GoReleaser is not used, as it would create a new GitHub release without the
controller-
prefix. Instead, thesoftprops/action-gh-release
action is used to upload artifacts to the existing release.Another issue is that krew’s plugin manifest requires the version field to be a valid SemVer tag. The
rajatjindal/krew-release-bot
action uses{{ .Tag }}
as the git tag when the action starts (controller-vx.x.x
), which fails validation. To resolve this, the krew manifest generation has been changed to use GoReleaser’s Krew publish.Types of changes
Which issue/s this PR fixes
fixes #12226
fixes #10738
How Has This Been Tested?
I have created test releases in a forked repository. See the controller-v1.12.1 release and the GitHub Action. A test PR to krew-index has been created by the GitHub Workflow.
The helm-4.12.1 release skips the workflow.
Checklist: