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

want to set resources in "init" container, have two "init" containers #935

Open
usernameisnull opened this issue Dec 18, 2024 · 0 comments

Comments

@usernameisnull
Copy link

the cr's yaml

apiVersion: mysql.presslabs.org/v1alpha1
kind: MysqlCluster
metadata:
  name: my-cluster
spec:
  replicas: 1
  secretName: my-secret
  podSpec:
    initContainers:
      - name: init
        resources:
          limits:
            cpu: 2
            memory: 2Gi
          requests:
            cpu: 100m
            memory: 107374182400m

describe sts

Events:
  Type     Reason            Age                 From                    Message
  ----     ------            ----                ----                    -------
  Normal   SuccessfulCreate  74s                 statefulset-controller  create Claim data-ddd1218-init-3-mysql-0 Pod ddd1218-init-3-mysql-0 in StatefulSet ddd1218-init-3-mysql success
  Warning  FailedCreate      32s (x14 over 74s)  statefulset-controller  create Pod ddd1218-init-3-mysql-0 in StatefulSet ddd1218-init-3-mysql failed error: Pod "ddd1218-init-3-mysql-0" is invalid: [spec.initContainers[0].image: Required value, spec.initContainers[1].name: Duplicate value: "init"]

the sts yaml

image

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

No branches or pull requests

1 participant