Skip to content

Commit

Permalink
chore: update k8s versions in version maps and default version
Browse files Browse the repository at this point in the history
Signed-off-by: Rohan CJ <[email protected]>
  • Loading branch information
rohantmp committed Oct 10, 2024
1 parent 065b73d commit 25c9bf7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
6 changes: 3 additions & 3 deletions chart/templates/_init-containers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{{/* Bump $defaultTag value whenever k8s version is bumped */}}
{{- define "vcluster.k8s.controllerManager.image.tag" -}}
{{- $defaultTag := "v1.30.2" -}}
{{- $defaultTag := "v1.31.1" -}}
{{- if and (not (empty .Values.controlPlane.distro.k8s.version)) (eq .Values.controlPlane.distro.k8s.controllerManager.image.tag $defaultTag) -}}
{{ .Values.controlPlane.distro.k8s.version }}
{{- else -}}
Expand All @@ -35,7 +35,7 @@

{{/* Bump $defaultTag value whenever k8s version is bumped */}}
{{- define "vcluster.k8s.apiServer.image.tag" -}}
{{- $defaultTag := "v1.30.2" -}}
{{- $defaultTag := "v1.31.1" -}}
{{- if and (not (empty .Values.controlPlane.distro.k8s.version)) (eq .Values.controlPlane.distro.k8s.apiServer.image.tag $defaultTag) -}}
{{ .Values.controlPlane.distro.k8s.version}}
{{- else -}}
Expand All @@ -52,7 +52,7 @@

{{/* Bump $defaultTag value whenever k8s version is bumped */}}
{{- define "vcluster.k8s.scheduler.image.tag" -}}
{{- $defaultTag := "v1.30.2" -}}
{{- $defaultTag := "v1.31.1" -}}
{{- if and (not (empty .Values.controlPlane.distro.k8s.version)) (eq .Values.controlPlane.distro.k8s.scheduler.image.tag $defaultTag) -}}
{{ .Values.controlPlane.distro.k8s.version}}
{{- else -}}
Expand Down
16 changes: 8 additions & 8 deletions chart/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,10 @@ tests:
asserts:
- equal:
path: spec.template.spec.initContainers[1].image
value: registry.k8s.io/kube-controller-manager:v1.30.2
value: registry.k8s.io/kube-controller-manager:v1.31.1
- equal:
path: spec.template.spec.initContainers[2].image
value: registry.k8s.io/kube-apiserver:v1.30.2
value: registry.k8s.io/kube-apiserver:v1.31.1

- it: k8s capabilities set
chart:
Expand Down Expand Up @@ -621,23 +621,23 @@ tests:
asserts:
- equal:
path: spec.template.spec.initContainers[1].image
value: registry.k8s.io/kube-controller-manager:v1.30.2
value: registry.k8s.io/kube-controller-manager:v1.31.1

- it: k8s capabilities incomplete
chart:
version: "test-v1.22"
asserts:
- equal:
path: spec.template.spec.initContainers[1].image
value: registry.k8s.io/kube-controller-manager:v1.30.2
value: registry.k8s.io/kube-controller-manager:v1.31.1

- it: k8s capabilities incomplete 2
chart:
version: "test-1.22.11"
asserts:
- equal:
path: spec.template.spec.initContainers[1].image
value: registry.k8s.io/kube-controller-manager:v1.30.2
value: registry.k8s.io/kube-controller-manager:v1.31.1

- it: k8s capabilities incomplete 2
chart:
Expand Down Expand Up @@ -719,13 +719,13 @@ tests:
asserts:
- equal:
path: spec.template.spec.initContainers[1].image
value: registry.k8s.io/kube-controller-manager:v1.30.2
value: registry.k8s.io/kube-controller-manager:v1.31.1
- equal:
path: spec.template.spec.initContainers[2].image
value: registry.k8s.io/kube-scheduler:v1.30.2
value: registry.k8s.io/kube-scheduler:v1.31.1
- equal:
path: spec.template.spec.initContainers[3].image
value: registry.k8s.io/kube-apiserver:v1.30.2
value: registry.k8s.io/kube-apiserver:v1.31.1

- it: k8s version sets image tag for apiServer and controllerManager (virtual scheduler enabled)
set:
Expand Down
12 changes: 6 additions & 6 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: kube-apiserver
# Tag is the tag of the container image, e.g. latest
tag: "v1.30.2"
tag: "v1.31.1"
# ControllerManager holds configuration specific to starting the controller manager.
controllerManager:
enabled: true
Expand All @@ -199,7 +199,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: "kube-controller-manager"
# Tag is the tag of the container image, e.g. latest
tag: "v1.30.2"
tag: "v1.31.1"
# Scheduler holds configuration specific to starting the scheduler. Enable this via controlPlane.advanced.virtualScheduler.enabled
scheduler:
# Command is the command to start the distro binary. This will override the existing command.
Expand All @@ -216,7 +216,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: "kube-scheduler"
# Tag is the tag of the container image, e.g. latest
tag: "v1.30.2"
tag: "v1.31.1"
# Env are extra environment variables to use for the main container and NOT the init container.
env: []
# Security options can be used for the distro init container
Expand Down Expand Up @@ -247,7 +247,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: "rancher/k3s"
# Tag is the tag of the container image, e.g. latest
tag: "v1.30.2-k3s1"
tag: "v1.31.1-k3s1"
# Security options can be used for the distro init container
securityContext: {}
# Resources for the distro init container
Expand Down Expand Up @@ -278,7 +278,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: "k0sproject/k0s"
# Tag is the tag of the container image, e.g. latest
tag: "v1.30.2-k0s.0"
tag: "v1.31.1-k0s.0"
# Security options can be used for the distro init container
securityContext: {}
# Resources for the distro init container
Expand Down Expand Up @@ -341,7 +341,7 @@ controlPlane:
# Repository is the repository of the container image, e.g. my-repo/my-image
repository: "etcd"
# Tag is the tag of the container image, e.g. latest
tag: "3.5.13-0"
tag: "3.5.16-0"
# ImagePullPolicy is the pull policy for the external etcd image
imagePullPolicy: ""
# ExtraArgs are appended to the etcd command.
Expand Down
6 changes: 6 additions & 0 deletions config/default_extra_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (

// K3SVersionMap holds the supported k3s versions
var K3SVersionMap = map[string]string{
"1.31": "rancher/k3s:v1.31.1-k3s1",
"1.30": "rancher/k3s:v1.30.2-k3s1",
"1.29": "rancher/k3s:v1.29.6-k3s1",
"1.28": "rancher/k3s:v1.28.11-k3s1",
Expand All @@ -31,6 +32,7 @@ var K3SVersionMap = map[string]string{

// K0SVersionMap holds the supported k0s versions
var K0SVersionMap = map[string]string{
"1.31": "k0sproject/k0s:v1.31.1-k0s.0",
"1.30": "k0sproject/k0s:v1.30.2-k0s.0",
"1.29": "k0sproject/k0s:v1.29.6-k0s.0",
"1.28": "k0sproject/k0s:v1.28.11-k0s.0",
Expand All @@ -39,6 +41,7 @@ var K0SVersionMap = map[string]string{

// K8SAPIVersionMap holds the supported k8s api servers
var K8SAPIVersionMap = map[string]string{
"1.31": "registry.k8s.io/kube-apiserver:v1.31.1",
"1.30": "registry.k8s.io/kube-apiserver:v1.30.2",
"1.29": "registry.k8s.io/kube-apiserver:v1.29.6",
"1.28": "registry.k8s.io/kube-apiserver:v1.28.11",
Expand All @@ -47,6 +50,7 @@ var K8SAPIVersionMap = map[string]string{

// K8SControllerVersionMap holds the supported k8s controller managers
var K8SControllerVersionMap = map[string]string{
"1.31": "registry.k8s.io/kube-controller-manager:v1.31.1",
"1.30": "registry.k8s.io/kube-controller-manager:v1.30.2",
"1.29": "registry.k8s.io/kube-controller-manager:v1.29.6",
"1.28": "registry.k8s.io/kube-controller-manager:v1.28.11",
Expand All @@ -55,6 +59,7 @@ var K8SControllerVersionMap = map[string]string{

// K8SSchedulerVersionMap holds the supported k8s schedulers
var K8SSchedulerVersionMap = map[string]string{
"1.31": "registry.k8s.io/kube-scheduler:v1.31.1",
"1.30": "registry.k8s.io/kube-scheduler:v1.30.2",
"1.29": "registry.k8s.io/kube-scheduler:v1.29.6",
"1.28": "registry.k8s.io/kube-scheduler:v1.28.11",
Expand All @@ -63,6 +68,7 @@ var K8SSchedulerVersionMap = map[string]string{

// K8SEtcdVersionMap holds the supported etcd
var K8SEtcdVersionMap = map[string]string{
"1.31": "registry.k8s.io/etcd:3.5.16-0",
"1.30": "registry.k8s.io/etcd:3.5.13-0",
"1.29": "registry.k8s.io/etcd:3.5.10-0",
"1.28": "registry.k8s.io/etcd:3.5.9-0",
Expand Down
12 changes: 6 additions & 6 deletions config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ controlPlane:
image:
registry: registry.k8s.io
repository: kube-apiserver
tag: "v1.30.2"
tag: "v1.31.1"
controllerManager:
enabled: true
command: []
Expand All @@ -99,15 +99,15 @@ controlPlane:
image:
registry: registry.k8s.io
repository: "kube-controller-manager"
tag: "v1.30.2"
tag: "v1.31.1"
scheduler:
command: []
extraArgs: []
imagePullPolicy: ""
image:
registry: registry.k8s.io
repository: "kube-scheduler"
tag: "v1.30.2"
tag: "v1.31.1"
env: []
securityContext: {}
resources:
Expand All @@ -126,7 +126,7 @@ controlPlane:
image:
registry: ""
repository: "rancher/k3s"
tag: "v1.30.2-k3s1"
tag: "v1.31.1-k3s1"
securityContext: {}
resources:
limits:
Expand All @@ -145,7 +145,7 @@ controlPlane:
image:
registry: ""
repository: "k0sproject/k0s"
tag: "v1.30.2-k0s.0"
tag: "v1.31.1-k0s.0"
securityContext: {}
resources:
limits:
Expand Down Expand Up @@ -179,7 +179,7 @@ controlPlane:
image:
registry: "registry.k8s.io"
repository: "etcd"
tag: "3.5.13-0"
tag: "3.5.16-0"
imagePullPolicy: ""
extraArgs: []
env: []
Expand Down

0 comments on commit 25c9bf7

Please sign in to comment.