Describe the bug
create pg cluster fail: component postgresql's PrimaryIndex cannot be nil when workloadType is Replication.
helm chart package from branch main
kbcli version
Kubernetes: v1.23.8+k3s1
KubeBlocks: 0.4.0-refactor-release
kbcli: 0.4.0-beta.5
Events(last 5 warnings, see more:kbcli cluster list-events -n default pg-cluster):
TIME TYPE REASON OBJECT MESSAGE
Mar 06,2023 11:31 UTC+0800 Warning PreCheckFailed Cluster/pg-cluster component postgresql's PrimaryIndex cannot be nil when workloadType is Replication.
4. get cd yaml
kubectl get cd postgresql -oyaml
apiVersion: apps.kubeblocks.io/v1alpha1
kind: ClusterDefinition
metadata:
annotations:
meta.helm.sh/release-name: kubeblocks
meta.helm.sh/release-namespace: default
creationTimestamp: "2023-03-06T03:30:10Z"
finalizers:
name: kbadmin
provisionPolicy:
scope: AnyPods
statements:
creation: CREATE USER $(USERNAME) SUPERUSER PASSWORD '$(PASSWD)';
deletion: DROP USER IF EXISTS $(USERNAME);
type: CreateByStmt
name: kbdataprotection
provisionPolicy:
scope: AnyPods
statements:
creation: CREATE USER $(USERNAME) SUPERUSER PASSWORD '$(PASSWD)';
deletion: DROP USER IF EXISTS $(USERNAME);
type: CreateByStmt
name: kbprobe
provisionPolicy:
scope: AnyPods
statements:
creation: CREATE USER $(USERNAME) WITH PASSWORD '$(PASSWD)'; GRANT pg_monitor
TO $(USERNAME);
deletion: DROP USER IF EXISTS $(USERNAME);
type: CreateByStmt
name: kbmonitoring
provisionPolicy:
scope: AnyPods
statements:
creation: CREATE USER $(USERNAME) WITH PASSWORD '$(PASSWD)'; GRANT pg_monitor
TO $(USERNAME);
deletion: DROP USER IF EXISTS $(USERNAME);
type: CreateByStmt
name: kbreplicator
provisionPolicy:
scope: AnyPods
statements:
creation: CREATE USER $(USERNAME) WITH REPLICATION PASSWORD '$(PASSWD)';
deletion: DROP USER IF EXISTS $(USERNAME);
type: CreateByStmt
cmdExecutorConfig:
args:
Describe the bug create pg cluster fail: component postgresql's PrimaryIndex cannot be nil when workloadType is Replication. helm chart package from branch main
To Reproduce Steps to reproduce the behavior:
Endpoints: COMPONENT MODE INTERNAL EXTERNAL
Topology: COMPONENT INSTANCE ROLE STATUS AZ NODE CREATED-TIME
Resources Allocation: COMPONENT DEDICATED CPU(REQUEST/LIMIT) MEMORY(REQUEST/LIMIT) STORAGE-SIZE STORAGE-CLASS
Images: COMPONENT TYPE IMAGE
Events(last 5 warnings, see more:kbcli cluster list-events -n default pg-cluster): TIME TYPE REASON OBJECT MESSAGE
Mar 06,2023 11:31 UTC+0800 Warning PreCheckFailed Cluster/pg-cluster component postgresql's PrimaryIndex cannot be nil when workloadType is Replication.
kubectl get cd postgresql -oyaml
apiVersion: apps.kubeblocks.io/v1alpha1 kind: ClusterDefinition metadata: annotations: meta.helm.sh/release-name: kubeblocks meta.helm.sh/release-namespace: default creationTimestamp: "2023-03-06T03:30:10Z" finalizers:
Expected behavior create pg cluster success.
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.