Skip to content

Overhaul envtest configuration #722

Closed
@DirectXMan12

Description

@DirectXMan12

So, eventually (/me gesticulates wildly) we'll get componentconfig for API server. In the mean time, the whole "go templates and append command line flags" thing is super awkward, IMO.

I propose that next set of breaking changes pre-1.0, we have something like

type Flags map[string][]string // slice hands flags that can be passed multiple times
func (f Flags) Set(name, value string) { f[name] = []string{value} }
func (f Flags) AddAdditional(name, values ...string) { f[name] = append(f[name], values...) }
func (f Flags) SetDefault(name, value string) {
  if _, alreadySet := f[name]; alreadySet {
    return
  }
  f.Set(name, value)
}

And use something like that. It makes it pretty clear how to override flags, and makes passing custom flag sets a bit more reasonable.

There's points in #645 where I ran into this being awkward, and we've had a number of issues/questions around the existing setup.

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.priority/backlogHigher priority than priority/awaiting-more-evidence.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions