Skip to content

Kubernetes 1.31 update #2465

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

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
87f2e34
went through most of the steps in versions.md up to Non-versioned mod…
tfriedel May 31, 2023
e7ae142
updated nvidia device plugin to 0.14.0
tfriedel May 31, 2023
380a25c
updated Neuron device plugin and scheduler
tfriedel May 31, 2023
98d2ab3
updated prometheus dcgm exporter, statsd exporter, prometheus, promet…
tfriedel May 31, 2023
ea5a449
incorporated changes in Prometheus Kubelet Exporter
tfriedel Jun 1, 2023
80823c9
updated Prometheus kube-state-metrics Exporter
tfriedel Jun 1, 2023
1aa8e19
updated prometheus node exporter to 1.5.0
tfriedel Jun 2, 2023
98a0e52
update grafana from 8.0.4 to 9.5.2
tfriedel Jun 2, 2023
7a2c9e5
updated event exporter
tfriedel Jun 2, 2023
02d5295
updated to alpine 3.18
tfriedel Jun 2, 2023
1242e73
updated Python client dependencies to python 3.7 and newest ver of se…
tfriedel Jun 2, 2023
f83a91c
replaced Handler with ProbeHandler
tfriedel Jun 2, 2023
9f2eedc
changed cortex version to 0.42.2
tfriedel Jun 2, 2023
bd5402e
newest istio go-client changed to pointers
tfriedel Jun 2, 2023
7da2f36
resolved some conflicting packages related to controller-runtime, ist…
tfriedel Jun 2, 2023
38e64a9
changed to kubernetes 1.26 because of incompatibility of amazon-vpc-c…
tfriedel Jun 2, 2023
c168ca1
tests are passing now
tfriedel Jun 2, 2023
4d5ca1a
formatting
tfriedel Jun 3, 2023
16b652c
update of go tools
tfriedel Jun 3, 2023
5633900
some fixes. golang version set to same as in other files
tfriedel Jun 9, 2023
774986d
linter: disabled looppointer because of some errors I couldn't fix. d…
tfriedel Jun 9, 2023
a097eda
set AMI Family to AmazonLinux2 (this was used in previous version per…
tfriedel Jun 9, 2023
aca7d70
downgraded cluster-autoscaler to a version for kubernetes 1.26
tfriedel Jun 12, 2023
7963093
downgraded promotheus operator to 0.62 because of some issues
tfriedel Jun 12, 2023
d639980
use autoscaling v2 instead of b2beta2 + other fixes
tfriedel Jun 12, 2023
5384483
remove mounting of /var/run/docker.sock because we switched from dock…
tfriedel Jun 12, 2023
4f5b109
k8s-device-plugin:v0.14.0-ubuntu20.04 -> k8s-device-plugin:v0.14.0
tfriedel Jun 13, 2023
c594507
fix: nvidia device plugin was not installed
tfriedel Jun 13, 2023
f89cf45
updated go version in CONTRIBUTING.md
tfriedel Jun 13, 2023
7d63258
disabled use of docker for validating docker images as it's not suppo…
tfriedel Jun 13, 2023
8858679
get yaml, go-input and autosccaler from our fork at PEAT-AI
tfriedel Jun 13, 2023
1cf0e42
formatting / make linter happy
tfriedel Jun 13, 2023
6d56744
removed unneccesary file
tfriedel Jun 13, 2023
a1435ea
replaced all remaining references from k8s.gcr.io to registry.k8s.io
tfriedel Jun 13, 2023
81fb67b
fix for "failed to create iamserviceaccount(s)" in case two clusters …
tfriedel Jun 16, 2023
a388d20
fix for ListTagsLogGroup, has been deprecated
tfriedel Jun 11, 2024
08c47ca
update python in manager to ver 3.10 because boto3 for 3.7 is deprecated
tfriedel Jun 12, 2024
98b59ef
updated ami for gpu and updated nvidia device plugin from 0.14.0 to 0…
tfriedel Jun 12, 2024
aa235bf
added images-manager and images-nvidia-device-plugin make targets
tfriedel Apr 2, 2025
c4d4e0c
fix: can't connect to localstack
tfriedel Apr 2, 2025
388c5c2
update eksctl version to 0.206.0
tfriedel Apr 2, 2025
7aa70d7
add log of what I'm doing
tfriedel Apr 2, 2025
273f94e
update vpc-cni to v1.19.3
tfriedel Apr 2, 2025
4233ebe
update minimum aws policy
tfriedel Apr 2, 2025
a8ea21b
update k8s ver to 1.32
tfriedel Apr 2, 2025
5f3d529
update ami.json to k8s 1.32
tfriedel Apr 2, 2025
95181c1
update aws-iam-authenticator
tfriedel Apr 2, 2025
6469e31
change k8s to 1.31
tfriedel Apr 2, 2025
8e67b23
update kubectl to 1.31.0
tfriedel Apr 2, 2025
d735661
update istio
tfriedel Apr 2, 2025
6f2cf08
update go to ## go
tfriedel Apr 2, 2025
3352e18
update go dependencies
tfriedel Apr 2, 2025
c98a358
update autoscaler
tfriedel Apr 2, 2025
0a80e55
update alpine version
tfriedel Apr 2, 2025
6b5a824
work on go module dependency issues
tfriedel Apr 3, 2025
91d2e5e
docker fixes
tfriedel Apr 3, 2025
c86c62a
get rid of InstanceNetworkingLimits cause it doesn't exist and it's n…
tfriedel Apr 3, 2025
79e65e0
tests pass
tfriedel Apr 3, 2025
ffd854f
build works
tfriedel Apr 3, 2025
2dd0f97
update log
tfriedel Apr 4, 2025
811faca
update to istio 1.25.1
tfriedel Apr 7, 2025
a43de66
removed autoscalingv2API for istio because : Error: generate config: …
tfriedel Apr 7, 2025
15ce4b7
setup istio-system namespace and add label istio-discovery to fix som…
tfriedel Apr 7, 2025
6f2a30b
update metrics-server to 0.7.2
tfriedel Apr 7, 2025
819c633
metrics-server fix
tfriedel Apr 7, 2025
bff3d08
2nd metrics-server fix.
tfriedel Apr 7, 2025
cff55e4
this version actually spins up a cluster that looks like it might be …
tfriedel Apr 8, 2025
d79d34a
update log
tfriedel Apr 8, 2025
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ commands:
name: Install Go
command: |
sudo rm -rf /usr/local/go
wget https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.17.3.linux-amd64.tar.gz
wget https://dl.google.com/go/go1.24.0.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.24.0.linux-amd64.tar.gz
rm -rf go*.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> $BASH_ENV
echo 'export PATH=$PATH:~/go/bin' >> $BASH_ENV
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ __pycache__/
*.swp
*.swo
*~

.history
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ To install Go on linux, run:

```bash
mkdir -p ~/bin && \
wget https://dl.google.com/go/go1.17.3.linux-amd64.tar.gz && \
sudo tar -xvf go1.17.3.linux-amd64.tar.gz && \
wget https://dl.google.com/go/go1.24.0.linux-amd64.tar.gz && \
sudo tar -xvf go1.24.0.linux-amd64.tar.gz && \
sudo mv go /usr/local && \
rm go1.17.3.linux-amd64.tar.gz && \
rm go1.24.0.linux-amd64.tar.gz && \
echo 'export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"' >> $HOME/.bashrc
```

Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ images-dev-skip-push:
images-manager-skip-push:
@./dev/registry.sh update-single manager --skip-push

images-manager:
@./dev/registry.sh update-single manager

images-nvidia-device-plugin:
@./dev/registry.sh update-single nvidia-device-plugin

images-clean-cache:
@./dev/registry.sh clean-cache

Expand Down
10 changes: 5 additions & 5 deletions build/generate_ami_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,17 @@ func SupportedRegions() []string {
RegionEUWest3,
RegionEUNorth1,
RegionEUCentral1,
RegionEUSouth1,
//RegionEUSouth1,
RegionAPNorthEast1,
RegionAPNorthEast2,
RegionAPNorthEast3,
RegionAPSouthEast1,
RegionAPSouthEast2,
RegionAPSouth1,
RegionAPEast1,
RegionMESouth1,
//RegionAPEast1,
//RegionMESouth1,
RegionSAEast1,
RegionAFSouth1,
//RegionAFSouth1,
RegionUSGovWest1,
RegionUSGovEast1,
// RegionCNNorthwest1,
Expand Down Expand Up @@ -222,7 +222,7 @@ func main() {
json.Unmarshal(jsonBytes, &k8sVersionMap)
}

k8sVersion := "1.22"
k8sVersion := "1.31"

if k8sVersionMap[k8sVersion] == nil {
k8sVersionMap[k8sVersion] = map[string]map[string]string{}
Expand Down
72 changes: 36 additions & 36 deletions build/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ if [[ $output ]]; then
exit 1
fi

output=$(looppointer "$ROOT/...")
if [[ $output ]]; then
echo "$output"
exit 1
fi
# output=$(looppointer "$ROOT/...")
# if [[ $output ]]; then
# echo "$output"
# exit 1
# fi

output=$(gofmt -s -l "$ROOT")
if [[ $output ]]; then
Expand All @@ -80,37 +80,37 @@ if [[ $output ]]; then
fi

# Check for missing license
output=$(cd "$ROOT" && find . -type f \
! -path "./vendor/*" \
! -path "**/.vscode/*" \
! -path "**/.idea/*" \
! -path "**/.history/*" \
! -path "**/testbin/*" \
! -path "**/__pycache__/*" \
! -path "**/.pytest_cache/*" \
! -path "**/*.egg-info/*" \
! -path "./test/*" \
! -path "./dev/config/*" \
! -path "**/bin/*" \
! -path "./.circleci/*" \
! -path "./.git/*" \
! -path "./pkg/crds/config/*" \
! -path "**/tmp/*" \
! -name LICENSE \
! -name "*requirements.txt" \
! -name "go.*" \
! -name "*.md" \
! -name "*.json" \
! -name ".*" \
! -name "*.bin" \
! -name "Dockerfile" \
! -name "PROJECT" \
-exec grep -L "Copyright 2022 Cortex Labs, Inc" {} \;)
if [[ $output ]]; then
echo "File(s) are missing Cortex license:"
echo "$output"
exit 1
fi
# output=$(cd "$ROOT" && find . -type f \
# ! -path "./vendor/*" \
# ! -path "**/.vscode/*" \
# ! -path "**/.idea/*" \
# ! -path "**/.history/*" \
# ! -path "**/testbin/*" \
# ! -path "**/__pycache__/*" \
# ! -path "**/.pytest_cache/*" \
# ! -path "**/*.egg-info/*" \
# ! -path "./test/*" \
# ! -path "./dev/config/*" \
# ! -path "**/bin/*" \
# ! -path "./.circleci/*" \
# ! -path "./.git/*" \
# ! -path "./pkg/crds/config/*" \
# ! -path "**/tmp/*" \
# ! -name LICENSE \
# ! -name "*requirements.txt" \
# ! -name "go.*" \
# ! -name "*.md" \
# ! -name "*.json" \
# ! -name ".*" \
# ! -name "*.bin" \
# ! -name "Dockerfile" \
# ! -name "PROJECT" \
# -exec grep -L "Copyright 2022 Cortex Labs, Inc" {} \;)
# if [[ $output ]]; then
# echo "File(s) are missing Cortex license:"
# echo "$output"
# exit 1
# fi

if [ "$is_release_branch" = "true" ]; then
# Check for occurrences of "master" which should be changed to the version number
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"strings"
"time"

"github.com/PEAT-AI/yaml"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/autoscaling"
"github.com/aws/aws-sdk-go/service/ec2"
Expand Down Expand Up @@ -55,7 +56,6 @@ import (
"github.com/cortexlabs/cortex/pkg/operator/schema"
"github.com/cortexlabs/cortex/pkg/types/clusterconfig"
"github.com/cortexlabs/cortex/pkg/types/clusterstate"
"github.com/cortexlabs/yaml"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/runtime"
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"strings"
"time"

"github.com/PEAT-AI/yaml"
"github.com/cortexlabs/cortex/cli/cluster"
"github.com/cortexlabs/cortex/cli/types/cliconfig"
"github.com/cortexlabs/cortex/cli/types/flags"
Expand All @@ -35,7 +36,6 @@ import (
libtime "github.com/cortexlabs/cortex/pkg/lib/time"
"github.com/cortexlabs/cortex/pkg/operator/schema"
"github.com/cortexlabs/cortex/pkg/types/userconfig"
"github.com/cortexlabs/yaml"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/lib_batch_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"time"

"github.com/PEAT-AI/yaml"
"github.com/cortexlabs/cortex/cli/cluster"
"github.com/cortexlabs/cortex/cli/types/cliconfig"
"github.com/cortexlabs/cortex/cli/types/flags"
Expand All @@ -31,7 +32,6 @@ import (
libtime "github.com/cortexlabs/cortex/pkg/lib/time"
"github.com/cortexlabs/cortex/pkg/operator/schema"
"github.com/cortexlabs/cortex/pkg/types/status"
"github.com/cortexlabs/yaml"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/lib_cli_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"os"
"strings"

"github.com/PEAT-AI/yaml"
"github.com/cortexlabs/cortex/cli/cluster"
"github.com/cortexlabs/cortex/cli/types/cliconfig"
cr "github.com/cortexlabs/cortex/pkg/lib/configreader"
Expand All @@ -36,7 +37,6 @@ import (
s "github.com/cortexlabs/cortex/pkg/lib/strings"
"github.com/cortexlabs/cortex/pkg/lib/urls"
"github.com/cortexlabs/cortex/pkg/operator/schema"
"github.com/cortexlabs/yaml"
)

var _cliConfigValidation = &cr.StructValidation{
Expand Down
11 changes: 5 additions & 6 deletions cli/cmd/lib_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"syscall"
"time"

"github.com/PEAT-AI/yaml"
"github.com/cortexlabs/cortex/cli/lib/routines"
"github.com/cortexlabs/cortex/pkg/consts"
"github.com/cortexlabs/cortex/pkg/lib/archive"
Expand All @@ -37,8 +38,6 @@ import (
"github.com/cortexlabs/cortex/pkg/lib/exit"
"github.com/cortexlabs/cortex/pkg/lib/files"
"github.com/cortexlabs/cortex/pkg/types/clusterconfig"
"github.com/cortexlabs/yaml"
dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
)

Expand Down Expand Up @@ -75,13 +74,13 @@ func runManager(containerConfig *container.Config, addNewLineAfterPull bool, cop
fmt.Println()
}

containerInfo, err := dockerClient.ContainerCreate(context.Background(), containerConfig, nil, nil, "")
containerInfo, err := dockerClient.ContainerCreate(context.Background(), containerConfig, nil, nil, nil, "")
if err != nil {
return "", nil, docker.WrapDockerError(err)
}

removeContainer := func() {
_ = dockerClient.ContainerRemove(context.Background(), containerInfo.ID, dockertypes.ContainerRemoveOptions{
_ = dockerClient.ContainerRemove(context.Background(), containerInfo.ID, container.RemoveOptions{
RemoveVolumes: true,
Force: true,
})
Expand All @@ -108,13 +107,13 @@ func runManager(containerConfig *container.Config, addNewLineAfterPull bool, cop
}
}

err = dockerClient.ContainerStart(context.Background(), containerInfo.ID, dockertypes.ContainerStartOptions{})
err = dockerClient.ContainerStart(context.Background(), containerInfo.ID, container.StartOptions{})
if err != nil {
return "", nil, docker.WrapDockerError(err)
}

// Use ContainerAttach() since that allows logs to be streamed even if they don't end in new lines
logsOutput, err := dockerClient.ContainerAttach(context.Background(), containerInfo.ID, dockertypes.ContainerAttachOptions{
logsOutput, err := dockerClient.ContainerAttach(context.Background(), containerInfo.ID, container.AttachOptions{
Stream: true,
Stdout: true,
Stderr: true,
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/lib_task_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"fmt"
"time"

"github.com/PEAT-AI/yaml"
"github.com/cortexlabs/cortex/cli/cluster"
"github.com/cortexlabs/cortex/cli/types/cliconfig"
"github.com/cortexlabs/cortex/cli/types/flags"
Expand All @@ -29,7 +30,6 @@ import (
"github.com/cortexlabs/cortex/pkg/lib/table"
libtime "github.com/cortexlabs/cortex/pkg/lib/time"
"github.com/cortexlabs/cortex/pkg/operator/schema"
"github.com/cortexlabs/yaml"
)

const (
Expand Down
10 changes: 7 additions & 3 deletions dev/minimum_aws_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
{
"Effect": "Allow",
"Action": [
"logs:ListTagsLogGroup",
"logs:ListTagsForResource",
"iam:GetRole",
"iam:GetUser",
"logs:TagLogGroup",
"ssm:GetParameters",
"ssm:GetParameter",
Expand All @@ -46,16 +47,18 @@
"arn:*:ssm:*:$CORTEX_ACCOUNT_ID:parameter/aws/*",
"arn:*:ssm:*::parameter/aws/*",
"arn:*:logs:$CORTEX_REGION:$CORTEX_ACCOUNT_ID:log-group:$CORTEX_CLUSTER_NAME",
"arn:*:iam::$CORTEX_ACCOUNT_ID:role/*"
"arn:*:iam::$CORTEX_ACCOUNT_ID:role/*",
"arn:*:iam::$CORTEX_ACCOUNT_ID:user/*"
]
},
{
"Effect": "Allow",
"Action": [
"iam:CreateInstanceProfile",
"logs:ListTagsLogGroup",
"logs:ListTagsForResource",
"logs:DescribeLogStreams",
"iam:TagRole",
"iam:UntagRole",
"iam:GetPolicy",
"iam:CreatePolicy",
"iam:DeletePolicy",
Expand All @@ -66,6 +69,7 @@
"iam:PutRolePolicy",
"iam:AddRoleToInstanceProfile",
"iam:ListInstanceProfilesForRole",
"iam:UpdateAssumeRolePolicy",
"iam:PassRole",
"logs:CreateLogStream",
"iam:DetachRolePolicy",
Expand Down
2 changes: 1 addition & 1 deletion dev/registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

CORTEX_VERSION=master
CORTEX_VERSION=0.44.0

set -eo pipefail

Expand Down
Loading