Skip to content

Refactor BuildConfig to simplify kube rest config initialization #5029

@feyounger

Description

@feyounger

What is the problem you're trying to solve

Background

The current implementation of BuildConfig contains some redundant variable assignments and intermediate steps, which slightly reduces code readability and conciseness.

var cfg *rest.Config
var err error

master := opt.Master
kubeconfig := opt.KubeConfig
cfg, err = clientcmd.BuildConfigFromFlags(master, kubeconfig)

Describe the solution you'd like

Refactor the BuildConfig function to use a more concise and clean implementation without changing existing behavior.

Additional context

No response

Documentation Updates

  • This feature requires design or user documentation changes.
  • If documentation changes are required, I will ensure the relevant documents are updated and published to the Volcano official website (https://volcano.sh) via the volcano-sh/website repository.

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions