Skip to content

Commit 801e1dc

Browse files
committed
DOC/MAJOR: lifecycle: add lifecycle information about active versions
1 parent 383c1cd commit 801e1dc

File tree

10 files changed

+139
-3
lines changed

10 files changed

+139
-3
lines changed

.aspell.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ allowed:
2727
- linter
2828
- linters
2929
- tls
30+
- lifecycle

documentation/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
- [Annotations](annotations.md)
1111
- [Prometheus](prometheus.md)
1212

13+
### Lifecycle
14+
15+
- [Lifecycle](lifecycle.md)
16+
1317
#### Experimental
1418
- [Gateway API](gateway-api.md)
1519

documentation/gen/doc-gen

-2.89 MB
Binary file not shown.

documentation/gen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module doc-gen
22

3-
go 1.15
3+
go 1.23
44

55
require (
66
github.com/google/renameio v1.0.1

documentation/gen/lifecycle.go

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"log"
6+
"strings"
7+
8+
"github.com/google/renameio"
9+
)
10+
11+
type SupportVersion struct {
12+
Version string `yaml:"version"`
13+
GA string `yaml:"ga"`
14+
MinEOL string `yaml:"min_eol"`
15+
HAProxy string `yaml:"haproxy"`
16+
K8S []string `yaml:"k8s"`
17+
}
18+
19+
type Support struct {
20+
Versions []*SupportVersion `yaml:"versions"`
21+
}
22+
23+
func (c *Conf) generateSupport() {
24+
var buff strings.Builder
25+
buff.WriteString(title)
26+
// buff.WriteString(headerREADME)
27+
buff.WriteByte('\n')
28+
buff.WriteByte('\n')
29+
buff.WriteString(`### Lifecycle`)
30+
buff.WriteByte('\n')
31+
buff.WriteByte('\n')
32+
buff.WriteString(`| Version | GA | EOL | HAProxy | *k8s versions |`)
33+
buff.WriteByte('\n')
34+
buff.WriteString(`| -:|:-:|:-:|:-:|:-:|`)
35+
buff.WriteByte('\n')
36+
37+
for _, version := range c.Support {
38+
if version.HAProxy == "" {
39+
version.HAProxy = version.Version
40+
}
41+
buff.WriteString(fmt.Sprintf(`| **%s** | %s | %s | %s | %s |`, version.Version, version.GA, version.MinEOL, version.HAProxy, strings.Join(version.K8S, ", ")))
42+
buff.WriteByte('\n')
43+
}
44+
45+
buff.WriteByte('\n')
46+
buff.WriteString(`**Note:** for specific version of controller, only k8s versions that are thoroughly tested with that version are listed`)
47+
buff.WriteByte('\n')
48+
buff.WriteByte('\n')
49+
buff.WriteString(`This is autogenerated from [lifecycle.yaml](lifecycle.yaml). Description can be found in [generator readme](gen/README.md)`)
50+
buff.WriteByte('\n')
51+
52+
err := renameio.WriteFile("../lifecycle.md", []byte(buff.String()), 0o644)
53+
if err != nil {
54+
log.Println(err)
55+
}
56+
}

documentation/gen/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ func main() {
77
cn.generateReadme()
88
cn.generateReadmeAnnotations()
99
cn.generateReadmeController()
10+
cn.generateSupport()
1011
// cn.saveConf()
1112
// cn.saveDocConf()
1213
}

documentation/gen/readme.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ var headerREADME = `
2222
- [Annotations](annotations.md)
2323
- [Prometheus](prometheus.md)
2424
25+
### Lifecycle
26+
27+
- [Lifecycle](lifecycle.md)
28+
2529
#### Experimental
2630
- [Gateway API](gateway-api.md)
2731

documentation/gen/types.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package main
22

33
import (
4-
"io/ioutil"
54
"log"
5+
"os"
66

77
"gopkg.in/yaml.v3"
88
)
@@ -50,10 +50,11 @@ type Conf struct {
5050
Arguments []*ConfArg `yaml:"image_arguments"`
5151
Groups map[string]ConfGroup `yaml:"groups"`
5252
Items []*ConfItem `yaml:"annotations"`
53+
Support []*SupportVersion `yaml:"versions"`
5354
}
5455

5556
func (c *Conf) getConf() *Conf {
56-
yamlFile, err := ioutil.ReadFile("../doc.yaml")
57+
yamlFile, err := os.ReadFile("../doc.yaml")
5758
if err != nil {
5859
log.Printf("yamlFile.Get err #%v ", err)
5960
}
@@ -62,6 +63,17 @@ func (c *Conf) getConf() *Conf {
6263
log.Fatalf("Unmarshal: %v", err)
6364
}
6465

66+
yamlFile, err = os.ReadFile("../lifecycle.yaml")
67+
if err != nil {
68+
log.Printf("yamlFile.Get err #%v ", err)
69+
}
70+
support := Support{}
71+
err = yaml.Unmarshal(yamlFile, &support)
72+
if err != nil {
73+
log.Fatalf("Unmarshal: %v", err)
74+
}
75+
c.Support = support.Versions
76+
6577
return c
6678
}
6779

documentation/lifecycle.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
# ![HAProxy](../assets/images/haproxy-weblogo-210x49.png "HAProxy")
3+
4+
## HAProxy kubernetes ingress controller
5+
6+
### Lifecycle
7+
8+
| Version | GA | EOL | HAProxy | *k8s versions |
9+
| -:|:-:|:-:|:-:|:-:|
10+
| **3.0** | 2024-06 | 2025-06 | 3.0 | 1.30, 1.29, 1.28 |
11+
| **1.11** | 2024-02 | 2025-02 | 2.8 | 1.28, 1.27, 1.26 |
12+
| **1.10** | 2023-04 | 2024-06 | 2.7 | 1.27, 1.26, 1.25 |
13+
| **1.9** | 2022-10 | 2023-11 | 2.6 | 1.25, 1.24, 1.23 |
14+
| **1.8** | 2022-06 | 2023-05 | 2.5 | 1.23, 1.22, 1.21 |
15+
16+
**Note:** for specific version of controller, only k8s versions that are thoroughly tested with that version are listed
17+
18+
This is autogenerated from [lifecycle.yaml](lifecycle.yaml). Description can be found in [generator readme](gen/README.md)

documentation/lifecycle.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
versions:
2+
- version: "3.0"
3+
ga: 2024-06
4+
min_eol: 2025-06
5+
k8s:
6+
- "1.30"
7+
- "1.29"
8+
- "1.28"
9+
- version: "1.11"
10+
ga: 2024-02
11+
min_eol: 2025-02
12+
k8s:
13+
- "1.28"
14+
- "1.27"
15+
- "1.26"
16+
haproxy: "2.8"
17+
- version: "1.10"
18+
ga: 2023-04
19+
min_eol: 2024-06
20+
k8s:
21+
- "1.27"
22+
- "1.26"
23+
- "1.25"
24+
haproxy: "2.7"
25+
- version: "1.9"
26+
ga: 2022-10
27+
min_eol: 2023-11
28+
k8s:
29+
- "1.25"
30+
- "1.24"
31+
- "1.23"
32+
haproxy: "2.6"
33+
- version: "1.8"
34+
ga: 2022-06
35+
min_eol: 2023-05
36+
k8s:
37+
- "1.23"
38+
- "1.22"
39+
- "1.21"
40+
haproxy: "2.5"

0 commit comments

Comments
 (0)