Skip to content
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

docs: better compatibility matrix #5842

Merged
merged 5 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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 tools/kompat/pkg/kompat/kompat.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (k Kompat) Markdown(_ ...Options) string {
data := []string{k.Name}
for _, c := range k.Compatibility {
if c.MaxK8sVersion == "" || c.MinK8sVersion == c.MaxK8sVersion {
headers = append(headers, fmt.Sprintf("`%s`+", c.MinK8sVersion))
headers = append(headers, fmt.Sprintf("\\>= `%s`", c.MinK8sVersion))
} else {
headers = append(headers, fmt.Sprintf("`%s` - `%s`", c.MinK8sVersion, c.MaxK8sVersion))
}
Expand Down Expand Up @@ -365,7 +365,7 @@ func semverRange(semvers []string, allSemvers ...string) string {
allSems := allSemvers
sortSemvers(allSems)
if allSems[len(allSems)-1] == semvers[len(semvers)-1] {
return fmt.Sprintf("%s+", semvers[0])
return fmt.Sprintf("\\>= %s", strings.ReplaceAll(semvers[0], ".x", ""))
}
}
return fmt.Sprintf("%s - %s", semvers[0], semvers[len(semvers)-1])
Expand Down
6 changes: 3 additions & 3 deletions website/content/en/preview/upgrading/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Before you begin upgrading Karpenter, consider Karpenter compatibility issues re

[comment]: <> (the content below is generated from hack/docs/compataiblitymetrix_gen_docs.go)

| KUBERNETES | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 |
|------------|---------|---------|---------|---------|---------|---------|---------|
| karpenter | 0.21.x+ | 0.21.x+ | 0.25.x+ | 0.28.x+ | 0.28.x+ | 0.31.x+ | 0.34.0+ |
| KUBERNETES | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 |
engedaam marked this conversation as resolved.
Show resolved Hide resolved
|------------|----------|----------|----------|----------|----------|----------|------------|
| karpenter | \>= 0.21 | \>= 0.21 | \>= 0.25 | \>= 0.28 | \>= 0.28 | \>= 0.31 | \>= 0.34.0 |

[comment]: <> (end docs generated content from hack/docs/compataiblitymetrix_gen_docs.go)

Expand Down