Skip to content

K8SPG-777 set crVersion #1210

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

K8SPG-777 set crVersion #1210

wants to merge 8 commits into from

Conversation

nmarukovich
Copy link
Contributor

@nmarukovich nmarukovich commented Jul 4, 2025

K8SPG-777 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:
Add validation for crVersion and ensure it is set if empty.
Since crVersion is defined as a string, we must store it as a string value to avoid validation errors.

// Version is the application version in the format X.Y.Z (e.g., "2.7.0").
	// +kubebuilder:validation:Pattern=`^$|^\d+\.\d+\.\d+$`
	// +kubebuilder:example="2.7.0"
	CRVersion string `json:"crVersion,omitempty"`

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@@ -7,6 +7,7 @@ import (
"fmt"
"io"
"reflect"
logf "sigs.k8s.io/controller-runtime/pkg/log"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[goimports-reviser] reported by reviewdog 🐶

Suggested change
logf "sigs.k8s.io/controller-runtime/pkg/log"

@nmarukovich nmarukovich marked this pull request as ready for review July 7, 2025 13:22
@@ -5941,6 +5941,9 @@ spec:
Version of the operator. Update this to new version after operator
upgrade to apply changes to Kubernetes objects. Default is the latest
version.
enum:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I use 2.6.0 with this CRD?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it was like en example.
how can we make it better?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable failure 00:00:00
custom-extensions passed 00:00:00
custom-tls passed 00:00:00
demand-backup passed 00:00:00
finalizers passed 00:00:00
init-deploy passed 00:00:00
monitoring passed 00:00:00
monitoring-pmm3 passed 00:08:29
one-pod passed 00:00:00
operator-self-healing passed 00:00:00
pgvector-extension passed 00:00:00
pitr passed 00:00:00
scaling passed 00:00:00
scheduled-backup passed 00:00:00
self-healing passed 00:00:00
sidecars passed 00:00:00
start-from-backup passed 00:00:00
tablespaces passed 00:00:00
telemetry-transfer passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-minor passed 00:00:00
users passed 00:00:00
We run 22 out of 22 00:08:29

commit: 0b8a9b0
image: perconalab/percona-postgresql-operator:PR-1210-0b8a9b06d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants