planetscale / planetscale/vitess-operator

Feature Request: Add Resource Settings to initContainers for vtbackup

Open
#709 0 comments 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

Currently, the InitContainers section in the vtbackup pod spec does not expose the ability to define container resources.
This causes the deployment to fail in k8s clusters that enforce setting container resources.

13m         Warning   CreateFailed               vitessshard/vtcluster-test-unsharded-x-x-95cb1c8e                           failed to create Pod vtcluster-test-unsharded-x-x-vtbackup-init-1dbe7505: pods "vtcluster-test-unsharded-x-x-vtbackup-init-1dbe7505" is forbidden: failed quota: platform-dbtech-vt16-override-test-resources: must specify limits.memory for: init-vt-root; requests.cpu for: init-vt-root; requests.memory for: init-vt-root

We workaround this issue by defining a limitrange such as this

apiVersion: v1
kind: LimitRange
metadata:
  name: limitrange
spec:
  limits:
  - default:
      memory: 512Mi
    defaultRequest:
      cpu: "1"
      memory: 512Mi
    type: Container

Ask: Would be good to expose this ability so that we can get away from relying on the limitrange.

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 in pkg/operator/vttablet/vtbackup_pod.go, at the InitContainers section around lines 152-169, and trace how the vtbackup pod spec is built. Expose resource settings for the init container and verify that generated pods satisfy clusters requiring CPU and memory requests and limits.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
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.