-
Notifications
You must be signed in to change notification settings - Fork 4
update for ivyo 5.0 #80
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,4 +12,4 @@ bases: | |
| images: | ||
| - name: ivory-operator | ||
| newName: docker.io/ivorysql/ivory-operator | ||
| newTag: v4.0 | ||
| newTag: v5.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,4 +14,4 @@ patches: | |
| images: | ||
| - name: ivory-operator | ||
| newName: docker.io/ivorysql/ivory-operator | ||
| newTag: v4.0 | ||
| newTag: v5.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,7 +70,7 @@ declare -r hash="$1" stanza="$2" message="$3" cmd="$4" | |
| if [[ "$(< /etc/pgbackrest/conf.d/config-hash)" != "${hash}" ]]; then | ||
| printf >&2 "%s" "${message}"; exit 1; | ||
| else | ||
| pgbackrest "${cmd}" --pg-version-force=17 --stanza="${stanza}" | ||
| pgbackrest "${cmd}" --pg-version-force=18 --stanza="${stanza}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify that hardcoded pg-version-force=18 doesn't break support for PostgreSQL versions 10-17. The pgBackRest stanza creation script now forces PostgreSQL version 18 for all clusters. Since the operator supports PostgreSQL versions 10-18 (per CRD validation), forcing version 18 for clusters running older versions could potentially cause compatibility issues or unexpected behavior. Run the following script to verify how pg-version-force is used across the codebase and whether it should be dynamic based on the cluster's actual version: 🏁 Script executed: #!/bin/bash
# Search for pg-version-force usage and postgresVersion references
echo "=== Searching for pg-version-force usage ==="
rg -n "pg-version-force" --type go -C 3
echo -e "\n=== Searching for postgresVersion field usage in pgbackrest context ==="
rg -n "postgresVersion" internal/pgbackrest/ -C 3
echo -e "\n=== Checking if version is passed to pgbackrest functions ==="
ast-grep --pattern 'func $_(ctx context.Context, $$$) {
$$$
pgbackrest $$$
$$$
}'Length of output: 7396 I need to gather more context about how the cluster version is passed to the pgbackrest functions and understand the flow between the hardcoded values and the dynamic version handling. Now let me search for function signatures in pgbackrest.go to understand how it's called and whether version info is available: Let me search for the function that uses the pgbackrest.go script and config functions to understand the flow: Length of output: 378 Length of output: 6875 Length of output: 3028 Length of output: 934 Length of output: 4321 Pass PostgreSQL version dynamically instead of hardcoding version 18 in pgBackRest stanza configuration and script. The hardcoded Required changes:
The 🤖 Prompt for AI Agents |
||
| fi | ||
| ` | ||
| if err := exec(ctx, nil, &stdout, &stderr, "bash", "-ceu", "--", | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,4 +43,17 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - timescaledb 2.17.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - wal2json 2.6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgnodemx 1.7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## IvorySQL Operator 5.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 数据库版本支持**ivorysql 5.0** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 组件版本升级 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgBackrest 2.56 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - PgBouncer 1.23.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - Patroni 4.0.7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgAdmin4 9.9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgExporter 0.17.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - 插件版本升级 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - PostGIS 3.5.4 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgaudit 18.0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pg_cron 1.6.7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - wal2json 2.6 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - pgnodemx 1.7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+46
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix markdown formatting: inconsistent indentation and hard tabs. The new release notes section uses inconsistent indentation (4 spaces and tabs) instead of the standard 2-space indentation used in previous sections. Apply this diff to fix the formatting: ## IvorySQL Operator 5.0
- 数据库版本支持**ivorysql 5.0**
- 组件版本升级
- - pgBackrest 2.56
- - PgBouncer 1.23.0
- - Patroni 4.0.7
- - pgAdmin4 9.9
- - pgExporter 0.17.0
+ - pgBackrest 2.56
+ - PgBouncer 1.23.0
+ - Patroni 4.0.7
+ - pgAdmin4 9.9
+ - pgExporter 0.17.0
- 插件版本升级
- - PostGIS 3.5.4
- - pgaudit 18.0
- - pg_cron 1.6.7
- - wal2json 2.6
- - pgnodemx 1.7
+ - PostGIS 3.5.4
+ - pgaudit 18.0
+ - pg_cron 1.6.7
+ - wal2json 2.6
+ - pgnodemx 1.7📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.18.1)49-49: Unordered list indentation (MD007, ul-indent) 50-50: Unordered list indentation (MD007, ul-indent) 51-51: Unordered list indentation (MD007, ul-indent) 52-52: Unordered list indentation (MD007, ul-indent) 53-53: Unordered list indentation (MD007, ul-indent) 55-55: Unordered list indentation (MD007, ul-indent) 55-55: Hard tabs (MD010, no-hard-tabs) 56-56: Unordered list indentation (MD007, ul-indent) 56-56: Hard tabs (MD010, no-hard-tabs) 57-57: Unordered list indentation (MD007, ul-indent) 57-57: Hard tabs (MD010, no-hard-tabs) 58-58: Unordered list indentation (MD007, ul-indent) 58-58: Hard tabs (MD010, no-hard-tabs) 59-59: Unordered list indentation (MD007, ul-indent) 59-59: Hard tabs (MD010, no-hard-tabs) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,7 @@ type IvoryClusterSpec struct { | |
| // The major version of PostgreSQL installed in the PostgreSQL image | ||
| // +kubebuilder:validation:Required | ||
| // +kubebuilder:validation:Minimum=10 | ||
| // +kubebuilder:validation:Maximum=17 | ||
| // +kubebuilder:validation:Maximum=18 | ||
| // +operator-sdk:csv:customresourcedefinitions:type=spec,order=1 | ||
| PostgresVersion int `json:"postgresVersion"` | ||
|
Comment on lines
+126
to
128
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify PostgreSQL/IvorySQL version 18 availability and check for hardcoded version references. The validation constraint update looks correct, but ensure that PostgreSQL/IvorySQL version 18 is officially released and that container images are available for this version. Additionally, verify there are no hardcoded version 17 references elsewhere in the codebase that could cause inconsistencies. Please search the web to confirm version 18 availability: Run the following script to check for hardcoded version references: 🏁 Script executed: #!/bin/bash
# Description: Search for hardcoded references to version 17 that might need updating
echo "=== Searching for potential hardcoded version 17 references ==="
# Search for version 17 in Go files (excluding this file and test files initially)
rg -nP '\b(version|Version|IVORY|POSTGRES|PG).*17\b' --type=go -g '!*_test.go' -C2
echo -e "\n=== Checking environment variable patterns ==="
# Look for RELATED_IMAGE patterns with version 17
rg -nP 'RELATED_IMAGE.*17' --type=go -C2
echo -e "\n=== Checking for maximum/minimum version constraints ==="
# Find other validation Maximum annotations
rg -nP 'validation:(Maximum|Minimum)=17' --type=go -C2Length of output: 169 🌐 Web query: 💡 Result: Yes. PostgreSQL 18 was released and made generally available on September 25, 2025. (postgresql.org) Citations: 🌐 Web query: 💡 Result: Short answer: No — there is no IvorySQL "18" release. Details: IvorySQL's latest releases are in the 4.x series (most recently IvorySQL 4.4, released March 10, 2025). IvorySQL has not published a release numbered 18 or a release based on PostgreSQL 18. PostgreSQL 18 itself was released on September 25, 2025, but IvorySQL has not announced a PG‑18 based IvorySQL release as of the IvorySQL release notes. [1][2] Sources:
Revert PostgreSQL version 18 validation constraint—IvorySQL 18 is not released. PostgreSQL 18 was released on September 25, 2025, but IvorySQL has not published a release numbered 18 or a release based on PostgreSQL 18. The latest IvorySQL release is version 4.4. Updating the validation maximum to 18 allows users to attempt deploying a non-existent IvorySQL version, which will fail at runtime. This change must be reverted or held until IvorySQL 18 is officially released. Additionally, verify that the same change was not made to 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
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.
🧩 Analysis chain
Consider deriving the PostgreSQL version dynamically rather than hardcoding.
The
pg-version-forceparameter is now hardcoded to "18". This could cause issues if:Consider whether this should be derived from the cluster's actual
PostgresVersionfield or defined as a package-level constant.Verify if there are other locations where PostgreSQL version 18 is hardcoded:
🏁 Script executed:
Length of output: 71
I'll verify the scope and context of this hardcoding issue more thoroughly.
🏁 Script executed:
Length of output: 357
🏁 Script executed:
Length of output: 13683
🏁 Script executed:
Length of output: 961
🏁 Script executed:
Length of output: 5384
I need to see the complete function signature to determine if the cluster information is available.
Length of output: 1522
🏁 Script executed:
Length of output: 2367
Now I need to find where this function is called to understand how to pass the PostgreSQL version.
Length of output: 1241
Hardcode at line 313 needs to be replaced with dynamic version from cluster specification.
The function
populatePGInstanceConfigurationMapis called from line 108 with access toivoryCluster.Spec.PostgresVersion, but the function signature lacks a version parameter. AddpostgresVersion intto the function signature and passivoryCluster.Spec.PostgresVersionfrom the call site. Then replace the hardcoded "18" at line 313 withstrconv.Itoa(postgresVersion).This aligns with the existing pattern used in
internal/controller/ivorycluster/pgbackrest.go:679, where--pg-version-forceis set dynamically tostrconv.Itoa(ivoryCluster.Spec.PostgresVersion).🤖 Prompt for AI Agents