Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/root-phase0/apiexport-cache.kcp.io.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha2
kind: APIExport
metadata:
creationTimestamp: null
name: cache.kcp.io
spec:
resources:
Expand Down
1 change: 0 additions & 1 deletion config/root-phase0/apiexport-shards.core.kcp.io.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha2
kind: APIExport
metadata:
creationTimestamp: null
name: shards.core.kcp.io
spec:
resources:
Expand Down
1 change: 0 additions & 1 deletion config/root-phase0/apiexport-tenancy.kcp.io.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha2
kind: APIExport
metadata:
creationTimestamp: null
name: tenancy.kcp.io
spec:
maximalPermissionPolicy:
Expand Down
1 change: 0 additions & 1 deletion config/root-phase0/apiexport-topology.kcp.io.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha2
kind: APIExport
metadata:
creationTimestamp: null
name: topology.kcp.io
spec:
resources:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v250523-2b8c1d3c5.cachedobjects.cache.kcp.io
spec:
group: cache.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v251120-d8e87a979.cachedresourceendpointslices.cache.kcp.io
spec:
group: cache.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v250920-de0c8484d.cachedresources.cache.kcp.io
spec:
group: cache.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v251016-6e24e0d49.logicalclusters.core.kcp.io
spec:
group: core.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v240903-d6797056a.partitions.topology.kcp.io
spec:
group: topology.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v240903-d6797056a.partitionsets.topology.kcp.io
spec:
group: topology.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v240903-d6797056a.shards.core.kcp.io
spec:
group: core.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v250827-717cfea84.workspaceauthenticationconfigurations.tenancy.kcp.io
spec:
group: tenancy.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v251015-1d163d0e5.workspaces.tenancy.kcp.io
spec:
group: tenancy.kcp.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: apis.kcp.io/v1alpha1
kind: APIResourceSchema
metadata:
creationTimestamp: null
name: v251015-1d163d0e5.workspacetypes.tenancy.kcp.io
spec:
group: tenancy.kcp.io
Expand Down
63 changes: 32 additions & 31 deletions docs/content/contributing/guides/rebasing-kubernetes.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# Rebasing Kubernetes

This describes the process of rebasing kcp onto a new Kubernetes version. For the examples below, we'll be rebasing
onto v1.33.3
onto v1.34.2

1. Create a new branch for the update, such as `1.34.2-prep` in main monorepo

# 1. Update kcp-dev/apimachinery

1. Create a new branch for the update, such as `1.31-prep`.
2. Update go.mod:
2. Go into the `staging/src/github.com/kcp-dev/apimachinery` directory.
3. Update go.mod:
1. You may need to change the go version at the top of the file to match what's in go.mod in the root of the
Kubernetes repo. This is not required, but probably a good idea.
2. Update the primary Kubernetes dependencies:
```
go get k8s.io/api@v0.31.0 k8s.io/apimachinery@v0.31.0 k8s.io/client-go@v0.31.0
go get k8s.io/api@v0.34.2 k8s.io/apimachinery@v0.34.2 k8s.io/client-go@v0.34.2
```
3. Run `go mod tidy`.
3. Manually review the code that is upstream from `third_party` and make the same/similar edits to anything that
4. Manually review the code that is upstream from `third_party` and make the same/similar edits to anything that
changed upstream. For example, we maintain a slightly modified copy of the
[shared informer code](https://github.com/kubernetes/kubernetes/blob/v1.30.1/staging/src/k8s.io/client-go/tools/cache/shared_informer.go).
4. Run `make lint test`. Fix any issues you encounter.
5. Commit your changes.
6. Push to your fork.
7. Open a PR; get it reviewed and merged.
[shared informer code](https://github.com/kubernetes/kubernetes/blob/v1.34.2/staging/src/k8s.io/client-go/tools/cache/shared_informer.go).
5. Run `make lint test`. Fix any issues you encounter.
6. Commit your changes so we have a clean commits for each step.

# 2. Update kcp-dev/code-generator

1. Create a new branch for the update, such as `1.26-prep`.
2. Update `go.mod`:
1. You may need to change the go version at the top of the file to match what's in go.mod in the root of the
Kubernetes repo. This is not required, but probably a good idea.
2. Update the primary Kubernetes dependencies:
```
go get k8s.io/apimachinery@v0.31.0 k8s.io/code-generator@v0.31.0
go get k8s.io/apimachinery@v0.34.2 k8s.io/code-generator@v0.34.2
```
3. Run `go mod tidy`.
3. Repeat step 2 for `examples/go.mod`:
Expand All @@ -42,33 +41,25 @@ onto v1.33.3
2. If there were any substantive changes, make the corresponding edits to our generators.
3. You'll probably want to commit your changes at this point.
5. Run `make codegen`. You'll probably want to commit these changes as a standalone commit.
6. Run `make lint test build` and fix any issues you encounter.
7. Commit any remaining changes.
8. Push to your fork.
9. Open a PR; get it reviewed and merged.
6. Run `make build` and fix any issues you encounter.
7. Commit your changes so we have a clean commits for each step.

# 3. Update kcp-dev/client-go
1. Create a new branch for the update, such as `1.26-prep`.
2. Update go.mod:
1. You may need to change the go version at the top of the file to match what's in go.mod in the root of the
Kubernetes repo. This is not required, but probably a good idea.
2. Update the `kcp-dev/apimachinery` dependency:
```
go get github.com/kcp-dev/apimachinery@main github.com/kcp-dev/code-generator@main
```
3. That should have updated the primary Kubernetes dependencies, but in case it didn't, you can do so manually:
2. That should have updated the primary Kubernetes dependencies, but in case it didn't, you can do so manually:
```
go get k8s.io/api@v0.31.0 k8s.io/apimachinery@v0.31.0 k8s.io/client-go@v0.31.0 k8s.io/apiextensions-apiserver@v0.31.0
go get k8s.io/api@v0.34.2 k8s.io/apimachinery@v0.34.2 k8s.io/client-go@v0.34.2 k8s.io/apiextensions-apiserver@v0.34.2 k8s.io/code-generator@v0.34.2
```
4. Run `go mod tidy`.
3. Run `go mod tidy`.
3. Run `hack/populate-copies.sh`, this will copy files originally copied
from upstream over the local copies. Review the changes and ensure
changes from upstream are handled.
changes from upstream are handled. Its recommented to have clean branch
for this as it will produce many changes, which most are "carry-on", so will require manual review.
4. Run `make codegen`. You'll probably want to commit these changes as a standalone commit.
5. Run `make lint` and fix any issues you encounter.
6. Commit any remaining changes.
7. Push to your fork.
8. Open a PR; get it reviewed and merged.
5. Commit your changes so we have a clean commits for each step.

# 4. Update kcp-dev/kubernetes

Expand Down Expand Up @@ -106,7 +97,7 @@ Commits merged into `kcp-dev/kubernetes` follow this commit message format:
5. Prepare a list of commits:
1. Checkout the current fork branch:
```
git checkout kcp-dev/kcp-1.32.3
git checkout kcp-dev/kcp-1.33.5
```
2. Export the commits to cherry-pick them:
```
Expand All @@ -118,14 +109,22 @@ Commits merged into `kcp-dev/kubernetes` follow this commit message format:
attention.
6. Prepare a branch to cherry-pick the commits onto:
```
git reset --hard v1.33.3
git reset --hard v1.34.2
```
7. Prepare base branch in kcp fork (you might need to ask maintainer to do this):
1. Create a new branch in kcp-dev/kubernetes fork, e.g. `kcp-1.34-baseline`, based off `v1.34.2` in
`kcp-dev/kubernetes`.
2. Push the new branch to kcp fork in GitHub.
8. Set up your local repo to point to the new baseline branch and prepare to cherry-pick:
```
git checkout -b kcp-1.34.2-pre.1
```

Note: To make validating changes easier you can use these functions:

```bash
# record the changed files between the version kcp will jump
git diff --name-only v1.32.3 v1.33.3 > ../changed_files.txt
git diff --name-only v1.33.5 v1.34.2 > changed_files.txt

# list_changed_files lists the files changed in the current commit
list_changed_files() {
Expand Down Expand Up @@ -229,6 +228,8 @@ two kube versions.

# 5. Update kcp-dev/kcp

If you want to test this before pushing - you can use `go.work` to point to your local copy of kcp-dev/kubernetes and test.

1. At this point, you're ready to try to integrate the updates into kcp proper. There is still likely a good
amount of work to do, so don't get discouraged if you encounter dozens or hundreds of compilation issues at
this point. That's totally normal!
Expand Down
26 changes: 14 additions & 12 deletions docs/generators/cli-doc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ require (
github.com/charmbracelet/x/term v0.2.1 // indirect
github.com/clipperhouse/uax29/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -64,7 +64,7 @@ require (
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
Expand All @@ -79,6 +79,8 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.29.0 // indirect
golang.org/x/sync v0.14.0 // indirect
Expand All @@ -90,19 +92,19 @@ require (
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.33.5 // indirect
k8s.io/apiextensions-apiserver v0.33.3 // indirect
k8s.io/apimachinery v0.33.5 // indirect
k8s.io/api v0.34.2 // indirect
k8s.io/apiextensions-apiserver v0.34.2 // indirect
k8s.io/apimachinery v0.34.2 // indirect
k8s.io/cli-runtime v0.33.3 // indirect
k8s.io/client-go v0.33.5 // indirect
k8s.io/component-base v0.33.3 // indirect
k8s.io/client-go v0.34.2 // indirect
k8s.io/component-base v0.34.2 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/api v0.19.0 // indirect
sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)
Loading