Skip to content

Commit c4be5cd

Browse files
Merge pull request #926 from dakshj48/main
fix(admintools): add defaults for v1.23.x
2 parents daacaaa + 36ca358 commit c4be5cd

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

docs/features/admin-tools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ spec:
2121
# https://hub.docker.com/r/temporalio/admin-tools/tags
2222
version: 1.24.2-tctl-1.18.1-cli-1.0.0
2323
```
24+
Note: You need helm chart version 0.6.0 or above to specify admintools version.

pkg/version/admintools.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import "fmt"
55
// DefaultAdminToolTag returns the tag of the admin tools image for the given version.
66
// It's required as 1.24.x had really bad image tagging.
77
func DefaultAdminToolTag(version *Version) string {
8+
// Particular case for >= 1.23.0 but < 1.24.0
9+
// Need this because 1.23.1 tag does not exist
10+
if version.GreaterOrEqual(V1_23_0) && version.LessThan(V1_24_0) {
11+
return "1.23.1.1-tctl-1.18.1-cli-0.12.0"
12+
}
13+
814
// Particular case for >= 1.24.0 but < 1.25.0
915
if version.GreaterOrEqual(V1_24_0) && version.LessThan(V1_25_0) {
1016
return "1.24.2-tctl-1.18.1-cli-1.0.0"

pkg/version/admintools_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ func TestDefaultAdminToolTag(t *testing.T) {
1313
version *version.Version
1414
expected string
1515
}{
16+
{
17+
name: "Version 1.23.0",
18+
version: version.MustNewVersionFromString("1.23.0"),
19+
expected: "1.23.1.1-tctl-1.18.1-cli-0.12.0",
20+
},
21+
{
22+
name: "Version 1.23.9",
23+
version: version.MustNewVersionFromString("1.23.9"),
24+
expected: "1.23.1.1-tctl-1.18.1-cli-0.12.0",
25+
},
1626
{
1727
name: "Version 1.24.1",
1828
version: version.MustNewVersionFromString("1.24.1"),

0 commit comments

Comments
 (0)