planetscale/vitess-operator

vitess operator doesn't accept integer values for vttablet extraFlags

Areso opened this issue · 1 comments

Areso commented

And requires them to be string type.
Let's say I want to define

--grpc_max_message_size int                                        Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216)

parameter.
For that purpose I define parameter in my cluster definition:

              - cell: eucentral1b
                type: replica
                replicas: 1
                vttablet:
                  extraFlags:
                    grpc_max_message_size: 134217728
                  resources:
                    requests:
                      cpu: 300m
                      memory: 512Mi
                    limits:
                      memory: 512Mi
                mysqld:
                  configOverrides: |
                    max_allowed_packet = 134217728
                  resources:
                    requests:
                      cpu: 1600m
                      memory: 1Gi
                dataVolumeClaimTemplate:
                  accessModes: ["ReadWriteOnce"]
                  storageClassName: "io2-10k"
                  resources:
                    requests:
                      storage: 50Gi

When I try to apply the changes, I am getting the following error:

knv apply -f cluster_k8s-mysql.yml 
The VitessCluster "test" is invalid: spec.keyspaces.partitionings.custom.shards.tabletPools.vttablet.extraFlags.grpc_max_message_size: Invalid value: "integer": spec.keyspaces.partitionings.custom.shards.tabletPools.vttablet.extraFlags.grpc_max_message_size in body must be of type string: "integer"

The workaround I use for now:

                mysqld:
                  configOverrides: |
                    max_allowed_packet = "134217728"

The same goes for vreplication-parallel-insert-workers param:

                vttablet:
                  extraFlags:
                    vreplication-parallel-insert-workers: 4

returned

knv apply -f cluster_k8s-mysql.yml 
The VitessCluster "test" is invalid: spec.keyspaces.partitionings.custom.shards.tabletPools.vttablet.extraFlags.vreplication-parallel-insert-workers: Invalid value: "integer": spec.keyspaces.partitionings.custom.shards.tabletPools.vttablet.extraFlags.vreplication-parallel-insert-workers in body must be of type string: "integer"

the same, my current workaroud is to wrap it in quotas, so it would like a string type:

                vttablet:
                  extraFlags:
                    vreplication-parallel-insert-workers: "4"