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

WIP Add ANP upgrade doc #221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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: 1 addition & 0 deletions cmd/cluster-proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
)

func main() {
fmt.Println("cluster-proxy")
rand.Seed(time.Now().UTC().UnixNano())

klog.InitFlags(nil)
Expand Down
49 changes: 49 additions & 0 deletions dependencymagnet/apiserver-network-proxy/how-to-update-anp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
The cluster-proxy-addon is using a customized version apiserver-network-proxy. The repo(https://github.com/stolostron/apiserver-network-proxy) is forked from the upstream repo: [apiserver-network-proxy](https://github.com/kubernetes-sigs/apiserver-network-proxy/tree/v0.1.10).

And the ANP repo is depending on the repo(https://github.com/stolostron/grpc-go/blob/master/go.mod)

If you need to update the apiserver-network-proxy version, you can follow the steps below:

### 1. git clone the forked repos
```bash
git clone [email protected]:stolostron/apiserver-network-proxy.git
git clone [email protected]:stolostron/dependency-magnet.git
```

### 2. When need to update the dependencies

When we need to upgrade the go version, the too old version of go will cause the some build jobs failed.

The commit id of the customized code can be found in:
* https://github.com/kubernetes-sigs/apiserver-network-proxy/commit/d562699c78201daef7dec97cd1847e5abffbe2ab
* https://github.com/grpc/grpc-go/commit/72dd3e65ac56e8d6b1c6a7ad25404022f1cc7a0a

First under anp project, run:

```
git fetch upstream
git branch -r
git tag -l
```

Choose the appropriate tag and branch to update. For example, tag `v0.31.1`.

```
git checkout v0.31.1
```

The find which version of grpc-go is using in the anp project, in the following file, the version of grpc-go is `v1.67.1`.

```
➜ apiserver-network-proxy git:(konnectivity-client/v0.31.1) cat go.mod | grep grpc
google.golang.org/grpc v1.67.1
```

Then go to grpc-go project, and checkout the tag `v1.67.1`.

```
git fetch upstream
git branch -r
git tag -l
git checkout v1.67.1
```