pingcap / pingcap/tidb-operator

Allow users to read azure blob storage credentials from both env and secret at the same time.

Open
#4,835 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type/feature-request
Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

Feature Request

Is your feature request related to a problem? Please describe:
Users need to set up TiDB clusters across multiple environments. Some settings, e.g., AZURE_STORAGE_ACCOUNT can be shared across different envs, while some of them, e.g., AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID, have to be environment-specific. The current implementation only allows TiDB to read settings from one source, i.e., envs or kubernetes secrets, which makes it hard to manage several TiDB clusters in different environments,

Describe the feature you'd like:
Allow users to read azure blob storage credentials from both env and secret at the same time.
e.g., read AZURE_STORAGE_ACCOUNT from env, while get AZURE_CLIENT_ID, AZURE_CLIENT_SECRET and AZURE_TENANT_ID from the secret

Describe alternatives you've considered:
Change the implementation in the file:
https://github.com/pingcap/tidb-operator/blob/ec8974c534d6beeedc68a9106b82ec45fbab3d90/pkg/backup/util/util.go#L310-L317

Read the envs first, and overwrite parameters set in secret.

Teachability, Documentation, Adoption, Migration Strategy:

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 by inspecting pkg/backup/util/util.go around lines 310-317, focusing on how Azure blob storage settings are sourced from environment variables and Kubernetes secrets. Confirm the current source-selection behavior, then verify that shared settings can come from the environment while environment-specific credentials come from the secret; the issue does not name a test file to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go, kubernetes
Domain
cloud, 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.