Warning: cannot overwrite table with non table for requests (map[cpu:600m memory:1G])

I need to set limits for memory and CPU for XtraDB.
I do the installation of XtraDB using Helm chart with the following commands:

kubectl create namespace xtradb

helm install xtradb-operator percona/pxc-operator --namespace xtradb

helm install xtradb percona/pxc-db --namespace xtradb\
  --set backup.enabled=false \
  --set pxc.resources.requests='{"memory": "1G", "cpu": "400m"}' \
  --set cluster.enabled=true

Get the warning;
coalesce.go:200: warning: cannot overwrite table with non table for requests (map[cpu:600m memory:1G])
And there are no pods are created in xtradb namespace.
The operator logs about “starting workers”, but there are no pods for database.

Here are last logs from operator:

{"level":"info","ts":1634123323.88411,"logger":"controller","msg":"Starting workers","controller":"perconaxtradbclusterrestore-controller","worker count":1}
{"level":"info","ts":1634123323.883882,"logger":"controller","msg":"Starting Controller","controller":"perconaxtradbcluster-controller"}
{"level":"info","ts":1634123323.9853578,"logger":"controller","msg":"Starting workers","controller":"perconaxtradbcluster-controller","worker count":1}
W1013 11:08:54.008911       1 reflector.go:405] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:224: watch of *v1.PerconaXtraDBCluster ended with: an error on the server ("unable to decode an event from the watch stream: unable to decode watch event: v1.PerconaXtraDBCluster.Spec: v1.PerconaXtraDBClusterSpec.PXC: v1.PXCSpec.PodSpec: Resources: v1.PodResources.Requests: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|equests\":[\"\\\"memory\\|..., bigger context ...|Seconds\":15},\"resources\":{\"limits\":{},\"requests\":[\"\\\"memory\\\": \\\"1G\\\"\",\" \\\"cpu\\\": \\\"400m\\\"\"]},\"sidec|...") has prevented the request from succeeding
E1013 11:08:55.224661       1 reflector.go:178] sigs.k8s.io/controller-runtime/pkg/cache/internal/informers_map.go:224: Failed to list *v1.PerconaXtraDBCluster: v1.PerconaXtraDBClusterList.Items: []v1.PerconaXtraDBCluster: v1.PerconaXtraDBCluster.Spec: v1.PerconaXtraDBClusterSpec.PXC: v1.PXCSpec.PodSpec: Resources: v1.PodResources.Requests: readObjectStart: expect { or n, but found [, error found in #10 byte of ...|equests":["\"memory\|..., bigger context ...|Seconds":15},"resources":{"limits":{},"requests":["\"memory\": \"1G\""," \"cpu\": \"400m\""]},"sidec|...

What is wrong?
How to limit resources for XtraDB using Helm chart?

1 Like