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 possibility to build custom Kubernetes forks #2074

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented May 19, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

This patch adds the possibility to use the environment variables K8S_ORG, K8S_REPO and K8S_REF to specify a custom Kubernetes fork for building releases. It is not possible right now to krel release them. But staging for testing and artifact discovery is a common use cases when changing the build infra in k/k.

Which issue(s) this PR fixes:

Fixes #1883

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

Added `K8S_ORG`, `K8S_REPO` and `K8S_REF` environment variable support to stage custom k/k forks.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. 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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/release-eng Issues or PRs related to the Release Engineering subproject labels May 19, 2021
@k8s-ci-robot k8s-ci-robot added 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. labels May 19, 2021
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 19, 2021
@saschagrunert saschagrunert force-pushed the custom-k8s branch 3 times, most recently from 599bfc3 to a018f48 Compare May 19, 2021 10:50
@saschagrunert
Copy link
Member Author

saschagrunert commented May 19, 2021

Testing with kubernetes/kubernetes#102126 and kubernetes/kubernetes#102125:

> export TOOL_ORG=saschagrunert \
    TOOL_REF=custom-k8s \
    K8S_ORG=saschagrunert \
    K8S_REF=automated-cherry-pick-of-#98529-upstream-release-1.19 && \
    go run ./cmd/krel stage --branch release-1.19 --type=official

https://console.cloud.google.com/cloud-build/builds/a743e675-554d-46b5-a89a-373ba1a93b40?project=kubernetes-release-test

> export TOOL_ORG=saschagrunert \
    TOOL_REF=custom-k8s \
    K8S_ORG=saschagrunert \
    K8S_REF=automated-cherry-pick-of-#98529-upstream-release-1.20 && \
    go run ./cmd/krel stage --branch release-1.20 --type=official

https://console.cloud.google.com/cloud-build/builds/fbb03860-7e77-4f27-8953-34885dd8d18f?project=kubernetes-release-test

@saschagrunert
Copy link
Member Author

We could think about making those variables real flags in krel, which would allow us adding some documentation as well as use cases around them.

@saschagrunert saschagrunert changed the title WIP: Add possibility to build custom Kubernetes forks Add possibility to build custom Kubernetes forks May 19, 2021
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 19, 2021
@saschagrunert
Copy link
Member Author

Ready for some first thoughts 🙃

@puerco
Copy link
Member

puerco commented May 22, 2021

I wanted to hook up during the week to talk about this but I was buried in work. It looks good to me obviously, but I'm curious about the use case. HOw are you planning to use it? 🤔

@justaugustus
Copy link
Member

Same question as Adolfo!
Let's discuss next week. :)

@saschagrunert
Copy link
Member Author

I wanted to hook up during the week to talk about this but I was buried in work. It looks good to me obviously, but I'm curious about the use case. HOw are you planning to use it?

The use case would be, that if I change a code part in k/k which affects the way how we build releases, then I'm now able to verify those changes by staging a custom release from my fork.

Another (future) use case could be, that as a maintainer of a custom k/k fork, I'm now able to cut releases within community infra. This is a different discussion where we have to decide if we wanna go that far, but in theory it would be possible.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 27, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 25, 2021
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Aug 31, 2021

@saschagrunert: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-release-image-kpromo a018f48 link /test pull-release-image-kpromo

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 30, 2021
@justaugustus
Copy link
Member

@saschagrunert -- Can you rebase?

@justaugustus justaugustus removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 5, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 5, 2021
@saschagrunert
Copy link
Member Author

Rebased and tested manually.

Copy link
Member

@justaugustus justaugustus left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks @saschagrunert!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 7, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus, saschagrunert

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 [justaugustus,saschagrunert]

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

@k8s-ci-robot k8s-ci-robot merged commit 971affe into kubernetes:master Oct 7, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Oct 7, 2021
@saschagrunert saschagrunert deleted the custom-k8s branch October 8, 2021 07:09
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.

Trigger a full Kubernetes build manually
5 participants