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

vitess operator doesn't accept integer values for vttablet extraFlags #399

Open
Areso opened this issue Mar 27, 2023 · 0 comments
Open

vitess operator doesn't accept integer values for vttablet extraFlags #399

Areso opened this issue Mar 27, 2023 · 0 comments

Comments

@Areso
Copy link

Areso commented Mar 27, 2023

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"
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