Documentation
¶
Index ¶
- Constants
- func IsInvalidConfig(err error) bool
- func IsNotFound(err error) bool
- type App
- type AppSetup
- func (a *AppSetup) CleanUp(ctx context.Context, apps []App) error
- func (a *AppSetup) CtrlClient() client.Client
- func (a *AppSetup) EnsureCRDs(ctx context.Context, crds []*apiextensionsv1.CustomResourceDefinition) error
- func (a *AppSetup) InstallApps(ctx context.Context, apps []App) error
- func (a *AppSetup) K8sClient() kubernetes.Interface
- func (a *AppSetup) RESTConfig() *rest.Config
- func (a *AppSetup) UpgradeApp(ctx context.Context, current, desired App) error
- type Config
- type Interface
Constants ¶
View Source
const ( ControlPlaneCatalog = "control-plane-catalog" ControlPlaneTestCatalog = "control-plane-test-catalog" DefaultCatalog = "default" DefaultTestCatalog = "default-test" GiantSwarmCatalog = "giantswarm" GiantSwarmTestCatalog = "giantswarm-test" GiantSwarmOperationsPlatformCatalog = "giantswarm-operations-platform" GiantSwarmOperationsPlatformTestCatalog = "giantswarm-operations-platform-test" GiantSwarmPlaygroundCatalog = "giantswarm-playground" GiantSwarmPlaygroundTestCatalog = "giantswarm-playground-test" HelmStableCatalog = "helm-stable" ReleasesCatalog = "releases" ReleasesTestCatalog = "releases-test" )
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
Types ¶
type AppSetup ¶
type AppSetup struct {
// contains filtered or unexported fields
}
AppSetup implements the logic for managing the app setup.
func (*AppSetup) CtrlClient ¶ added in v0.5.0
CtrlClient returns a controller-runtime client for use in automated tests.
func (*AppSetup) EnsureCRDs ¶ added in v0.5.0
func (a *AppSetup) EnsureCRDs(ctx context.Context, crds []*apiextensionsv1.CustomResourceDefinition) error
EnsureCRDs will register the passed CRDs in the k8s API used by the client.
func (*AppSetup) InstallApps ¶
InstallApps creates catalog and app CRs for use in automated tests and ensures they are installed by our app platform.
func (*AppSetup) K8sClient ¶ added in v0.4.0
func (a *AppSetup) K8sClient() kubernetes.Interface
K8sClient returns a Kubernetes clienset for use in automated tests.
func (*AppSetup) RESTConfig ¶ added in v0.12.0
RESTConfig returns a Kubernetes REST config for use in automated tests.
type Config ¶
type Config struct {
KubeConfig string
KubeConfigPath string
Logger micrologger.Logger
Scheme *runtime.Scheme
}
Config represents the configuration used to setup the apps.
type Interface ¶
type Interface interface {
// InstallApps creates appcatalog and app CRs for use in automated tests
// and ensures they are installed by our app platform.
InstallApps(ctx context.Context, apps []App) error
// UpgradeApp find matching current app CR and change the spec
// to follow desired app CR.
UpgradeApp(ctx context.Context, current, desired App) error
// EnsureCRDs will register the passed CRDs in the k8s API used by the client.
EnsureCRDs(ctx context.Context, crds []*apiextensionsv1.CustomResourceDefinition) error
// K8sClient returns a Kubernetes clienset for use in automated tests.
K8sClient() kubernetes.Interface
// CtrlClient returns a controller-runtime client for use in automated tests.
CtrlClient() client.Client
// CleanUp removes created resources while installing apps.
CleanUp(ctx context.Context, apps []App) error
// RESTConfig returns a Kubernetes REST config for use in automated tests.
RESTConfig() *rest.Config
}
Click to show internal directories.
Click to hide internal directories.