upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

Add `up xpkg install` command #159

Closed ytsarev closed 1 year ago

ytsarev commented 2 years ago

What problem are you facing?

Currently up is missing xpkg install command symmetric to kubectl crossplane install

How could Upbound help solve your problem?

Implement package installation which looks like logical piece to extend existing package management commands

xpkg
  xpkg build
    Build a package.

  xpkg init
    Initialize a package.

  xpkg dep [<package>]
    Manage package dependencies.

  xpkg push <tag>
    Push a package.
hasheddan commented 1 year ago

After pushing back for a bit, I think this makes sense to enable more "quick start" scenarios. However, I think it may make more sense to live under the controlplane command group as we are modifying the control plane by installing a provider or configuration, rather than operating on an xpkg.

The two commands would be:

up ctp provider install <ref>
up ctp configuration install <ref>
tnthornton commented 1 year ago

The two commands would be:

up ctp provider install <ref>
up ctp configuration install <ref>

How are we planning to inform the contents of the manifest that's applied with these commands? Will that manifest have package-pull-secret defined?

Regarding contents, I could see us going a couple of ways:

  1. Directly reference the marketplace 'install manifest' that we show to users when they click the button in Marketplace.
  2. Simply inline the ref into internal structs that are pre-defined.
hasheddan commented 1 year ago

@tnthornton these would match the upstream commands, so we would be doing (2). Otherwise we would fail to install anything that wasn't in the Marketplace, which feels like an unnecessary restriction. The upstream commands support a --package-pull-secrets flag that we could opt to use here as well. I would stop short of adding any other flags though and say kubectl apply a manifest if you need more customization.