Skip to content

Commit

Permalink
some initial work for the table
Browse files Browse the repository at this point in the history
  • Loading branch information
facchettos committed Feb 9, 2024
1 parent de5c591 commit fa2d5ad
Show file tree
Hide file tree
Showing 45 changed files with 3,098 additions and 26 deletions.
22 changes: 22 additions & 0 deletions docs/pages/deploying-vclusters/compat-matix.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Compatibility Matrix

The following table provides a compatibility matrix of which k8s version are supported aginst which vcluster distro versions:

| Vcluster Distro | k8s Host version | Distro Version |
| --------------- | ---------------- | -------------------- |
| eks | 1.28 | v1.28.2-eks-1-28-6 |
| | 1.27 | v1.27.6-eks-1-27-13 |
| | 1.26 | v1.26.9-eks-1-26-19 |
| | 1.25 | v1.25.14-eks-1-25-23 |
| k0s | 1.28 | v1.28.2-k0s.0 |
| | 1.26 | v1.26.9-k0s.0 |
| | 1.27 | v1.27.6-k0s.0 |
| | 1.25 | v1.25.14-k0s.0 |
| k3s | 1.28 | v1.28.2-k3s1 |
| | 1.27 | v1.27.6-k3s1 |
| | 1.26 | v1.26.9-k3s1 |
| | 1.25 | v1.25.14-k3s1 |
| k8s | 1.28 | v1.28.2 |
| | 1.27 | v1.27.6 |
| | 1.26 | v1.26.9 |
| | 1.25 | v1.25.14 |
24 changes: 0 additions & 24 deletions docs/pages/deploying-vclusters/supported-distros.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,27 +114,3 @@ For multi binary distributions, vCluster can even create those with a pre-instal

In general, if you need vCluster to support another Kubernetes distribution, we are always happy to help you or accept a pull request in our GitHub repository.



## Compatibility Matrix

The following table provides a compatibility matrix of which k8s version are supported aginst which vcluster distro versions:

| Vcluster Distro | k8s Host version | Distro Version |
| --------------- | ---------------- | -------------------- |
| eks | 1.28 | v1.28.2-eks-1-28-6 |
| | 1.27 | v1.27.6-eks-1-27-13 |
| | 1.26 | v1.26.9-eks-1-26-19 |
| | 1.25 | v1.25.14-eks-1-25-23 |
| k0s | 1.28 | v1.28.2-k0s.0 |
| | 1.26 | v1.26.9-k0s.0 |
| | 1.27 | v1.27.6-k0s.0 |
| | 1.25 | v1.25.14-k0s.0 |
| k3s | 1.28 | v1.28.2-k3s1 |
| | 1.27 | v1.27.6-k3s1 |
| | 1.26 | v1.26.9-k3s1 |
| | 1.25 | v1.25.14-k3s1 |
| k8s | 1.28 | v1.28.2 |
| | 1.27 | v1.27.6 |
| | 1.26 | v1.26.9 |
| | 1.25 | v1.25.14 |
6 changes: 6 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ module.exports = {
collapsed: true,
items: ["deploying-vclusters/supported-distros"],
},
{
type: "category",
label: "Compatibility Matrix",
collapsed: true,
items: ["deploying-vclusters/compat-matrix"],
},
{
type: "category",
label: "Persistent vClusters",
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/ghodss/yaml v1.0.0
github.com/go-logr/logr v1.4.1
github.com/go-openapi/loads v0.21.2
github.com/go-spectest/markdown v0.0.7
github.com/google/go-github/v53 v53.2.1-0.20230815134205-bb00f570d301
github.com/gorilla/websocket v1.5.1
github.com/hashicorp/go-hclog v0.14.1
Expand All @@ -25,6 +26,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/moby/locker v1.0.1
github.com/moby/term v0.5.0
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo/v2 v2.14.0
github.com/onsi/gomega v1.30.0
github.com/pkg/errors v0.9.1
Expand Down Expand Up @@ -85,14 +87,14 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 // indirect
github.com/karrick/godirwalk v1.17.0 // indirect
github.com/loft-sh/admin-apis v0.0.0-20240203010124-3600c1c582a8 // indirect
github.com/loft-sh/apiserver v0.0.0-20240125143607-a106e2f2e0f1 // indirect
github.com/loft-sh/jspolicy v0.2.2 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/otiai10/copy v1.11.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand Down Expand Up @@ -186,7 +188,7 @@ require (
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sys v0.16.0 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0
github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI=
github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0=
github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=
github.com/go-spectest/markdown v0.0.7 h1:Pr+A/YBCtEruReeMMzBKQ4ftvNtlWuaiWRqgNaETA8Q=
github.com/go-spectest/markdown v0.0.7/go.mod h1:OaFedfVlu5+eqe5tI2j3+LD/39T7k5JZAklxTul98EQ=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
Expand Down Expand Up @@ -598,6 +600,8 @@ github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213 h1:qGQQKEcAR99REcM
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw=
github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI=
github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
Expand Down
41 changes: 41 additions & 0 deletions hack/compat-matrix/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package main

import (
"os"
"path/filepath"
"slices"
"strings"

"github.com/olekukonko/tablewriter"

"github.com/loft-sh/vcluster-values/values"
"golang.org/x/exp/maps"
)

func main() {
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Vcluster Distro", "k8s Host version", "Distro version"})
updateTableWithDistro(table, "k3s", values.K3SVersionMap)
updateTableWithDistro(table, "k0s", values.K0SVersionMap)
updateTableWithDistro(table, "k8s", values.K8SAPIVersionMap)
updateTableWithDistro(table, "eks", values.EKSAPIVersionMap)
table.SetAlignment(tablewriter.ALIGN_LEFT)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
table.SetCenterSeparator("|")
table.Render()
}

func updateTableWithDistro(table *tablewriter.Table, distroName string, versionMap map[string]string) {
keys := maps.Keys(versionMap)
slices.Sort(keys)

for i, v := range keys {
name := ""
if i == 0 {
name = distroName
}
versionTag := filepath.Base(versionMap[v])
lastColon := strings.LastIndex(versionTag, ":")
table.Append([]string{name, v, versionTag[lastColon+1:]})
}
}
12 changes: 12 additions & 0 deletions hack/compat-matrix/matrix-template.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Compatibility Matrix

The following table provides a compatibility matrix of which k8s version are supported aginst which vcluster distro versions:



| Vcluster Distro | k8s Host version | Distro Version |
| --------------- | ---------------- | -------------------- |
| {{ .Distro }} | {{ .HostVersion}} | v1.28.2-eks-1-28-6 |
| | 1.27 | v1.27.6-eks-1-27-13 |
| | 1.26 | v1.26.9-eks-1-26-19 |
| | 1.25 | v1.25.14-eks-1-25-23 |
23 changes: 23 additions & 0 deletions vendor/github.com/go-spectest/markdown/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions vendor/github.com/go-spectest/markdown/.golangci.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions vendor/github.com/go-spectest/markdown/.octocov.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions vendor/github.com/go-spectest/markdown/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions vendor/github.com/go-spectest/markdown/Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa2d5ad

Please sign in to comment.