percona / percona/percona-postgresql-operator

Proper image defaults

Open
#1,671 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request PG Proposed
Dominant language
Go
Stars
385
Forks
83
Avg merge
2d 5h
Merged PRs (30d)
39

Description

Proposal

From the CR standpoint both in the PerconaPGCluster resource and the upstream PostgresCluster image fields are optional - even though in practice they are not, and the error about missing images only appreas in the events of the upstream resource.

In the upstream the feature to control the default images through env variables was introduced and the default operator installation comes with these predefined.

Downstream Percona has some issues with this approach

  • Certified images definitions are NOT included in the default bundle
  • There is no concept of crVersion in the upstream, so the upstream solution defines default images once, not per crVersion
  • Percona has more/other images such as PMM, or configurable initContainer and extensions installer image

I would like to propose a solution where operator would automatically pick certified images for a given crVersion which would make the image fields actually optional instead of silently erroring (warning events are present only on the upstream resource). The solution would be consisting of:

  • An YAML file embed withing the binary containing the per crVersion image definitions. This would need to either be automated or maintained once per release
  • An option to partially or fully override the images or only registry using either a configmap or a mounted yaml (mounted to the operator deployment)
  • Possibility of defining images on the CR and backwards compatibility would be preserved
Use-Case

It would reduce a maintenance burden of maintainingg the image versions and manually checking Percona documentation for certified images which correspond to a given crVersion.

Given the presence of the MR for supporting official postgres images, it would also be possible to easily switch to these by default

Is this a feature you are interested in implementing yourself?

Yes

Anything else?

A draft, not code-ready proposal is present in: #1640

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the draft proposal in #1640 and trace how image fields are currently handled in the PerconaPGCluster and upstream PostgresCluster resources. Compare the proposed embedded per-crVersion definitions with ConfigMap or mounted YAML overrides, CR-level values, and the listed image cases; done means a decided, documented design that preserves backward compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, postgresql
Domain
databases, devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.