Skip to content

K8SPG-1011 drop crunchy- prefix from missing image error#1690

Open
hors wants to merge 3 commits into
mainfrom
K8SPG-1011-fix
Open

K8SPG-1011 drop crunchy- prefix from missing image error#1690
hors wants to merge 3 commits into
mainfrom
K8SPG-1011-fix

Conversation

@hors

@hors hors commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

CHANGE DESCRIPTION

Solution:
Remove the "crunchy-" prefix from the image names listed in the
"Missing image(s)" error so the message reflects Percona naming
(e.g. "Missing image(s): [pgbackrest]").
Add an explicit +kubebuilder:default=true to backups.enabled, matching
the existing runtime behavior where a nil value is treated as enabled.
Regenerate the CRDs and reflect the field in deploy/cr.yaml.

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?

@hors
hors requested a review from Copilot July 17, 2026 17:14
@hors hors changed the title K8SPG-1011 drop crunchy- prefix from missing image error and default … K8SPG-1011 drop crunchy- prefix from missing image error Jul 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the operator’s user-facing messaging for missing image configuration (dropping the crunchy- prefix) and introduces a CRD default of true for spec.backups.enabled so backups are enabled unless explicitly disabled.

Changes:

  • Update VerifyImageValues missing-image names from crunchy-* to shorter names (e.g., postgres, pgbackrest).
  • Add a true default and clearer description for spec.backups.enabled in API types and generated CRDs.
  • Update example CR to hint at the enabled field under backups.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go Adds docs + kubebuilder default marker for backups.enabled.
internal/config/config.go Updates missing-image identifiers in VerifyImageValues error construction.
deploy/crd.yaml Propagates backups.enabled default/description into bundled CRD YAML.
deploy/cr.yaml Updates sample CR with commented backups.enabled.
config/crd/bases/pgv2.percona.com_perconapgclusters.yaml Propagates backups.enabled default/description into base CRD.
build/crd/percona/generated/pgv2.percona.com_perconapgclusters.yaml Propagates backups.enabled default/description into generated CRD.

Comment thread internal/config/config.go
Comment thread pkg/apis/pgv2.percona.com/v2/perconapgcluster_types.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Comment thread internal/config/config.go
Comment on lines 160 to 166
if PostgresContainerImage(cluster) == "" {
if cluster.Spec.PostGISVersion != "" {
images = append(images, "crunchy-postgres-gis")
images = append(images, "postgres-gis")
} else {
images = append(images, "crunchy-postgres")
images = append(images, "postgres")
}
}
Comment on lines 246 to +247
err := VerifyImageValues(cluster)
assert.Assert(t, !strings.Contains(err.Error(), "crunchy-pgbackrest"))
assert.Assert(t, !strings.Contains(err.Error(), "pgbackrest"))
jvpasinatto
jvpasinatto previously approved these changes Jul 17, 2026
@JNKPercona

Copy link
Copy Markdown
Collaborator
Test Name Result Time
backup-enable-disable passed 00:15:01
builtin-extensions passed 00:00:00
cert-manager-tls passed 00:00:00
custom-envs passed 00:00:00
custom-tls passed 00:00:00
database-init-sql passed 00:00:00
demand-backup passed 00:00:00
demand-backup-offline-snapshot passed 00:15:03
dynamic-configuration passed 00:00:00
finalizers passed 00:00:00
init-deploy passed 00:00:00
huge-pages passed 00:00:00
major-upgrade-14-to-15 passed 00:00:00
major-upgrade-15-to-16 passed 00:00:00
major-upgrade-16-to-17 passed 00:00:00
major-upgrade-17-to-18 passed 00:00:00
ldap passed 00:00:00
ldap-tls passed 00:00:00
monitoring passed 00:00:00
monitoring-pmm3 passed 00:00:00
one-pod passed 00:00:00
operator-self-healing passed 00:00:00
pgbouncer-mtls 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
standby-pgbackrest passed 00:00:00
standby-streaming 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
migration-from-crunchy-standby passed 00:00:00
migration-from-crunchy-pv passed 00:00:00
migration-from-crunchy-backup-restore passed 00:00:00
Summary Value
Tests Run 39/39
Job Duration 00:44:40
Total Test Time 00:30:05

commit: 7f0832c
image: perconalab/percona-postgresql-operator:PR-1690-7f0832caa

func TestPerconaPGCluster_DefaultBackupsEnabled(t *testing.T) {
t.Run("nil is defaulted to true for CRVersion >= 3.1.0", func(t *testing.T) {
cr := new(PerconaPGCluster)
cr.Spec.CRVersion = "3.1.0"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Instead of using this hardcoded value here, we can use version.Version() when the latest version should be used.

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.

5 participants