Skip to content

Control dynamic kubectl download #18

@carolynvs

Description

@carolynvs

There are a few cases where dynamically downloading the kubectl client may not be what the bundle author desired and we should make it controllable by them:

  • kubectl is backwards compatible. When the bundle has a more recent version of kubectl, there isn't a reason to download an older version to match.
  • There may be bug fixes in newer patch versions of kubectl so matching down to the patch isn't always a great behavior when what we really need is API compatibility.
  • The bundle may be self-contained and not want to reach out to external resources, perhaps a thick bundle, and attempts to dynamically download the client should be strictly disabled.

Based on this (please add more in the comments below as you see them), I propose that we add the following configuration to the mixin:

mixins:
- kubernetes
     dynamicDownload:
       versionMatch: exact | minor
       useBackwardsCompatible: true
       disabled: true
  • dynamicDownload: Defines the behavior of the dynamic kubectl client download
    • versionMatch: Defines how the api server version is compared to the client version to determine whether or not a different client should be downloaded. Defaults to minor.
      A download is triggered when:
      • exact - The versions do not match exactly.
      • minor - The Major.Minor versions do not match. The patch version is allowed to be different.
    • useBackwardsCompatible - When the client is newer than the server, take advantage of the kubectl backwards compatibility guarantee and do not download an older client. Defaults to true. (I tried to make a name that worked well for defaulting to false and couldn't come up with one)
    • disabled: Specifies if the dynamic download feature is disabled. Defaults to false.

With the defaults someone who doesn't customize the config settings will only download a client when the server is a newer Major.Minor version. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    design 🚲🏠Bust out your paint chips, it's time to bikeshed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions