Skip to content

Postgres Cluster (Restore) is able to be created with name that causes pod to have label longer than 63 characters. #3833

Open
@ncrmro

Description

@ncrmro

Overview

Create cluster with long name unsupervised-shared-usecase-postgres-restore. In our case we where creating a restore. The restore completes fine but non of the stateful sets are able to

 Warning  FailedCreate  21m (x66 over 13h)     statefulset-controller  create Pod unsupervised-shared-usecase-postgres-restore-primary-78cd-0 in StatefulSet unsupervised-shared-usecase-postgres-restore-primary-78cd f │
│ ailed error: Pod "unsupervised-shared-usecase-postgres-restore-primary-78cd-0" is invalid: metadata.labels: Invalid value: "unsupervised-shared-usecase-postgres-restore-primary-78cd-5979c86d57": must be no more than 6 │
│ 3 characters    

Environment

Please provide the following details:

  • Platform: AKS v1.27.8
  • Platform Version: (e.g. 1.20.3, 4.7.0)
  • PGO Image Tag: ubi8-15.4-0
  • Postgres Version: 15
  • Storage: EBS

Steps to Reproduce

REPRO

Create cluster with long name unsupervised-shared-usecase-postgres-restore. In our case we where creating a restore. The restore completes fine but non of the stateful sets are able to

 Warning  FailedCreate  21m (x66 over 13h)     statefulset-controller  create Pod unsupervised-shared-usecase-postgres-restore-primary-78cd-0 in StatefulSet unsupervised-shared-usecase-postgres-restore-primary-78cd f │
│ ailed error: Pod "unsupervised-shared-usecase-postgres-restore-primary-78cd-0" is invalid: metadata.labels: Invalid value: "unsupervised-shared-usecase-postgres-restore-primary-78cd-5979c86d57": must be no more than 6 │
│ 3 characters    

EXPECTED

Cluster to restore and be running with restored dataset.

ACTUAL

Cluster restore finished and stateful sets could not create their pods because label is to long.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions