Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ncrmro opened this issue Jan 30, 2024 · 4 comments

Comments

@ncrmro
Copy link

ncrmro commented Jan 30, 2024

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.

@tjmoore4
Copy link
Contributor

tjmoore4 commented Feb 6, 2024

Hi @ncrmro. Thank you for reaching out; I'm sorry to hear you're hitting this issue. Fundamentally, there is an inherent limit to the maximum length for certain objects due to limitations in Kubernetes itself (please see the docs). With that said, I've added some notes and referenced your issue in our backlog to further clarify our documentation in this regard.

@ncrmro
Copy link
Author

ncrmro commented Feb 6, 2024

@tjmoore4 my though here is the operator should not allow a cluster name that will fail midway through a restore

@tjmoore4
Copy link
Contributor

tjmoore4 commented Feb 6, 2024

@ncrmro Understood. I've added an additional issue to track this request and evaluate potential improvements. Thanks again for reaching out.

@ncrmro
Copy link
Author

ncrmro commented Feb 17, 2024

@tjmoore4 thank you, yall are doing amazing work! Feel free to close if needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants