K8SPG-1011 drop crunchy- prefix from missing image error#1690
Open
hors wants to merge 3 commits into
Open
Conversation
…backups.enabled
hors
requested review from
egegunes,
gkech,
mayankshah1607,
nmarukovich,
oksana-grishchenko and
pooknull
as code owners
July 17, 2026 17:14
Contributor
There was a problem hiding this comment.
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
VerifyImageValuesmissing-image names fromcrunchy-*to shorter names (e.g.,postgres,pgbackrest). - Add a
truedefault and clearer description forspec.backups.enabledin API types and generated CRDs. - Update example CR to hint at the
enabledfield underbackups.
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 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
previously approved these changes
Jul 17, 2026
Collaborator
commit: 7f0832c |
gkech
reviewed
Jul 19, 2026
| 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" |
Contributor
There was a problem hiding this comment.
Instead of using this hardcoded value here, we can use version.Version() when the latest version should be used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability