• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / kubebuilder / 16050631177

03 Jul 2025 12:37PM UTC coverage: 58.994% (-12.4%) from 71.385%
16050631177

Pull #4871

github

vitorfloriano
✨ Add alpha update command for 3-way project upgrade

This commit introduces the `kubebuilder alpha update` command, which enables users to upgrade their Kubebuilder projects via a 3-way Git merge strategy.

The update flow:
- Creates an 'ancestor' branch based on the original scaffold version
- Extracts the user's current project state into a 'current' branch
- Generates a fresh scaffold using the target version in the 'upgrade' branch
- Merges changes into a 'merge' branch, preserving user code and applying updates

This mechanism allows users to safely adopt new scaffolding and maintain their custom logic with minimal manual effort.
Pull Request #4871: ✨ (alpha update) initial code for the `alpha update` command

49 of 797 new or added lines in 8 files covered. (6.15%)

2404 of 4075 relevant lines covered (58.99%)

13.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/cli/alpha/internal/update/utils.go
1
/*
2
Copyright 2025 The Kubernetes Authors.
3

4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7

8
    http://www.apache.org/licenses/LICENSE-2.0
9

10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
*/
16

17
package update
18

19
import (
20
        "fmt"
21
        "runtime"
22
)
23

24
const releaseURL = "https://github.com/kubernetes-sigs/kubebuilder/releases/download/%s/kubebuilder_%s_%s"
25

NEW
26
func buildReleaseURL(version string) string {
×
NEW
27
        return fmt.Sprintf(releaseURL, version, runtime.GOOS, runtime.GOARCH)
×
NEW
28
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc