Skip to content

Images and sizes must be defined for unused components #1199

@evilhamsterman

Description

@evilhamsterman

Report

When creating a new cluster, you have to specify images for all components even if they aren't used.

It looks like there's a Jira bug for the backup image https://perconadev.atlassian.net/browse/K8SPS-616 but the logic issues are deeper.

More about the problem

For example if I create a group-replication cluster with ha proxy, the operator will not accept the CR unless I define the image and size for the router.

If I do specify those values it'll go ahead and create the cluster, but then when I try to run a backup or a restore it will fail because I haven't defined and orchestrator image or size, even though they aren't used for group-replication.

Steps to reproduce

  1. Try to create a basic group replication cluster with haproxy enabled and router disabled
  2. Submit the resource using server side apply
  3. Submit fails with the error
    The PerconaServerMySQL "phorge-db" is invalid: 
    * spec.proxy.router.image: Required value
    * spec.proxy.router.size: Required value
    
  4. Create noop values and create the cluster
  5. Try to run a backup on the cluster and you get errors in the operator log about orchestrator image and size missing

Versions

  1. Kubernetes: 1.32
  2. Operator: 1.0.0
  3. Database: 8.0.43

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions