apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.2k stars 184 forks source link

[BUG] pg/redis cluster created failed without status #8423

Closed tianyue86 closed 5 days ago

tianyue86 commented 2 weeks ago

Describe the bug

Kubernetes: v1.31.1-aliyun.1
KubeBlocks: 1.0.0-beta.0
kbcli: 1.0.0-alpha.0
postgresql                     1.0.0-alpha.0   community   Enabled    true           
pulsar                         1.0.0-alpha.0   community   Enabled    true           
redis                          1.0.0-alpha.0   community   Enabled    true 

To Reproduce Steps to reproduce the behavior:

  1. Get the latest yaml
    helm template pgclu02 ./addons-cluster/postgresql --version 1.0.0-alpha.0
    ---
    # Source: postgresql-cluster/templates/cluster.yaml
    apiVersion: apps.kubeblocks.io/v1
    kind: Cluster
    metadata:
    name: pgclu02
    namespace: default
    labels: 
    helm.sh/chart: postgresql-cluster-1.0.0-alpha.0
    app.kubernetes.io/version: "15.7.0"
    app.kubernetes.io/instance: pgclu02
    spec:
    terminationPolicy: Delete
    clusterDef: postgresql
    topology: standalone
    componentSpecs:
    - name: postgresql
      labels:        
        apps.kubeblocks.postgres.patroni/scope: pgclu02-postgresql      
      replicas: 1
      serviceAccountName:       
      disableExporter: true      
      resources:
        limits:
          cpu: "0.5"
          memory: "0.5Gi"
        requests:
          cpu: "0.5"
          memory: "0.5Gi"      
      volumeClaimTemplates:
        - name: data # ref clusterDefinition components.containers.volumeMounts.name
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 20Gi
  2. check cluster status tianyue@apeclouds-MacBook-Pro kubeblocks-addons % k get cluster -A
    NAMESPACE NAME CLUSTER-DEFINITION TERMINATION-POLICY STATUS AGE default pgclu02 postgresql Delete 52m default redisclu02 redis Delete 46m
  3. check pod: no pod created
  4. check cmp: no status tianyue@apeclouds-MacBook-Pro kubeblocks-addons % k get cmp NAME DEFINITION SERVICE-VERSION STATUS AGE pgclu02-postgresql postgresql-16-1.0.0-alpha.0 16.4.0 55m redisclu02-redis-sentinel redis-sentinel-7-1.0.0-alpha.0 7.2.4 49m
  5. Describe cmp tianyue@apeclouds-MacBook-Pro kubeblocks-addons % k describe cmp pgclu02-postgresql Name: pgclu02-postgresql Namespace: default Labels: app.kubernetes.io/component=postgresql-16-1.0.0-alpha.0 app.kubernetes.io/instance=pgclu02 app.kubernetes.io/managed-by=kubeblocks apps.kubeblocks.io/component-name=postgresql componentdefinition.kubeblocks.io/name=postgresql-16-1.0.0-alpha.0 Annotations: apps.kubeblocks.io/cluster-uid: 72196e1b-ae1b-48cd-a4da-5c64efb41fbe kubeblocks.io/generation: 2 API Version: apps.kubeblocks.io/v1 Kind: Component Metadata: Creation Timestamp: 2024-11-07T03:04:02Z Finalizers: cluster.kubeblocks.io/finalizer component.kubeblocks.io/finalizer Generation: 1 Owner References: API Version: apps.kubeblocks.io/v1 Block Owner Deletion: true Controller: true Kind: Cluster Name: pgclu02 UID: 72196e1b-ae1b-48cd-a4da-5c64efb41fbe Resource Version: 409893 UID: 6136da93-713f-4277-a705-ea28079d1d2f Spec: Comp Def: postgresql-16-1.0.0-alpha.0 Disable Exporter: true Labels: apps.kubeblocks.postgres.patroni/scope: pgclu02-postgresql Replicas: 1 Resources: Limits: Cpu: 500m Memory: 512Mi Requests: Cpu: 500m Memory: 512Mi Service Version: 16.4.0 Volume Claim Templates: Name: data Spec: Access Modes: ReadWriteOnce Resources: Requests: Storage: 20Gi Status: Conditions: Last Transition Time: 2024-11-07T03:04:02Z Message: The operator has started the provisioning of Cluster: pgclu02-postgresql Observed Generation: 1 Reason: PreCheckSucceed Status: True Type: ProvisioningStarted Events:

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

shanshanying commented 5 days ago

closed as fxied.