-
Notifications
You must be signed in to change notification settings - Fork 4
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
WIP: Automate operator release #320
base: main
Are you sure you want to change the base?
Conversation
|
A few points:
|
tools/operator-tool/README.md
Outdated
$ ./bin/operator-tool --operator "psmdb-operator" --version "1.17.0" # outputs source file for psmdb-operator | ||
... | ||
$ ./bin/operator-tool --operator "pg-operator" --version "2.5.0" # outputs source file for pg-operator | ||
... | ||
$ ./bin/operator-tool --operator "ps-operator" --version "0.8.0" # outputs source file for ps-operator | ||
... | ||
$ ./bin/operator-tool --operator "pxc-operator" --version "1.15.1" # outputs source file for pxc-operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the flag is already --operator
maybe we can just use --operator psmdb
or --operator pxc
, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
|
|
|
|
|
|
} | ||
|
||
func PSMDB(f *filler.VersionFiller, version string) (*vsAPI.VersionMatrix, error) { | ||
mongoVersions, err := productsapi.GetProductVersions("percona-server-mongodb-", "percona-server-mongodb-7.0", "percona-server-mongodb-6.0", "percona-server-mongodb-5.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please include mongo 8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and remove mongo 5.0
return nil, err | ||
} | ||
|
||
xtrabackupVersions, err := productsapi.GetProductVersions("Percona-XtraBackup-", "Percona-XtraBackup-8.0", "Percona-XtraBackup-2.4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please include pxc 8.4
) | ||
|
||
func PG(f *filler.VersionFiller, version string) (*vsAPI.VersionMatrix, error) { | ||
pgVersions, err := productsapi.GetProductVersions("", "postgresql-distribution-16", "postgresql-distribution-15", "postgresql-distribution-14", "postgresql-distribution-13", "postgresql-distribution-12") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please include pg 17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and remove pg 12
@@ -0,0 +1,75 @@ | |||
# operator-tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use ticket CLOUD-861 in PR
|
||
import "strings" | ||
|
||
func GetArchSuffixes() []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we actually only need -multi for now
// Logic: | ||
// - If an image supports both amd64 and arm64 architectures and has a "-multi" suffix in its tag, | ||
// the function includes a version of the image tag without the "-multi" suffix in the map. | ||
// - If no image with both amd64 and arm64 builds is found, separate images for amd64 and arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need separated images for arm64 and amd64, as we don't need arm64 images individually.
When a image does not have arm64, just provide the it's tag with only amd64 hash.
Specify an older source file. The operator-tool will exclude any versions that are older than those listed in this file | ||
-include-arch-images | ||
Include images with "-multi", "-arm64", "-aarch64" suffixes in the output file | ||
-only-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using ./bin/operator-tool -operator psmdb --version 1.19.0 --only-latest --include-arch-images --file sources/operator.1.18.0.psmdb-operator.json
This makes backup, operator and pmm have 2 images, but ideally we want just the latest.
This PR introduces a new binary,
operator-tool
, which automates the generation of source files for operators.See README.md for more details.
Still to be done (could be addressed in future PRs):
api-tests
directory*.dep.json
files