kappclient

package
v0.0.0-...-b25b198 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Overview

Package kappclient provides CRUD functionality for kapp-controller related resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKubeConfig

func GetKubeConfig(kubeCfgPath string) (*rest.Config, error)

GetKubeConfig gets kubeconfig from the provided kubeconfig path. Otherwise, it gets the kubeconfig from "$HOME/.kube/config" if existing

func GetKubeConfigForContext

func GetKubeConfigForContext(kubeCfgPath, kubeContext string) (*rest.Config, error)

GetKubeConfigForContext gets kubeconfig from the provided kubeconfig path. Otherwise, it gets the kubeconfig from "$HOME/.kube/config" if existing

Types

type Client

type Client interface {
	CreatePackageInstall(packageInstall *kappipkg.PackageInstall, pkgPluginResourceCreationStatus *packagedatamodel.PkgPluginResourceCreationStatus) error
	CreatePackageRepository(repository *kappipkg.PackageRepository) error
	DeletePackageRepository(repository *kappipkg.PackageRepository) error
	GetAppCR(appName string, namespace string) (*kappctrl.App, error)
	GetClient() crtclient.Client
	GetPackageInstall(packageInstallName string, namespace string) (*kappipkg.PackageInstall, error)
	GetPackageMetadataByName(packageName string, namespace string) (*kapppkg.PackageMetadata, error)
	GetPackageRepository(repositoryName, namespace string) (*kappipkg.PackageRepository, error)
	GetPackage(packageName string, namespace string) (*kapppkg.Package, error)
	GetSecretExport(secretName, namespace string) (*secretgen.SecretExport, error)
	GetSecretValue(secretName, namespace string) ([]byte, error)
	ListPackageInstalls(namespace string) (*kappipkg.PackageInstallList, error)
	ListPackageMetadata(namespace string) (*kapppkg.PackageMetadataList, error)
	ListPackages(packageName string, namespace string) (*kapppkg.PackageList, error)
	ListPackageRepositories(namespace string) (*kappipkg.PackageRepositoryList, error)
	ListRegistrySecrets(namespace string) (*corev1.SecretList, error)
	ListSecretExports(namespace string) (*secretgen.SecretExportList, error)
	UpdatePackageInstall(packageInstall *kappipkg.PackageInstall, pkgPluginResourceCreationStatus *packagedatamodel.PkgPluginResourceCreationStatus) error
	UpdatePackageRepository(repository *kappipkg.PackageRepository) error
}

Client is the kapp client interface

func NewKappClient

func NewKappClient(kubeCfgPath string) (Client, error)

NewKappClient returns a new kapp client

func NewKappClientForContext

func NewKappClientForContext(kubeCfgPath, kubeContext string) (Client, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL