Documentation
¶
Index ¶
- Constants
- Variables
- type AppCrdInput
- type Config
- type Kapp
- func (k *Kapp) DeletePackage(input *AppCrdInput) error
- func (k *Kapp) DeleteRepository(name string) error
- func (k *Kapp) DeleteRepositoryFromFile(filename string) error
- func (k *Kapp) GetWorkingDirectory() string
- func (k *Kapp) InstallDefaultRepository() error
- func (k *Kapp) InstallPackage(input *AppCrdInput) error
- func (k *Kapp) InstallRepository(name, url string) error
- func (k *Kapp) InstallRepositoryFromFile(filename string) error
- func (k *Kapp) ListRepositories() (*instpkg.PackageRepositoryList, error)
- func (k *Kapp) ResolveInstalledPackage(name, version, namespace string) (*ipkg.InstalledPackage, error)
- func (k *Kapp) ResolvePackage(name, version string) (*kapppack.Package, error)
- func (k *Kapp) ResolvePackageBundleLocation(pkg *kapppack.Package) (string, error)
- func (k *Kapp) ResolvePackageVersion(pkg *kapppack.Package) string
- func (k *Kapp) RetrievePackages() ([]kapppack.Package, error)
- type Repository
Constants ¶
const ( // DefaultWorkingDirectory is the working directory DefaultWorkingDirectory string = "working" // DefaultAppCrdNamespace is the default App Crd namespace DefaultAppCrdNamespace string = "tanzu-extensions" // DefaultServiceAccountPostfix is the default Service Account postfix name DefaultServiceAccountPostfix string = "-extension-sa" // DefaultRoleBindingPostfix is the default Role Binding postfix name DefaultRoleBindingPostfix string = "-extension" // DefaultRepositoryName is tce-main.tanzu.vmware DefaultRepositoryName string = "tce-main.tanzu.vmware" // DefaultRepositoryImage is projects.registry.vmware.com/tce/main:stable DefaultRepositoryImage string = "projects.registry.vmware.com/tce/main:stable" )
Variables ¶
var ( // ErrAppNotPresentOrInstalled is Application is not present/installed ErrAppNotPresentOrInstalled = errors.New("application is not present/installed") )
Functions ¶
This section is empty.
Types ¶
type AppCrdInput ¶
type AppCrdInput struct {
// Common between UserDefined and Secret
Namespace string
// UserDefined
Name string
URL string
Paths map[string]string
Version string
ConfigPath string
Config []byte
// From Secret
ClusterName string
// Force delete
Force bool
// Teardown by deleting ServiceAccount and RoleBinding
Teardown bool
}
AppCrdInput for creating an app
type Config ¶
type Config struct {
// Kubeconfig is the users kubeconfig
Kubeconfig string
// ExtensionServiceAccountPostfix is the extension postfix for service account
ExtensionServiceAccountPostfix string
// ExtensionRoleBindingPostfix is the extension postfix for role binding
ExtensionRoleBindingPostfix string
// Repositories list of repos
Repositories []*Repository `json:"repositories"`
}
Config struct
func InitKappConfig ¶
InitKappConfig inits the Config and also checks Environment variables
type Kapp ¶
type Kapp struct {
// contains filtered or unexported fields
}
Kapp object for kapp
func (*Kapp) DeletePackage ¶
func (k *Kapp) DeletePackage(input *AppCrdInput) error
DeletePackage removes the InstalledPackage CR and related assets from the cluster.
func (*Kapp) DeleteRepository ¶
DeleteRepository deletes a repo
func (*Kapp) DeleteRepositoryFromFile ¶
DeleteRepositoryFromFile does it from a file
func (*Kapp) GetWorkingDirectory ¶
GetWorkingDirectory for ytt
func (*Kapp) InstallDefaultRepository ¶
InstallDefaultRepository uses TCE
func (*Kapp) InstallPackage ¶
func (k *Kapp) InstallPackage(input *AppCrdInput) error
InstallPackage creates the InstalledPackage CR and applies it to the cluster.
func (*Kapp) InstallRepository ¶
InstallRepository installs a generic repo
func (*Kapp) InstallRepositoryFromFile ¶
InstallRepositoryFromFile does it from a file
func (*Kapp) ListRepositories ¶
func (k *Kapp) ListRepositories() (*instpkg.PackageRepositoryList, error)
ListRepositories lists all repos
func (*Kapp) ResolveInstalledPackage ¶
func (k *Kapp) ResolveInstalledPackage(name, version, namespace string) (*ipkg.InstalledPackage, error)
ResolveInstalledPackage takes a package name (publicName) and version and returns the contents of that InstalledPackage. When only the name is provided, the newest InstalledPackage resolved is returned. If a package cannot be resolved due to the name and/or version, an error is returned.
func (*Kapp) ResolvePackage ¶
ResolvePackage takes a package name (publicName) and version and returns the contents of that package. When only the name is provided, the newest package resolved is returned. If a package cannot be resolved due to the name and/or version, an error is returned.
func (*Kapp) ResolvePackageBundleLocation ¶
ResolvePackageBundleLocation takes a Package CR and looks up the associated imgpkg bundle. There may only be 1 imgpkg bundle associated with the Package CR or else an error is returned.
func (*Kapp) ResolvePackageVersion ¶
ResolvePackageVersion takes a package an input and returns the Package's version
type Repository ¶
Repository object