Skip to content

legacyflags kflag #2333

Closed
Closed
@ghost

Description

Enhancement Description

  • One-line enhancement description (can be used as a release note): kflag

  • Kubernetes Enhancement Proposal:

Create a legacyflags package, which wraps pflag and addresses the pain-points of backwards-compatible
ComponentConfig migration, and selective registration of third-party library flags.

Make it easier for component owners to implement
Versioned Component Configuration Files
(a.k.a. ComponentConfig).

While a number of problems with existing machinery are highlighted in the above doc, this
proposal is focused on the following two use-cases:

  • Enforcing flag precedence between values
    specified on the command line and values from a config file, which is required to incrementally
    migrate flags to a config file with backwards compatibility.
  • Preventing third-party code from
    implicitly registering flags
    against a component's command-line interface, which is required for components to maintain
    explicit control over their command-line interface.

Rather than require other components to copy and customize the Kubelet's relatively complex
solutions to these problems, we should put the common functionality in a library, legacyflags, to reduce
the burden on component owners.

  • Discussion Link:

This proposal recommends the approach in this example PR:

See also @sttts's prototype for an alternative approach that predates this KEP:

  • Primary contact (assignee): @mtaufen
  • Responsible SIGs: sig-api-machinery
  • Enhancement target (which target equals to which milestone):
    • Alpha release target (x.y):
    • Beta release target (x.y):
    • Stable release target (x.y):
  • Alpha
    • KEP (k/enhancements) update PR(s):
    • Code (k/k) update PR(s):
    • Docs (k/website) update PR(s):

Implementation History

  • 2019-01-29: Initial KEP PR.

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions