Skip to content

Commit

Permalink
Add initial support for Kubernetes 1.28 (#2948)
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
  • Loading branch information
xmudrii committed Nov 5, 2023
1 parent 0bd9a71 commit 0a66e72
Show file tree
Hide file tree
Showing 10 changed files with 10,331 additions and 4,452 deletions.
5,699 changes: 4,053 additions & 1,646 deletions .prow/generated.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export CGO_ENABLED=0
export GOPROXY?=https://proxy.golang.org
export GO111MODULE=on
export GOFLAGS?=-mod=readonly -trimpath
export DEFAULT_STABLE=$(shell curl -SsL https://dl.k8s.io/release/stable-1.27.txt)
export DEFAULT_STABLE=$(shell curl -SsL https://dl.k8s.io/release/stable-1.28.txt)

BUILD_DATE=$(shell if hash gdate 2>/dev/null; then gdate --rfc-3339=seconds | sed 's/ /T/'; else date --rfc-3339=seconds | sed 's/ /T/'; fi)
GITCOMMIT=$(shell git log -1 --pretty=format:"%H")
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/kubeone/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ func (crc ContainerRuntimeConfig) CRISocket() string {
return ""
}

// SandboxImage is used to determine the pause image version that should be used,
// depending on the desired Kubernetes version. It's important to use the same
// pause image version for both container runtime and kubeadm to avoid issues.
// Values come from:
// - https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/constants/constants.go#L423
// - https://github.com/containerd/containerd/blob/main/pkg/cri/config/config_unix.go#L90
func (v VersionConfig) SandboxImage(imageRegistry func(string) string) (string, error) {
kubeSemVer, err := semver.NewVersion(v.Kubernetes)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kubeone/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
// lowerVersionConstraint defines a semver constraint that validates Kubernetes versions against a lower bound
lowerVersionConstraint = ">= 1.25"
// upperVersionConstraint defines a semver constraint that validates Kubernetes versions against an upper bound
upperVersionConstraint = "<= 1.27"
upperVersionConstraint = "<= 1.28"
// gte125VersionConstraint defines a semver constraint that validates Kubernetes versions >= 1.25
gte125VersionConstraint = ">= 1.25"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubeflags/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package kubeflags

var (
defaultAdmissionControllersv1227 = []string{
defaultAdmissionControllersv1227v1228 = []string{
"NamespaceLifecycle",
"LimitRanger",
"ServiceAccount",
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubeflags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ func DefaultAdmissionControllers(v *semver.Version) string {
case v126Constraint.Check(v):
return strings.Join(defaultAdmissionControllersv1226, ",")
default:
return strings.Join(defaultAdmissionControllersv1227, ",")
return strings.Join(defaultAdmissionControllersv1227v1228, ",")
}
}
Loading

0 comments on commit 0a66e72

Please sign in to comment.