planetscale / planetscale/vitess-operator

vitessOrchestrator complete support for command: and args: key words

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

Nobody has claimed this yet.

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

Description

I realize vtorc is beta software and this might be a feature request rather than a bug.

Using command: and args: keywords to copy a file in the vtorc pod before vtorc runs doesn't work. However, command: and args: work under initContainer. Below is an example that generates an initContainer that runs "ls -l /" successfully because the results are logged under the pod's "setup" container.

spec:
  vitessDashboard:
    replicas: 1
    resources:
      limits:
        memory: 512Mi
      requests:
        cpu: 75m
        memory: 256Mi

next section:

keyspaces:
- name: demoDB
    vitessOrchestrator:
      extraLabels:
        planetscale.com/component: vtorc
      configSecret:
        name: orc-config-80x
        key: orc_config.json
     initContainer:
        name: setup
        command: ["/bin/sh", "-c"]
        args: ["ls -l /"]
     extraVolumes:
      - name: "orc-configs"
         configMap:
          name: "orc-config"
      - name: "what"
        emptyDir: {}

Based on how initContainer works, the expected results of the below config should be the results of "ls -l /" in the vtorc container log. The actual results are that the results of "ls -l /" are NOT logged. Only Vtorc is logging. I assume that means command: and args: are not being honored at the vitessOrchestrator level. The config I tried is below:

keyspaces:
- name: demoDB
    vitessOrchestrator:
      extraLabels:
        planetscale.com/component: vtorc
      configSecret:
        name: orc-config-80x
        key: orc_config.json
      command: ["/bin/sh", "-c"]
      args: ["ls -l /"]
      extraVolumeMounts:
        - name: "orc-configs"
          mountPath: "/pickup"
        - name: "what"
          mountPath: /conf
      extraVolumeMounts:
       - name: "orc-configs"
          mountPath: "/pickup"
       - name: "what"
          mountPath: /conf
     extraVolumes:
      - name: "orc-configs"
         configMap:
          name: "orc-config"
      - name: "what"
        emptyDir: {}

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

Start at the vitessOrchestrator pod-spec generation and compare its command and args handling with the initContainer configuration described in the issue. Verify the resulting vtorc pod behavior with the provided ls -l / example; done means command and args are honored and their output appears in the vtorc container logs.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.