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

MySQL Pods are not created when the length of MySQLCluster name is 48 or more #502

Closed
masa213f opened this issue Feb 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@masa213f
Copy link
Contributor

masa213f commented Feb 1, 2023

Describe the bug
MySQL Pods are not created when the length of MySQLCluster name is 48 or more.

Environments

  • Version: MOCO v0.14.1、Kubernetes 1.24.9

To Reproduce
Apply the following manifest:

apiVersion: moco.cybozu.com/v1beta2
kind: MySQLCluster
metadata:
  name: mycluster-12345678901234567890123456789012345678
spec:
  podTemplate:
    spec:
      containers:
      - image: quay.io/cybozu/mysql:8.0.28
        name: mysqld
  replicas: 3
  volumeClaimTemplates:
  - metadata:
      name: mysql-data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi

Then the resource is successfully created, but MySQL pods iare not created.
The following error is recorded in the StatefulSet's event.

$ kubectl describe sts -n sandbox moco-mycluster-12345678901234567890123456789012345678 | tail
  StorageClass:  topolvm-flash1-xfs
  Labels:        <none>
  Annotations:   <none>
  Capacity:      5Gi
  Access Modes:  [ReadWriteOnce]
Events:
  Type     Reason            Age                 From                    Message
  ----     ------            ----                ----                    -------
  Normal   SuccessfulCreate  31s                 statefulset-controller  create Claim mysql-data-moco-mycluster-12345678901234567890123456789012345678-0 Pod moco-mycluster-12345678901234567890123456789012345678-0 in StatefulSet moco-mycluster-12345678901234567890123456789012345678 success
  Warning  FailedCreate      10s (x13 over 31s)  statefulset-controller  create Pod moco-mycluster-12345678901234567890123456789012345678-0 in StatefulSet moco-mycluster-12345678901234567890123456789012345678 failed error: Pod "moco-mycluster-12345678901234567890123456789012345678-0" is invalid: metadata.labels: Invalid value: "moco-mycluster-12345678901234567890123456789012345678-584f97cbf9": must be no more than 63 characters

Expected behavior
Deny creation of MySQL resource by the validation webhook, when the length of MySQLCluster name is 48 or more.

Additional context
Add any other context about the problem here.

@masa213f masa213f added the bug Something isn't working label Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants