Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v0.11] cmd: Introduce HUBBLE_COMPAT=legacy-json-output #866

Merged
merged 1 commit into from
Jan 24, 2023

Commits on Jan 24, 2023

  1. cmd: Introduce HUBBLE_COMPAT=legacy-json-output

    [ upstream commit 221b8ea ]
    
    This commit introduces a new environment variable, `HUBBLE_COMPAT`,
    which can be used to restore old behavior in the presence of breaking
    changes. It's inspired by Golang's GODEBUG variable documented here:
    https://pkg.go.dev/runtime
    
    The intent of this flag is to allow us introduce breaking changes in the
    CLI, while still preserving backwards-compatibility with older versions
    where needed. As an example, this commit also bring back the legacy `-o
    json` flow schema if `HUBBLE_COMPAT` is set to `legacy-json-output`.
    This allows older Cilium stable versions to pull in a newer version of
    the Hubble CLI as part of security updates, while preserving the
    behavior of the Hubble CLI that originally shipped with that Cilium
    version.
    
    HUBBLE_COMPAT options are _not_ intended to be supported indefinitely.
    Rather, compat options may be removed once the ecosystem (such as
    downstream users like the Cilium-Agent image) has caught up.
    
    We use an environment variable instead of a viper flag to ensure that we
    could also use it to modify the behavior of viper or pflags if needed in
    the future.
    
    Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
    gandro committed Jan 24, 2023
    Configuration menu
    Copy the full SHA
    f5a2c20 View commit details
    Browse the repository at this point in the history