Skip to content

Commit 09b6b35

Browse files
authored
Update versions (#2398)
1 parent 873cc6a commit 09b6b35

File tree

30 files changed

+288
-196
lines changed

30 files changed

+288
-196
lines changed

.circleci/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ commands:
1010
name: Install Go
1111
command: |
1212
sudo rm -rf /usr/local/go
13-
wget https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz
14-
sudo tar -C /usr/local -xzf go1.16.5.linux-amd64.tar.gz
13+
wget https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz
14+
sudo tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz
1515
rm -rf go*.tar.gz
1616
echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
1717
echo 'export PATH=$PATH:~/go/bin' >> $BASH_ENV
@@ -94,7 +94,7 @@ jobs:
9494

9595
test:
9696
machine:
97-
image: ubuntu-1604:202104-01 # machine executor necessary to run go integration tests
97+
image: ubuntu-1604:202104-01 # machine executor necessary to run go integration tests
9898
resource_class: medium
9999
steps:
100100
- checkout

CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ To install Go on linux, run:
2222

2323
```bash
2424
mkdir -p ~/bin && \
25-
wget https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz && \
26-
sudo tar -xvf go1.16.5.linux-amd64.tar.gz && \
25+
wget https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz && \
26+
sudo tar -xvf go1.17.3.linux-amd64.tar.gz && \
2727
sudo mv go /usr/local && \
28-
rm go1.16.5.linux-amd64.tar.gz && \
28+
rm go1.17.3.linux-amd64.tar.gz && \
2929
echo 'export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"' >> $HOME/.bashrc
3030
```
3131

build/generate_ami_mapping.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ func main() {
222222
json.Unmarshal(jsonBytes, &k8sVersionMap)
223223
}
224224

225-
k8sVersion := "1.20"
225+
k8sVersion := "1.21"
226226

227227
if k8sVersionMap[k8sVersion] == nil {
228228
k8sVersionMap[k8sVersion] = map[string]map[string]string{}

dev/load.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func runConstantRequestsPerSecond(url string, jsonBytes []byte) {
109109
ticker := time.NewTicker(_requestInterval)
110110
done := make(chan bool)
111111

112-
c := make(chan os.Signal)
112+
c := make(chan os.Signal, 1)
113113
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
114114
go func() {
115115
<-c
@@ -203,7 +203,7 @@ func runConstantInFlightIteration(url string, jsonBytes []byte, loopNum int) boo
203203

204204
wasKilled := false
205205
killed := make(chan bool)
206-
c := make(chan os.Signal)
206+
c := make(chan os.Signal, 1)
207207
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
208208
go func() {
209209
<-c

dev/versions.md

+61-33
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
1. Update `generate_eks.py` if necessary
88
1. Check that `eksctl utils write-kubeconfig` log filter still behaves as desired, and logs in `cortex cluster up` look good.
99
1. Update eksctl on your dev
10-
machine: `curl --location "https://github.com/weaveworks/eksctl/releases/download/0.51.0/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp && sudo mv -f /tmp/eksctl /usr/local/bin`
11-
1. Check if eksctl iam polices changed by comparing the previous version of the eksctl policy docs to the new version's and update `./dev/minimum_aws_policy.json` and `docs/clusters/management/auth.md` accordingly. https://github.com/weaveworks/eksctl/blob/v0.51.0/userdocs/src/usage/minimum-iam-policies.md
10+
machine: `curl --location "https://github.com/weaveworks/eksctl/releases/download/v0.67.0/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp && sudo mv -f /tmp/eksctl /usr/local/bin`
11+
1. Check if eksctl iam polices changed by comparing the previous version of the eksctl policy docs to the new version's and update `./dev/minimum_aws_policy.json` and `docs/clusters/management/auth.md` accordingly. https://github.com/weaveworks/eksctl/blob/v0.67.0/userdocs/src/usage/minimum-iam-policies.md
1212

1313
## Kubernetes
1414

@@ -36,11 +36,18 @@
3636
1. Update the version in `images/manager/Dockerfile` and `images/operator/Dockerfile`
3737
1. Update your local version and alert developers
3838
* Linux:
39-
1. `curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl`
40-
1. `chmod +x ./kubectl`
41-
1. `sudo mv -f ./kubectl /usr/local/bin/kubectl`
42-
1. refresh shell
43-
1. `kubectl version`
39+
40+
```shell
41+
mkdir -p $HOME/temp && \
42+
cd $HOME/temp && \
43+
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
44+
chmod +x ./kubectl && \
45+
sudo mv -f ./kubectl /usr/local/bin/kubectl && \
46+
if [ -f $HOME/.bash_profile ]; then source $HOME/.bash_profile; else source $HOME/.bashrc; fi && \
47+
cd - && \
48+
kubectl version
49+
```
50+
4451
* Mac:
4552
1. `brew upgrade kubernetes-cli`
4653
1. refresh shell
@@ -57,33 +64,40 @@
5764

5865
## AWS CNI
5966

60-
1. Update the CNI version in `eks_cluster.yaml` ([CNI releases](https://github.com/aws/amazon-vpc-cni-k8s/releases))
67+
1. Update the CNI version in `generate_eks.py` ([CNI releases](https://github.com/aws/amazon-vpc-cni-k8s/releases))
6168
1. Update the go module version (see `Go > Non-versioned modules` section below)
6269
1. Check if new instance types were added by running the script below (update the two env vars at the top).
6370
1. If there are new instance types, check if any changes need to be made to `servicequotas.go` or `validateInstanceType()`.
6471
6572
```bash
66-
PREV_RELEASE=1.7.10
67-
NEW_RELEASE=1.8.0
73+
PREV_RELEASE=1.8.0
74+
NEW_RELEASE=1.9.3
6875
wget -q -O cni_supported_instances_prev.txt https://github.com/raw/aws/amazon-vpc-cni-k8s/v${PREV_RELEASE}/pkg/awsutils/vpc_ip_resource_limit.go; wget -q -O cni_supported_instances_new.txt https://github.com/raw/aws/amazon-vpc-cni-k8s/v${NEW_RELEASE}/pkg/awsutils/vpc_ip_resource_limit.go; git diff --no-index cni_supported_instances_prev.txt cni_supported_instances_new.txt; rm -rf cni_supported_instances_prev.txt; rm -rf cni_supported_instances_new.txt
6976
```
7077
7178
## Go
7279
7380
1. Find the latest release on Golang's [release page](https://golang.org/doc/devel/release.html) (
7481
or [downloads page](https://golang.org/dl/)) and check the changelog
75-
1. Search the codebase for the current minor version (e.g. `1.16`), update versions as appropriate
82+
1. Search the codebase for the current minor version (e.g. `1.17`), update versions as appropriate
7683
1. Update your local version and alert developers:
7784
* Linux:
78-
1. `wget https://dl.google.com/go/go1.16.5.linux-amd64.tar.gz`
79-
1. `tar -xvf go1.16.5.linux-amd64.tar.gz`
80-
1. `sudo rm -rf /usr/local/go`
81-
1. `sudo mv -f go /usr/local`
82-
1. `rm go1.16.5.linux-amd64.tar.gz`
83-
1. refresh shell
84-
1. `go version`
85+
86+
```shell
87+
mkdir -p $HOME/temp
88+
cd $HOME/temp
89+
wget https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz && \
90+
tar -xvf go1.17.3.linux-amd64.tar.gz && \
91+
sudo rm -rf /usr/local/go && \
92+
sudo mv -f go /usr/local && \
93+
rm go1.17.3.linux-amd64.tar.gz && \
94+
if [ -f $HOME/.bash_profile ]; then source $HOME/.bash_profile; else source $HOME/.bashrc; fi && \
95+
cd - && \
96+
go version
97+
```
98+
8599
* Mac:
86-
1. `brew upgrade go` or `brew install go@1.16`
100+
1. `brew upgrade go` or `brew install go@1.17`
87101
1. refresh shell
88102
1. `go version`
89103
1. Update go modules as necessary
@@ -92,7 +106,7 @@ wget -q -O cni_supported_instances_prev.txt https://github.com/raw/aw
92106
93107
### Kubernetes client
94108
95-
1. Find the latest patch release for the minor kubernetes version that we use (e.g. for k8s 1.20, use `client-go` version `v0.20.X`, where `X` is the latest available patch release)
109+
1. Find the latest patch [release](https://github.com/kubernetes/client-go) for the minor kubernetes version that we use (e.g. for k8s 1.21, use `client-go` version `v0.21.X`, where `X` is the latest available patch release)
96110
1. Follow the "Update non-versioned modules" instructions using the updated version for `k8s.io/client-go`
97111
98112
### Istio client
@@ -102,7 +116,7 @@ wget -q -O cni_supported_instances_prev.txt https://github.com/raw/aw
102116
103117
### docker/engine/client
104118
105-
1. Find the latest tag from [releases](https://github.com/docker/engine/releases)
119+
1. Find the latest tag from [here](https://github.com/docker/engine/tags)
106120
1. Follow the "Update non-versioned modules" instructions using the updated version for `docker/engine`
107121
108122
_note: docker client installation may be able to be improved,
@@ -131,21 +145,23 @@ see https://github.com/moby/moby/issues/39302#issuecomment-639687466_
131145
### Non-versioned modules
132146
133147
1. `rm -rf go.mod go.sum && go mod init && go clean -modcache`
134-
1. `go get k8s.io/client-go@v0.20.8 && go get k8s.io/apimachinery@v0.20.8 && go get k8s.io/api@v0.20.8`
135-
1. `go get istio.io/client-go@1.10.2 && go get istio.io/api@1.10.2`
136-
1. `go get github.com/aws/amazon-vpc-cni-k8s/pkg/awsutils@v1.8.0`
148+
1. `go get k8s.io/client-go@v0.21.6 && go get k8s.io/apimachinery@v0.21.6 && go get k8s.io/api@v0.21.6`
149+
1. `go get istio.io/client-go@v1.11.4 && go get istio.io/api@1.11.4`
150+
1. `go get github.com/aws/amazon-vpc-cni-k8s/pkg/awsutils@v1.9.3`
137151
1. `go get github.com/cortexlabs/yaml@31e52ba8433b683c471ef92cf1711fe67671dac5`
138152
1. `go get github.com/cortexlabs/go-input@8b67a7a7b28d1c45f5c588171b3b50148462b247`
139153
1. `go get github.com/xlab/[email protected]`
154+
1. `go get -u sigs.k8s.io/[email protected]`
140155
1. `echo -e '\nreplace github.com/docker/docker => github.com/docker/engine v19.03.13' >> go.mod`
141156
1. `go get -u github.com/docker/distribution`
142157
1. `go mod tidy`
143-
1. For every non-indirect, non-hardcoded dependency in go.mod, update with `go get -u <path>`
144-
1. `go mod tidy`
145-
1. Re-run the relevant hardcoded `go get` commands above
146-
1. `go mod tidy`
147-
1. `make test`
148-
1. `go mod tidy`
158+
1. Potentially skip these steps
159+
1. For every non-indirect, non-hardcoded dependency in go.mod, update with `go get -u <path>`
160+
1. `go mod tidy`
161+
1. Re-run the relevant hardcoded `go get` commands above
162+
1. `go mod tidy`
163+
1. `make test`
164+
1. `go mod tidy`
149165
1. Check that the diff in `go.mod` is reasonable
150166
151167
## Nvidia device plugin
@@ -188,9 +204,21 @@ see https://github.com/moby/moby/issues/39302#issuecomment-639687466_
188204
set the tree to the tag for the chosen release, and open `cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml`
189205
(e.g. <https://github.com/kubernetes/autoscaler/blob/cluster-autoscaler-1.20.0/cluster-autoscaler/cloudprovider/aws/examples/cluster-autoscaler-autodiscover.yaml>)
190206
1. Resolve merge conflicts with the template in `manager/manifests/cluster-autoscaler.yaml.j2`.
191-
1. Pull the release branch from the upstream repo to Cortex's fork on [Github](https://github.com/cortexlabs/autoscaler).
192-
1. Apply the rate-limiter changes from the previous version to the new one (currently sitting on `cluster-autoscaler-release-1.20` branch).
193-
1. Update `-b` flag's value from `git clone` command in `images/cluster-autoscaler/Dockerfile` to the branch name of the latest release from Cortex's fork.
207+
1. Clone our fork: `git clone [email protected]:cortexlabs/autoscaler.git`
208+
1. Checkout our updated branch: `git checkout cluster-autoscaler-1.21.1-cortex`
209+
1. List the most recent commit: `git log`
210+
1. Reset the latest commit (use the SHA of the last non-cortex commit): `git reset <SHA>`
211+
1. `git add *`
212+
1. `git stash`
213+
1. `git remote add upstream https://github.com/kubernetes/autoscaler.git`
214+
1. `git fetch upstream`
215+
1. Checkout the appropriate version tag, e.g. `git checkout cluster-autoscaler-1.21.1 -b cluster-autoscaler-1.21.1-cortex`
216+
1. `git stash pop`
217+
1. Resolve any merge conflicts
218+
1. Unstage and check the diff
219+
1. `git commit -am "Add rate limiter"`
220+
1. `git push origin cluster-autoscaler-1.21.1-cortex`
221+
1. Update `images/cluster-autoscaler/Dockerfile` to use the new branch name (e.g. "cluster-autoscaler-1.21.1") in the `-b` flag's value from `git clone`.
194222
1. Match the Go version of the builder in `images/cluster-autoscaler/Dockerfile` with that of the [cluster autoscaler](https://github.com/kubernetes/autoscaler)'s Dockerfile.
195223
196224
## FluentBit

0 commit comments

Comments
 (0)