planetscale / planetscale/vitess-operator

vitess operator doesn't accept integer values for vttablet extraFlags

Open
#399 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

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"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file or test. Locate the VitessCluster schema and validation for vttablet.extraFlags, then reproduce the integer examples from the report. Done means valid integer flag values are accepted while existing string values continue to work, with regression coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.